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

Disassembly:
sub esp, 0x10c
push ebx
push edi
mov edi, ecx
call dword [sym.imp.winmm.dll_timeGetTime]
mov ecx, dword [edi + 0x354]
mov dword [ecx + 0x40], eax
mov eax, dword [edi + 0x354]
mov ecx, dword [eax]
xor ebx, ebx
cmp ecx, ebx
mov dword [esp + 0x2c], ebx
jle 0x580591
push ebp
push esi
mov dword [esp + 0x20], ebx
jmp 0x580160
xor ebx, ebx
lea esp, [esp]
mov esi, dword [eax + 0x18]
mov ecx, dword [esp + 0x20]
mov eax, dword [esi + ecx]
add esi, ecx
cmp eax, ebx
mov dword [esp + 0x30], ebx
jle 0x580568
jmp 0x580180
mov eax, dword [esi + 0x12c]
test eax, eax
je 0x58054f
lea edx, [edi + 0x1e0]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x3c], ecx
push eax
mov ecx, eax
push ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x48], edx
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 + 0xe8]
fmul dword [0x6654b0]
fstp dword [esp]
push edx
call fcn.004f908f
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x80], eax
lea eax, [esp + 0xdc]
mov dword [esp + 0x84], ecx
push eax
lea ecx, [esp + 0x54]
mov dword [esp + 0x8c], edx
push ecx
lea edx, [esp + 0x98]
push edx
mov dword [esp + 0x88], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x98], 0x3f800000
mov dword [esp + 0x84], 0x3f800000
mov dword [esp + 0x70], 0x3f800000
mov dword [esp + 0x5c], 0x3f800000
call fcn.004f82b4
mov al, byte [edi + 0x37c]
test al, al
je 0x58030a
mov eax, dword [esp + 0x128]
mov ecx, dword [esp + 0x124]
mov edx, dword [esp + 0x120]
push eax
push ecx
push edx
jmp 0x58033f
fld dword [esp + 0xc8]
sub esp, 0xc
fadd dword [edi + 0x1a8]
fstp dword [esp + 8]
fld dword [esp + 0xd0]
fadd dword [edi + 0x1a4]
fstp dword [esp + 4]
fld dword [esp + 0xcc]
fadd dword [edi + 0x1a0]
fstp dword [esp]
mov ecx, dword [esi + 0x12c]
add ecx, ebx
call fcn.005e2a20
mov eax, dword [esp + 0xc0]
mov ecx, dword [esp + 0xc4]
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x44], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x18], ecx
push eax
mov ecx, eax
push ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x24], edx
call fcn.004f7a20
mov edx, dword [edi + 0x354]
fld dword [edx + 8]
fmul dword [0x64fc90]
call fcn.0061672c
mov ebp, eax
call fcn.006167ae
cdq
idiv ebp
mov eax, dword [esi + 0x12c]
mov ecx, dword [edi + 0x354]
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]
mov eax, dword [ebx + eax + 0x10]
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 [esp + 0x20]
fstp dword [esp + 0x1c]
mov edx, dword [ecx + 0x18]
fld dword [edx + eax + 0x150]
lea ecx, [edx + eax + 0x150]
fcomp dword [0x64fe74]
fnstsw ax
test ah, 0x41
jne 0x58051c
fld dword [ecx]
fmul dword [0x652fc4]
call fcn.0061672c
mov ebp, eax
call fcn.006167ae
cdq
idiv ebp
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fadd dword [0x65eb20]
fmul dword [0x664d9c]
fstp dword [esp + 0x24]
call fcn.006167ae
and eax, 0x80000001
jns 0x58046a
dec eax
or eax, 0xfffffffe
inc eax
je 0x58047a
fld dword [esp + 0x24]
fmul dword [0x65a944]
fstp dword [esp + 0x24]
call fcn.006167ae
cdq
idiv ebp
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fadd dword [0x65eb20]
fmul dword [0x664d9c]
fstp dword [esp + 0x28]
call fcn.006167ae
and eax, 0x80000001
jns 0x5804ab
dec eax
or eax, 0xfffffffe
inc eax
je 0x5804bb
fld dword [esp + 0x28]
fmul dword [0x65a944]
fstp dword [esp + 0x28]
call fcn.006167ae
cdq
idiv ebp
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fadd dword [0x65eb20]
fmul dword [0x664d9c]
fstp dword [esp + 0x2c]
call fcn.006167ae
and eax, 0x80000001
jns 0x5804ec
dec eax
or eax, 0xfffffffe
inc eax
fld dword [esp + 0x2c]
je 0x5804f8
fmul dword [0x65a944]
fld dword [esp + 0x14]
fadd dword [esp + 0x24]
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fadd dword [esp + 0x28]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fadd st(1)
fstp dword [esp + 0x1c]
fstp st(0)
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x12c]
push edx
push eax
add ecx, ebx
call fcn.005e2a40
push 0
lea ecx, [esp + 0xd4]
push ecx
mov ecx, dword [esi + 0x12c]
add ecx, ebx
call fcn.005e6450
mov eax, dword [esp + 0x30]
mov ecx, dword [esi]
inc eax
add ebx, 0xbc
cmp eax, ecx
mov dword [esp + 0x30], eax
jl 0x580180
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x20]
mov eax, dword [edi + 0x354]
mov edx, dword [eax]
inc ecx
add esi, 0x158
cmp ecx, edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], esi
jl 0x580157
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x10c
ret 0xc