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

Disassembly:
sub esp, 0x158
push ebx
push ebp
push esi
mov esi, ecx
mov al, byte [esi + 0x358]
test al, al
push edi
je 0x581e2b
mov edi, dword [esi + 0x354]
xor ebp, ebp
cmp edi, ebp
je 0x581e2b
mov al, byte [edi + 0x30]
test al, al
jne 0x581d64
mov eax, dword [edi + 0x20]
cmp eax, dword [esp + 0x170]
jne 0x581e2b
fld dword [esp + 0x174]
call fcn.0061672c
cmp dword [edi + 0x24], eax
jg 0x581e2b
mov byte [edi + 0x30], 1
call dword [sym.imp.winmm.dll_timeGetTime]
mov ecx, dword [esi + 0x354]
mov dword [ecx + 0x40], eax
mov eax, dword [esi + 0x354]
cmp dword [eax], ebp
mov dword [esp + 0x3c], ebp
jle 0x581e2b
nop
mov edx, dword [eax + 0x18]
mov eax, dword [edx + ebp]
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x40], ecx
jle 0x581d38
mov dword [esp + 0x2c], ecx
jmp 0x581710
mov eax, dword [esi + 0x354]
mov ecx, dword [eax + 0x18]
mov edi, dword [ecx + ebp + 0x12c]
mov edx, dword [esp + 0x2c]
add ecx, ebp
add edi, edx
mov edx, dword [eax + 0xc]
mov dword [ecx + 0x14c], edx
je 0x581d0d
mov eax, dword [esi + 0x200]
mov dword [edi + 0x2c], eax
mov ecx, dword [esi + 0x354]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + ebp + 0x134]
push eax
mov ecx, edi
call fcn.005e2c20
call fcn.006167ae
mov ecx, dword [esi + 0x354]
mov edx, dword [ecx + 0x18]
fld dword [edx + ebp + 0x104]
mov ebx, eax
call fcn.0061672c
mov ecx, eax
mov eax, ebx
cdq
idiv ecx
lea ebx, [esi + 0x1a0]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fadd dword [0x658c68]
fstp dword [edi + 0x1c]
mov edx, dword [esi + 0x354]
mov eax, dword [edx + 0x18]
fld dword [eax + ebp + 0x110]
mov ecx, dword [eax + ebp + 0x10c]
fstp dword [edi + 0x4c]
add eax, ebp
mov dword [edi + 0x48], ecx
lea eax, [esi + 0x1e0]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x20], edx
fld dword [esp + 0x20]
fmul dword [0x664da0]
mov edx, dword [eax + 8]
mov eax, dword [ebx + 4]
mov dword [esp + 0x28], edx
fstp dword [esp + 0x20]
mov dword [esp + 0x24], ecx
fld dword [esp + 0x28]
lea ecx, [esp + 0x9c]
fmul dword [0x664da0]
push ecx
mov dword [esp + 0x8c], eax
mov ecx, dword [esp + 0x8c]
fstp dword [esp + 0x2c]
sub esp, 0xc
fld dword [esp + 0x30]
mov edx, esp
fadd dword [ebx]
sub esp, 0xc
mov dword [esp + 0x40], 0
fstp dword [esp + 0xa0]
mov eax, dword [esp + 0xa0]
fld dword [esp + 0x44]
mov dword [edx], eax
fadd dword [ebx + 8]
mov dword [edx + 4], ecx
mov ecx, ebx
fstp dword [esp + 0xa8]
mov eax, dword [esp + 0xa8]
mov dword [edx + 8], eax
mov eax, dword [ecx]
mov edx, esp
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
mov ecx, esi
call fcn.0057fa70
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov eax, dword [esi + 0x354]
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x80], 0x3f800000
mov dword [esp + 0x6c], 0x3f800000
mov dword [esp + 0x58], 0x3f800000
mov dword [esp + 0x44], 0x3f800000
mov edx, dword [eax + 0x34]
mov dword [esp + 0x74], edx
mov ecx, dword [eax + 0x38]
mov dword [esp + 0x78], ecx
mov edx, dword [eax + 0x3c]
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0x9c]
push eax
mov dword [esp + 0x80], edx
mov edx, dword [esp + 0xa4]
push ecx
push edx
lea eax, [esp + 0xf4]
push eax
call fcn.004f908f
lea ecx, [esp + 0xe8]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0xb0]
push eax
call fcn.004f82b4
mov al, byte [esi + 0x37c]
test al, al
je 0x581960
mov ecx, dword [esp + 0x180]
mov edx, dword [esp + 0x17c]
mov eax, dword [esp + 0x178]
push ecx
push edx
push eax
jmp 0x581991
fld dword [esp + 0xe0]
sub esp, 0xc
fadd dword [esi + 0x1a8]
fstp dword [esp + 8]
fld dword [esp + 0xe8]
fadd dword [esi + 0x1a4]
fstp dword [esp + 4]
fld dword [esp + 0xe4]
fadd dword [ebx]
fstp dword [esp]
mov ecx, edi
call fcn.005e2a20
mov ecx, dword [esi + 0x1e0]
mov edx, dword [esi + 0x1e4]
mov eax, dword [esi + 0x1e8]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], edx
push ecx
mov edx, ecx
push edx
mov dword [esp + 0x30], eax
call fcn.004f7a20
call fcn.006167ae
cdq
mov ecx, 0x168
idiv ecx
push ecx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul dword [0x6654b0]
fstp dword [esp]
call fcn.006167ae
cdq
mov ecx, 0x168
idiv ecx
push ecx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fmul dword [0x6654b0]
fstp dword [esp]
call fcn.006167ae
cdq
mov ecx, 0x168
idiv ecx
push ecx
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
lea edx, [esp + 0x134]
fmul dword [0x6654b0]
fstp dword [esp]
push edx
call fcn.004f908f
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x128]
mov dword [esp + 0x78], ecx
push eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x80], edx
push ecx
lea edx, [esp + 0xb0]
push edx
mov dword [esp + 0x7c], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x8c], 0x3f800000
mov dword [esp + 0x78], 0x3f800000
mov dword [esp + 0x64], 0x3f800000
mov dword [esp + 0x50], 0x3f800000
call fcn.004f82b4
mov eax, dword [esp + 0xd8]
mov ecx, dword [esp + 0xdc]
mov edx, dword [esp + 0xe0]
mov dword [esp + 0x90], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x98], edx
mov dword [esp + 0x1c], edx
push eax
mov ecx, eax
push ecx
call fcn.004f7a20
mov edx, dword [esi + 0x354]
fld dword [edx + 8]
fmul dword [0x64fc90]
call fcn.0061672c
mov ebx, eax
call fcn.006167ae
cdq
idiv ebx
mov eax, dword [edi + 0x10]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul dword [0x658c68]
fadd dword [0x658c68]
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fmul st(1)
fstp dword [esp + 0x18]
fmul dword [esp + 0x1c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x14]
fadd dword [eax]
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fadd dword [eax + 4]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fadd dword [eax + 8]
mov eax, dword [esi + 0x354]
fstp dword [esp + 0x1c]
mov ecx, dword [eax + 0x18]
fld dword [ecx + ebp + 0x150]
lea ecx, [ecx + ebp + 0x150]
fcomp dword [0x64fe74]
fnstsw ax
test ah, 0x41
jne 0x581c89
fld dword [ecx]
fmul dword [0x652fc4]
call fcn.0061672c
mov ebx, eax
call fcn.006167ae
cdq
idiv ebx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul dword [0x664d9c]
fstp dword [esp + 0x30]
call fcn.006167ae
and eax, 0x80000001
jns 0x581be3
dec eax
or eax, 0xfffffffe
inc eax
je 0x581bf3
fld dword [esp + 0x30]
fmul dword [0x65a944]
fstp dword [esp + 0x30]
call fcn.006167ae
cdq
idiv ebx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul dword [0x664d9c]
fstp dword [esp + 0x34]
call fcn.006167ae
and eax, 0x80000001
jns 0x581c1e
dec eax
or eax, 0xfffffffe
inc eax
je 0x581c2e
fld dword [esp + 0x34]
fmul dword [0x65a944]
fstp dword [esp + 0x34]
call fcn.006167ae
cdq
idiv ebx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul dword [0x664d9c]
fstp dword [esp + 0x38]
call fcn.006167ae
and eax, 0x80000001
jns 0x581c59
dec eax
or eax, 0xfffffffe
inc eax
fld dword [esp + 0x38]
je 0x581c65
fmul dword [0x65a944]
fld dword [esp + 0x14]
fadd dword [esp + 0x30]
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fadd dword [esp + 0x34]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fadd st(1)
fstp dword [esp + 0x1c]
fstp st(0)
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push edx
push eax
push ecx
mov ecx, edi
call fcn.005e2a40
mov ecx, edi
call fcn.005e2c70
mov edx, dword [esi + 0x354]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + ebp + 0x154]
mov dword [edi + 0x68], ecx
push 1
mov ecx, edi
call fcn.005e2af0
mov edx, dword [esi + 0x354]
mov eax, dword [edx + 0x18]
lea ecx, [eax + ebp + 4]
push ecx
push 0
mov ecx, edi
call fcn.005e2e80
mov dword [edi + 0x3c], 1
mov edx, dword [esi + 0x354]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + ebp + 0x108]
mov dword [edi + 0x50], ecx
mov ecx, edi
call fcn.005e4bc0
mov edx, dword [esi + 0x354]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + ebp + 0x13c]
mov dword [edi + 0x64], ecx
mov edx, dword [esi + 0x354]
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x2c]
mov ecx, dword [edx + 0x18]
mov edx, dword [ecx + ebp]
inc eax
add edi, 0xbc
cmp eax, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], edi
jl 0x581710
mov ecx, dword [esp + 0x3c]
mov eax, dword [esi + 0x354]
mov edx, dword [eax]
inc ecx
add ebp, 0x158
cmp ecx, edx
mov dword [esp + 0x3c], ecx
jl 0x5816f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret 0x18
mov edx, dword [edi + 0x28]
cmp edx, dword [esp + 0x170]
jne 0x581e02
fld dword [esp + 0x174]
call fcn.0061672c
cmp dword [edi + 0x2c], eax
jg 0x581e02
mov byte [edi + 0x31], 1
mov eax, dword [esi + 0x354]
cmp dword [eax], ebp
jle 0x581e2b
xor ebx, ebx
lea ecx, [ecx]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + ebx + 0x12c]
test eax, eax
je 0x581de2
mov ecx, dword [eax - 4]
lea edi, [eax - 4]
push fcn.005e4d10
push ecx
push 0xbc
push eax
call fcn.0061682e
push edi
call fcn.00616a81
mov edx, dword [esi + 0x354]
mov eax, dword [edx + 0x18]
add esp, 4
mov dword [eax + ebx + 0x12c], 0
mov eax, dword [esi + 0x354]
mov ecx, dword [eax]
inc ebp
add ebx, 0x158
cmp ebp, ecx
jl 0x581da0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret 0x18
mov edx, dword [esp + 0x178]
mov eax, dword [esp + 0x17c]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x18c]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov ecx, esi
call fcn.00580120
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret 0x18