I am a historian. I am a modern german and in my book, the Nazi regime is not only the darkest chapter of Germany, but anyone that denies the holocaust or praises the ideas of genocide in this day and age, or adheres to the Rassenlehre is a lost cause. Or, to say it in Japanese:
To adhere to such ideology is - in my eyes - a thing that is beyond forgiveness and nobody should get away with it. But, now let's turn to the matter of LAW
The situation is somewhat complicated and easy at the same time.
Let's start with what relevant international law existed in 1945, by looking at the background:
There was the Hague Convention on War, which pretty much everybody civilized had signed in, including Germany. It was shown to be toothless in the first World War, as pretty much any and all rules of warfare were thrown overboard. Gas - forbidden under both Hague conventions - was used by all sides. But technically everybody was still bound by them, even if they did not rely on these formal rules of war. We will need to remember that later. Hague is one of the oldest international treaties still relevant, and the cornerstone of the Geneve Conventions that would specify things after WW2!
After WW1, there was the League of Nations, which had no governing power on nonmembers. The Weimar Republic joined in 1926, but the USA never joined it. The Soviet-Union (joined 1934) was always a tenuous partner till they were outright thrown out for invading Finland in 1939 - and they annexed 3 other members in 1940. Add to that that Hitler in his capacity of Chancellor declared in 1933 that they withdrew from the treaty - and thus rendered whatever the LoN might decide inapplicable to Germany. For the same reasons Japan and Italy withdrew - and as a result, the LoN was a toothless lion.
The Versailles Treaty of 1919 - the peace of the first World War - had been paid off and hollowed out by subsequent superseding treaties and the rests voided altogether with the declaration of war upon France in 1941. It had had some territorial effects, but those were mooted by the invasion of those territories that had been given up and more. It was obsoleted and not good law for all but that it had existed.
The Anschluss of Austria in 1938 was in part a result of Versailles - and because by then the treaty was pretty much dissolved, it was no longer binding. It was something that had been the sentiment and ended in a bilateral contract. The International reaction was... underwhelming. The only one that spoke harshly against it was a Mexican delegate to the League of nations - which again, had no teeth anymore on Germany.
On the other hand, the results of the appeasement politics of Britain in the interwar period toward Germany had some strange effects, and its politics were backed up by that non-adhering to the British terms would lead to sanctions. Bohemia was given to Germany in the Munich Agreement of 1938 - to which the country in question wasn't even invited. But Chechoslovakia did yield under protest, and then the Vienna Accords did carve up more land from Chechoslovakia to others. The obligations of the British and French to the Czechoslovakian people as they had guaranteed the country were ignored in 1939, when the larger part was declared a protectorate. The British had an empire to govern and France had trouble with northern Africa and a massive shortage of workforce... Nobody that had an army large enough to counter them cared.
What Happened May 8th 1945?!
Now, we skip WW2, it's atrocities and the soiling of so many other customs of war, international peace. We end at the unconditional surrender of Germany in 1945: the Unconditional Surrender was signed on May 8th 1945, 21:20 local time. That moment one piece of new international law was created. It was binding. It declared:
ACT OF MILITARY SURRENDER
- We the undersigned, acting by authority of the German High Command, hereby surrender unconditionally to the Supreme Commander, Allied Expeditionary Force and simultaneously to the Supreme High Command of the Red Army all forces on land, at sea, and in the air who are at this date under German control.
- The German High Command will at once issue orders to all German military, naval and air authorities and to all forces under German control to cease active operations at 23.01 hours Central European time on 8 May 1945, to remain in all positions occupied at that time and to disarm completely, handing over their weapons and equipment to the local allied commanders or officers designated by Representatives of the Allied Supreme Commands. No ship, vessel, or aircraft is to be scuttled, or any damage done to their hull, machinery or equipment, and also to machines of all kinds, armament, apparatus, and all the technical means of prosecution of war in general.
- The German High Command will at once issue to the appropriate commanders, and ensure the carrying out of any further orders issued by the Supreme Commander, Allied Expeditionary Force and by the Supreme Command of the Red Army.
- This act of military surrender is without prejudice to, and will be superseded by any general instrument of surrender imposed by, or on behalf of the United Nations and applicable to GERMANY and the German armed forces as a whole.
- In the event of the German High Command or any of the forces under their control failing to act in accordance with this Act of Surrender, the Supreme Commander, Allied Expeditionary Force and the Supreme High Command of the Red Army will take such punitive or other action as they deem appropriate.
- This Act is drawn up in the English, Russian and German languages. The English and Russian are the only authentic texts.
[Representatives of all sides]
It was an all military surrender. The civil government - technically separate - did not undersign. However, the Allied Powers - US, France, Britan and the USSR - declared it to be surrendered in the Berlin Declaration. Such was pretty much in line with the customs of war. Wait, customs of war?
Yes, We are back at the Hague Conventions. Here, they suddenly show teeth again, and as they were still good law, even if they had been ignored for the last 40 years, they grew even larger teeth as they were pulled out again in preparation for the Nürnberger Prozesse/Nuremberg Trials. Note that there is criticism in the process that went on, but only neo-nazis and idiots claim that the verdicts of the trial were not correct.
The source of Power for the Allied Powers
But, back to the situation at hand. Why could the Allied Powers just do as they wanted? They had been empowered by the unconditional Surrender of the troops to disarm all German troops. As the Berlin Declaration was never contested, it got power and the Allied Powers could pretty much do as they please. So All the power of the former government was with the Allied Powers, who decided to put in a council.
That council of generals did carve up Germany based on the results of the Yalta conference. Germany did not exist since it had surrendered, so it could not protest.