Function at 0x408d60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c
mov eax, dword [0x417c20]
inc eax
mov dword [0x417c20], eax
push ebx
push esi
cmp eax, 1
push edi
push ebp
jne 0x409226
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esp + 0x14], eax
mov eax, dword [0x417c1c]
test eax, eax
jne 0x408d97
mov eax, dword [esp + 0x14]
mov dword [0x417c1c], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [0x417c1c]
cmp ecx, eax
ja 0x409226
add eax, 0xa
mov esi, dword [0x417c18]
mov dword [0x417c1c], eax
test esi, esi
je 0x409226
xor ebx, ebx
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x408ddb
mov dword [esp + 0x24], ebx
mov edi, dword [esi + 0x44]
mov dword [esi + 0x7c], 0xffffffff
jmp 0x408e84
mov eax, dword [0x417c10]
test eax, eax
je 0x408de6
call eax
mov ecx, dword [esi + 0x60]
lea eax, [esp + 0x24]
lea edx, [esp + 0x14]
push eax
push edx
mov ebp, dword [ecx]
push ecx
call dword [ebp + 0x10]
mov eax, dword [0x417c14]
test eax, eax
je 0x408e04
call eax
mov eax, dword [esi + 0x7c]
cmp eax, 0xffffffff
je 0x408f8b
mov ecx, dword [esi + 0x80]
mov edx, dword [esp + 0x14]
cmp eax, ecx
jbe 0x408f7f
cmp eax, edx
ja 0x408f8b
mov eax, edx
mov edx, dword [esi + 0x44]
cmp edx, eax
ja 0x408e3f
mov eax, dword [esp + 0x14]
cmp ecx, eax
jbe 0x408f8b
mov dword [esi + 0x58], 1
mov eax, dword [0x417c10]
test eax, eax
je 0x408e51
call eax
mov eax, dword [esi + 0x60]
push eax
mov ebp, dword [eax]
call dword [ebp + 0x48]
mov eax, dword [esi + 0x60]
push ebx
push eax
mov ebp, dword [eax]
call dword [ebp + 0x34]
mov eax, dword [0x417c14]
test eax, eax
je 0x408e6f
call eax
mov dword [esi + 0x6c], 1
mov dword [esp + 0x24], ebx
mov dword [esi + 0x7c], 0xffffffff
mov edi, dword [esi + 0x44]
mov dword [esi + 0x74], edi
mov ecx, dword [esi + 0x44]
mov eax, ecx
shr eax, 2
cmp eax, edi
jae 0x4091d6
mov eax, dword [esi + 0x7c]
cmp eax, 0xffffffff
jne 0x4091d6
mov ebp, dword [esi + 0x10]
cmp ebp, 3
jbe 0x408fca
cmp ebp, edi
jae 0x408eb5
mov edi, ebp
and edi, 0xfffffffc
mov ecx, dword [esi + 0x60]
lea eax, [esp + 0x10]
push ebx
lea edx, [esp + 0x20]
push eax
lea ebp, [esp + 0x20]
push edx
lea eax, [esp + 0x2c]
push ebp
mov edx, dword [esp + 0x34]
push eax
push edi
mov ebp, dword [ecx]
push edx
push ecx
call dword [ebp + 0x2c]
test eax, eax
jne 0x4091d6
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 4]
push eax
mov edx, dword [esi]
push ecx
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x28]
push edx
push eax
push ecx
call fcn.004085e0
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0x10]
sub edx, ecx
mov dword [esi + 0x10], edx
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x408f42
mov eax, dword [esp + 0x10]
test eax, eax
je 0x408f42
push eax
mov ecx, dword [esi + 4]
push ecx
mov edx, dword [esi]
push edx
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x28]
push eax
push ecx
call fcn.004085e0
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x10]
sub edx, ecx
mov dword [esi + 0x10], edx
mov ecx, dword [esi + 0x60]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
push eax
mov ebp, dword [esp + 0x1c]
push edx
mov eax, dword [esp + 0x28]
push ebp
push eax
mov ebp, dword [ecx]
push ecx
call dword [ebp + 0x4c]
mov ecx, dword [esp + 0x24]
add ecx, edi
mov dword [esi + 0x68], ecx
mov eax, dword [esi + 0x44]
cmp eax, ecx
ja 0x408f74
sub ecx, eax
mov dword [esi + 0x68], ecx
add dword [esi + 0x70], edi
sub dword [esi + 0x74], edi
jmp 0x4091d6
cmp eax, edx
ja 0x408f8b
cmp ecx, edx
ja 0x408e3f
mov eax, dword [esi + 0x78]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
ja 0x408f9c
mov edi, ecx
sub edi, eax
jmp 0x408fa7
mov edi, dword [esi + 0x44]
sub edi, eax
mov eax, dword [esp + 0x14]
add edi, eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0x78], eax
mov ecx, dword [esi + 0x74]
mov edx, dword [esi + 0x44]
add edi, ecx
cmp edx, edi
jbe 0x408e3f
mov eax, dword [esi + 0x68]
mov dword [esp + 0x24], eax
jmp 0x408e84
mov eax, dword [esi + 0x6c]
test eax, eax
jne 0x40921b
lea eax, [ecx*4]
sub edx, edx
mov dword [esp + 0x28], 5
div dword [esp + 0x28]
cmp eax, edi
jae 0x4091d6
and ecx, 0xfffffff3
push ebx
shr ecx, 2
lea eax, [esp + 0x14]
lea edx, [esp + 0x20]
push eax
lea edi, [ecx + ebp]
push edx
mov ecx, dword [esi + 0x60]
lea ebp, [esp + 0x24]
lea eax, [esp + 0x2c]
push ebp
mov edx, dword [esp + 0x34]
push eax
push edi
mov ebp, dword [ecx]
mov dword [esp + 0x44], edi
push edx
push ecx
call dword [ebp + 0x2c]
test eax, eax
jne 0x4091d6
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ebp, dword [esi + 0x10]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], eax
test ebp, ebp
je 0x4090eb
cmp ebp, edx
jbe 0x40905c
mov ebp, edx
push ebp
mov eax, dword [esi + 4]
push eax
mov ecx, dword [esi]
push ecx
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x2c]
push edx
push eax
call fcn.004085e0
mov dword [esi + 8], eax
sub dword [esi + 0x10], ebp
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
add edx, ebp
sub eax, ebp
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], eax
mov eax, edi
sub eax, ebp
mov ebp, dword [esi + 0x10]
mov dword [esp + 0x2c], eax
test ebp, ebp
je 0x4090eb
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4090eb
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4090eb
cmp ebp, eax
jbe 0x4090b1
mov ebp, eax
push ebp
mov eax, dword [esi + 4]
push eax
mov ecx, dword [esi]
push ecx
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.004085e0
mov dword [esi + 8], eax
sub dword [esi + 0x10], ebp
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
add edx, ebp
sub eax, ebp
sub ecx, ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], ecx
sub edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
add eax, edi
mov dword [esi + 0x68], eax
mov ecx, dword [esi + 0x44]
cmp ecx, eax
ja 0x409104
sub eax, ecx
mov dword [esi + 0x68], eax
add dword [esi + 0x70], edi
sub dword [esi + 0x74], edi
mov edx, dword [esi + 0x68]
mov dword [esi + 0x7c], edx
mov ebp, dword [esp + 0x18]
test ebp, ebp
je 0x409147
mov edx, ebp
mov eax, dword [esi + 0x50]
mov edi, dword [esp + 0x20]
cmp eax, 1
sbb eax, eax
and eax, 0x80
mov cl, al
mov ch, cl
mov cl, al
mov eax, ecx
shl eax, 0x10
mov ax, cx
mov ecx, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x409186
mov eax, dword [esp + 0x10]
test eax, eax
je 0x409186
mov edx, eax
mov edi, dword [esp + 0x1c]
cmp dword [esi + 0x50], 1
sbb eax, eax
and eax, 0x80
mov cl, al
mov ch, cl
mov cl, al
mov eax, ecx
shl eax, 0x10
mov ax, cx
mov ecx, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x40918a
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
add ecx, eax
mov edx, dword [esp + 0x24]
add ecx, edx
mov dword [esi + 0x68], ecx
mov eax, dword [esi + 0x44]
cmp eax, ecx
ja 0x4091a9
sub ecx, eax
mov dword [esi + 0x68], ecx
mov eax, dword [esi + 0x68]
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x80], eax
mov ecx, dword [esi + 0x60]
mov eax, dword [esp + 0x34]
push eax
push ebp
push edx
mov eax, dword [ecx]
push ecx
call dword [eax + 0x4c]
mov dword [esi + 0x58], 1
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x40921b
mov eax, dword [0x417c0c]
test eax, eax
je 0x4091f2
push esi
mov dword [0x417c0c], ebx
call fcn.00409240
mov dword [esi + 0x6c], ebx
mov eax, dword [0x417c10]
test eax, eax
je 0x409200
call eax
mov eax, dword [esi + 0x60]
push 1
push ebx
push ebx
push eax
mov ebp, dword [eax]
call dword [ebp + 0x30]
mov eax, dword [0x417c14]
test eax, eax
je 0x409218
call eax
mov dword [esi + 0x78], ebx
mov esi, dword [esi + 0x3c]
test esi, esi
jne 0x408dc1
mov eax, dword [0x417c20]
pop ebp
dec eax
pop edi
pop esi
mov dword [0x417c20], eax
pop ebx
add esp, 0x2c
ret