Function at 0x5c3590
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 0x5c38bc
mov ecx, dword [0x77ff08]
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 0x5c35f5
mov ebx, eax
mov dword [esp + 0x34], ebx
mov eax, dword [esi + 0x78]
cmp ecx, eax
jle 0x5c3600
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 0x5c3658
test ebp, ebp
jg 0x5c3658
mov ecx, dword [esi + 0xa4]
cmp edx, ecx
jl 0x5c3658
cmp eax, ecx
jge 0x5c3665
mov ecx, dword [0x77ff08]
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 0x5c38ae
jmp 0x5c3690
mov ebp, dword [esp + 0x2c]
cmp ebp, ebx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], edx
jae 0x5c388d
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov edi, eax
sar edi, 2
mov dword [esp + 0x1c], edi
jmp 0x5c36c0
mov edi, dword [esp + 0x1c]
jmp 0x5c36c0
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 0x5c3829
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 0x5c3759
cmp word [eax + 7], 0xffff
je 0x5c3759
mov ax, word [eax + 9]
cmp ax, 0xffff
je 0x5c3759
mov ecx, dword [esi + 0xcc]
test ecx, ecx
movzx eax, ax
je 0x5c3759
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 0x5c3759
cmp word [eax + 0xa], 0
je 0x5c3759
mov edx, dword [eax]
push 0
mov ecx, eax
call dword [edx]
cmp byte [eax + 0x1d], 2
je 0x5c386c
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 0x5c37c7
cmp dword [eax + 7], 0xffff
je 0x5c37c7
mov ax, word [eax + 0xb]
cmp ax, 0xffff
je 0x5c37c7
mov ecx, dword [esi + 0xcc]
test ecx, ecx
movzx eax, ax
je 0x5c37c7
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 0x5c37c7
cmp word [eax + 0xa], 0
je 0x5c37c7
mov edx, dword [eax]
push 0
mov ecx, eax
call dword [edx]
cmp byte [eax + 0x1d], 2
je 0x5c386c
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 0x5c37e9
xor al, al
jmp 0x5c3829
mov di, word [ecx + 0xa]
test di, di
jne 0x5c37f6
xor al, al
jmp 0x5c3829
xor edx, edx
cmp di, 1
je 0x5c380c
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 0x5c386c
test al, al
jne 0x5c386c
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 [0x77ff08]
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 0x5c36b7
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 0x5c3690
mov ecx, dword [0x77ff08]
mov edx, dword [ecx]
call dword [edx + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x3c
ret 4