I noticed when EDX contains some random default value like 00401000, and I then use a DIV instruction like this:
mov eax,10 mov ebx,5 div ebx
The DIV instruction divides EDX:EAX by the r/m32 that follows the DIV instruction. So, if you fail to set EDX to zero, the value you are using becomes extremely large.
Trust that helps