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

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push ebp
mov ebp, ebx
imul ebp, ebp, 0x158
push esi
mov esi, ecx
mov eax, dword [esi + 0x328]
push edi
lea edi, [eax + ebp]
mov al, byte [edi + 0x130]
test al, al
jne 0x582372
mov al, byte [esi + 0x19c]
test al, al
je 0x582372
mov eax, dword [esi + 0x24c]
test eax, eax
jle 0x582372
mov ecx, dword [edi + 0x11c]
cmp ecx, dword [esp + 0x124]
jne 0x58242d
fld dword [esp + 0x128]
call fcn.0061672c
cmp dword [edi + 0x120], eax
ja 0x58242d
mov byte [edi + 0x130], 1
call dword [sym.imp.winmm.dll_timeGetTime]
mov edx, dword [esi + 0x328]
mov dword [edx + ebp + 0x138], eax
mov eax, dword [esi + 0x328]
mov edx, dword [eax + ebp]
add eax, ebp
xor ecx, ecx
cmp edx, ecx
mov dword [esp + 0x30], ecx
jle 0x58242d
mov dword [esp + 0x14], ecx
mov edi, dword [eax + 0x12c]
add edi, dword [esp + 0x14]
je 0x58233b
mov ecx, dword [esi + 0x200]
mov dword [edi + 0x2c], ecx
mov edx, dword [esi + 0x328]
mov eax, dword [edx + ebp + 0x134]
push eax
mov ecx, edi
call fcn.005e2c20
mov ecx, dword [esi + 0x328]
mov edx, dword [ecx + ebp + 0x104]
mov dword [edi + 0x1c], edx
mov eax, dword [esi + 0x328]
mov ecx, dword [eax + ebp + 0x10c]
fld dword [eax + ebp + 0x110]
fstp dword [edi + 0x4c]
mov dword [edi + 0x48], ecx
add eax, ebp
lea edx, [esi + 0x1e0]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [esp + 0x44], eax
fld dword [esp + 0x44]
fmul dword [0x664da0]
mov eax, dword [esi + 0x1a4]
mov dword [esp + 0x4c], edx
fld dword [esp + 0x4c]
fmul dword [0x664da0]
mov dword [esp + 0x48], ecx
lea ebx, [esi + 0x1a0]
fxch st(1)
fadd dword [ebx]
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x40]
fstp dword [esp + 0x3c]
mov eax, dword [esp + 0x3c]
fadd dword [ebx + 8]
sub esp, 0xc
mov edx, esp
mov dword [edx], eax
mov dword [edx + 4], ecx
fstp dword [esp + 0x50]
mov eax, dword [esp + 0x50]
mov dword [edx + 8], eax
sub esp, 0xc
mov ecx, ebx
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 edx, dword [esi + 0x328]
lea eax, [edx + ebp]
mov dword [esp + 0x94], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x8c], 0
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
mov ecx, dword [eax + 0x140]
mov dword [esp + 0x8c], ecx
mov edx, dword [eax + 0x144]
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x90], edx
mov eax, dword [eax + 0x148]
mov dword [esp + 0x94], eax
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
push ecx
push edx
push eax
lea ecx, [esp + 0xe8]
push ecx
call fcn.004f908f
lea edx, [esp + 0xdc]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0xa4]
push ecx
call fcn.004f82b4
mov al, byte [esi + 0x37c]
test al, al
je 0x5820f2
mov edx, dword [esp + 0x134]
mov eax, dword [esp + 0x130]
mov ecx, dword [esp + 0x12c]
push edx
push eax
push ecx
jmp 0x582129
fld dword [esp + 0xd4]
mov edx, dword [esi + 0x328]
fadd dword [esi + 0x1a8]
sub esp, 0xc
fstp dword [esp + 8]
fld dword [edx + ebp + 0x144]
fadd dword [esi + 0x1a4]
fstp dword [esp + 4]
fld dword [esp + 0xd8]
fadd dword [ebx]
fstp dword [esp]
mov ecx, edi
call fcn.005e2a20
mov eax, dword [esi + 0x118]
test eax, eax
mov dword [esp + 0x34], 0
je 0x582151
push eax
mov ecx, 0x69f328
call fcn.005298b0
test al, al
jne 0x582159
fld dword [0x64fc90]
jmp 0x582192
mov ecx, dword [esi + 0x118]
push 0x65a378
call fcn.0058fbc0
mov ecx, dword [esi + 0x118]
mov ebx, eax
call fcn.0044ceb0
test ebx, ebx
je 0x58218c
add ebx, 0x50
je 0x582184
fmul dword [ebx + 0x34]
jmp 0x582192
fmul dword [0x64fe60]
jmp 0x582192
fstp st(0)
fld dword [esp + 0x34]
mov eax, dword [esi + 0x1f0]
fadd dword [eax + 4]
mov ecx, dword [eax]
mov edx, dword [eax + 8]
mov eax, dword [esi + 0x328]
mov dword [esp + 0x18], ecx
fstp dword [esp + 0x1c]
fld dword [eax + ebp + 0x150]
lea ecx, [eax + ebp + 0x150]
fcomp dword [0x64fe74]
mov dword [esp + 0x20], edx
fnstsw ax
test ah, 0x41
jne 0x5822c3
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]
fadd dword [0x65eb20]
fmul dword [0x664d9c]
fstp dword [esp + 0x24]
call fcn.006167ae
and eax, 0x80000001
jns 0x582211
dec eax
or eax, 0xfffffffe
inc eax
je 0x582221
fld dword [esp + 0x24]
fmul dword [0x65a944]
fstp dword [esp + 0x24]
call fcn.006167ae
cdq
idiv ebx
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 0x582252
dec eax
or eax, 0xfffffffe
inc eax
je 0x582262
fld dword [esp + 0x28]
fmul dword [0x65a944]
fstp dword [esp + 0x28]
call fcn.006167ae
cdq
idiv ebx
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 0x582293
dec eax
or eax, 0xfffffffe
inc eax
fld dword [esp + 0x2c]
je 0x58229f
fmul dword [0x65a944]
fld dword [esp + 0x18]
fadd dword [esp + 0x24]
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fadd dword [esp + 0x28]
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fadd st(1)
fstp dword [esp + 0x20]
fstp st(0)
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
mov ecx, edi
call fcn.005e2a40
mov ecx, edi
call fcn.005e2c70
mov ecx, dword [esi + 0x328]
mov edx, dword [ecx + ebp + 0x154]
push 1
mov ecx, edi
mov dword [edi + 0x68], edx
call fcn.005e2af0
mov eax, dword [esi + 0x328]
lea ecx, [eax + ebp + 4]
push ecx
push 0
mov ecx, edi
call fcn.005e2e80
mov dword [edi + 0x3c], 1
mov edx, dword [esi + 0x328]
mov eax, dword [edx + ebp + 0x108]
mov ecx, edi
mov dword [edi + 0x50], eax
call fcn.005e4bc0
mov ecx, dword [esi + 0x328]
mov edx, dword [ecx + ebp + 0x13c]
mov dword [edi + 0x64], edx
mov eax, dword [esi + 0x328]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x14]
mov edx, dword [eax + ebp]
add eax, ebp
inc ecx
add edi, 0xbc
cmp ecx, edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x14], edi
jl 0x581ef0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 0x18
mov ecx, dword [edi + 0x124]
cmp ecx, dword [esp + 0x124]
jne 0x582403
fld dword [esp + 0x128]
call fcn.0061672c
cmp dword [edi + 0x128], eax
ja 0x582403
mov edx, dword [esi + 0x328]
mov byte [edx + ebp + 0x131], 1
mov eax, dword [esi + 0x328]
mov ecx, dword [eax + ebp + 0x12c]
test ecx, ecx
je 0x58242d
mov ecx, eax
mov eax, dword [ecx + ebp + 0x12c]
test eax, eax
je 0x5823e5
mov edx, dword [eax - 4]
lea edi, [eax - 4]
push fcn.005e4d10
push edx
push 0xbc
push eax
call fcn.0061682e
push edi
call fcn.00616a81
add esp, 4
mov eax, dword [esi + 0x328]
mov dword [eax + ebp + 0x12c], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 0x18
mov edx, dword [esp + 0x12c]
mov eax, dword [esp + 0x130]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x140]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
push ebx
mov ecx, esi
call fcn.005805a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 0x18