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

Disassembly:
sub esp, 0x3c
push esi
mov esi, ecx
mov eax, dword [esi + 0xc8]
test eax, eax
je 0x598e8c
mov ecx, dword [0x74e914]
mov eax, dword [ecx]
push ebx
push ebp
push edi
push 2
call dword [eax + 0x10]
mov edx, dword [esi + 0xa8]
mov edi, dword [esi + 0xac]
mov ebx, dword [esi + 0xb0]
mov ecx, dword [esi + 0xb4]
mov eax, dword [esi + 0x74]
and edx, 0xfffffffe
and edi, 0xfffffffc
inc ebx
add ecx, 3
and ebx, 0xfffffffe
and ecx, 0xfffffffc
cmp ebx, eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ecx
jle 0x598bc5
mov ebx, eax
mov dword [esp + 0x34], ebx
mov eax, dword [esi + 0x78]
cmp ecx, eax
jle 0x598bd0
mov dword [esp + 0x38], eax
mov ecx, dword [esi + 0x90]
mov eax, dword [esi + 0x98]
mov ebp, dword [esi + 0x94]
add eax, ecx
mov ecx, dword [esi + 0x9c]
shl edx, 6
sub edx, eax
mov dword [esp + 0x24], edx
add ecx, ebp
mov edx, edi
shl edx, 5
mov ebp, edx
mov edx, ebx
shl edx, 6
sub edx, eax
mov eax, dword [esp + 0x38]
shl eax, 5
sub ebp, ecx
sub eax, ecx
mov ecx, dword [esp + 0x24]
test ecx, ecx
jg 0x598c28
test ebp, ebp
jg 0x598c28
mov ecx, dword [esi + 0xa4]
cmp edx, ecx
jl 0x598c28
cmp eax, ecx
jge 0x598c35
mov ecx, dword [0x74e914]
mov eax, dword [ecx]
push 0
call dword [eax + 0x54]
call sub.WINMM.dll_timeGetTime
sub eax, dword [esi + 0x114]
mov dword [esp + 0x20], eax
cmp edi, dword [esp + 0x38]
mov ecx, edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ecx
jae 0x598e7e
jmp 0x598c60
mov ebp, dword [esp + 0x2c]
cmp ebp, ebx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], edx
jae 0x598e5d
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov edi, eax
sar edi, 2
mov dword [esp + 0x1c], edi
jmp 0x598c90
mov edi, dword [esp + 0x1c]
jmp 0x598c90
mov eax, dword [esi + 0x74]
inc eax
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
imul ebx, edi
mov eax, ebp
cdq
sub eax, edx
sar eax, 1
add ebx, eax
mov eax, dword [esi + 0x7c]
mov edx, dword [eax + ebx*4]
lea edi, [eax + ebx*4]
xor al, al
cmp edx, 0xffff
je 0x598df9
mov edx, dword [esi + 0x74]
mov eax, dword [esi + 0x84]
imul edx, ecx
add edx, ebp
imul edx, edx, 0xf
mov eax, dword [edx + eax + 7]
test eax, eax
je 0x598d29
cmp word [eax + 7], 0xffff
je 0x598d29
mov ax, word [eax + 9]
cmp ax, 0xffff
je 0x598d29
mov ecx, dword [esi + 0xcc]
test ecx, ecx
movzx eax, ax
je 0x598d29
xor edx, edx
mov ecx, 0x64
div ecx
mov ecx, dword [esi + 0xcc]
mov ebx, dword [ecx]
push edx
push eax
call dword [ebx + 0x28]
test eax, eax
je 0x598d29
cmp word [eax + 0xa], 0
je 0x598d29
mov edx, dword [eax]
push 0
mov ecx, eax
call dword [edx]
cmp byte [eax + 0x1d], 2
je 0x598e3c
mov eax, dword [esi + 0x74]
imul eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x84]
add eax, ebp
imul eax, eax, 0xf
mov eax, dword [eax + ecx + 0xb]
test eax, eax
je 0x598d97
cmp dword [eax + 7], 0xffff
je 0x598d97
mov ax, word [eax + 0xb]
cmp ax, 0xffff
je 0x598d97
mov ecx, dword [esi + 0xcc]
test ecx, ecx
movzx eax, ax
je 0x598d97
xor edx, edx
mov ecx, 0x64
div ecx
mov ecx, dword [esi + 0xcc]
mov ebx, dword [ecx]
push edx
push eax
call dword [ebx + 0x28]
test eax, eax
je 0x598d97
cmp word [eax + 0xa], 0
je 0x598d97
mov edx, dword [eax]
push 0
mov ecx, eax
call dword [edx]
cmp byte [eax + 0x1d], 2
je 0x598e3c
mov eax, dword [edi]
xor edx, edx
mov edi, 0x64
div edi
mov ecx, dword [esi + 0xc8]
mov edi, dword [ecx]
push edx
push eax
call dword [edi + 0x28]
mov ecx, eax
test ecx, ecx
jne 0x598db9
xor al, al
jmp 0x598df9
mov di, word [ecx + 0xa]
test di, di
jne 0x598dc6
xor al, al
jmp 0x598df9
xor edx, edx
cmp di, 1
je 0x598ddc
mov eax, dword [esp + 0x20]
div dword [ecx + 0xc]
movzx edi, di
xor edx, edx
div edi
mov eax, dword [ecx]
push edx
call dword [eax]
mov ecx, dword [esp + 0x50]
mov edx, dword [eax]
push 0
push ecx
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, eax
call dword [edx + 0xc]
mov cl, byte [esi + 5]
test cl, cl
je 0x598e3c
test al, al
jne 0x598e3c
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
add ecx, 0x80
add eax, 0x80
mov dword [esp + 0x44], ecx
mov ecx, dword [0x74e914]
mov dword [esp + 0x48], eax
mov edx, dword [ecx]
push 0xff000000
lea eax, [esp + 0x40]
push eax
call dword [edx + 0x68]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
add edx, 0x80
add ebp, 2
cmp ebp, ebx
mov dword [esp + 0x10], edx
jb 0x598c87
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
add ecx, 4
add edi, 0x80
cmp ecx, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
jb 0x598c60
mov ecx, dword [0x74e914]
mov edx, dword [ecx]
call dword [edx + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x3c
ret 4