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

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, ecx
cmp byte [ebx + 0x12d], 0
je 0x487f2b
cmp dword [ebx + 0x111], 0
je 0x487f2b
push esi
mov esi, dword [0x5c99e0]
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x48]
push ecx
call esi
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x38]
push eax
call esi
mov ecx, dword [esp + 0x4c]
sub ecx, dword [esp + 0x44]
je 0x487f2a
mov edx, dword [esp + 0x50]
sub edx, dword [esp + 0x48]
je 0x487f2a
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x2c]
push edx
call dword [0x5c9804]
test eax, eax
je 0x487f2a
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x28]
mov dword [esp + 0x14], eax
je 0x487f2a
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
sub eax, edx
mov dword [esp + 0x10], eax
je 0x487f2a
push ebp
mov ebp, dword [esp + 0x40]
sub ebp, dword [esp + 0x38]
mov dword [esp + 0x10], ebp
je 0x487f29
mov ecx, dword [esp + 0x44]
push edi
mov edi, dword [esp + 0x40]
sub ecx, edi
mov dword [esp + 0x28], ecx
je 0x487f28
mov esi, dword [esp + 0x4c]
mov eax, esi
sub eax, edx
cdq
idiv ebp
mov ebp, dword [esp + 0x50]
mov eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [esp + 0x24], eax
mov eax, ebp
sub eax, dword [esp + 0x30]
cdq
idiv ecx
mov eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x54]
sub eax, esi
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x14]
jne 0x487acb
mov edx, dword [esp + 0x58]
sub edx, ebp
cmp edx, ecx
jne 0x487acb
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x2c]
push 0xffffffffffffffff
push 0xffffffffffffffff
sub edi, ebp
sub eax, esi
add eax, ecx
add edi, edx
push edi
push eax
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x2c]
push eax
push edx
mov edx, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x94]
push ecx
push edx
mov ecx, ebx
call fcn.00485a70
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x5c
ret 0x3c
test byte [esp + 0x74], 1
je 0x487cf7
cmp byte [ebx + 0x11d], 4
jne 0x487cf7
mov eax, dword [esp + 0x18]
lea eax, [eax*4 + 3]
and eax, 0xfffffffc
imul eax, dword [esp + 0x1c]
add eax, 0x7c
push eax
call fcn.00510ac5
movzx dx, byte [ebx + 0x11d]
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x3c]
mov ebp, eax
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
add dx, dx
mov dword [ebx + 0x99], ecx
add dx, dx
mov dword [ebx + 0x95], eax
mov eax, dword [0x658580]
add dx, dx
mov word [ebx + 0x9f], dx
lea esi, [ebx + 0x91]
mov ecx, 0x1f
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
add esp, 4
cmp dword [eax + 8], 0
mov dword [esp + 0x18], eax
je 0x487ba5
mov edx, dword [eax + 0x24]
mov esi, dword [eax + 0x20]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push 0xcc0020
push eax
push ecx
mov dword [esp + 0x80], edx
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x48]
sub edx, eax
mov eax, dword [esp + 0x44]
push edx
sub eax, ecx
push eax
push 0
push 0
push esi
call dword [0x5c9180]
jmp 0x487c1d
call dword [0x5c99bc]
push eax
call dword [0x5c99c0]
mov edi, eax
push edi
call dword [0x5c9188]
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x2c]
mov esi, eax
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
push eax
push ecx
push edi
call dword [0x5c90ac]
mov edi, dword [0x5c91bc]
push eax
push esi
mov dword [esp + 0x7c], eax
call edi
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x70]
push 0xcc0020
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x34]
push eax
push ecx
push edx
mov edx, dword [esp + 0x48]
sub edx, eax
mov eax, dword [esp + 0x44]
push edx
sub eax, ecx
push eax
push 0
push 0
push esi
call dword [0x5c9180]
mov ecx, dword [esp + 0x1c]
push ecx
push esi
call edi
mov edx, dword [esp + 0x38]
sub edx, dword [esp + 0x30]
mov eax, dword [esp + 0x74]
push 0
push ebp
lea edi, [ebp + 0x7c]
push edi
push edx
push 0
push eax
push esi
call dword [0x5c90a0]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0x48]
sub edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x24]
push 4
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [ebx + 0x111]
push ecx
mov ecx, dword [esp + 0x4c]
sub ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x4c]
sub edx, dword [esp + 0x44]
add eax, 0x7c
push eax
push ecx
push edx
push edi
mov ecx, ebx
call fcn.00486e70
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
push 0
push ebp
push edi
sub eax, ecx
push eax
push 0
push 0
push 0
push eax
mov eax, dword [esp + 0x4c]
sub edx, eax
push edx
push ecx
push eax
mov eax, dword [esp + 0x9c]
push eax
call dword [0x5c90b0]
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 8], 0
jne 0x487ce4
push 0
call dword [0x5c99bc]
push eax
call dword [0x5c99c4]
push esi
call dword [0x5c9184]
mov edx, dword [esp + 0x74]
push edx
call dword [0x5c91c0]
push ebp
call fcn.00510b8f
add esp, 4
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x5c
ret 0x3c
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x2c]
cmp esi, ecx
jge 0x487d3e
sub ecx, esi
mov dword [esp + 0x74], ecx
fild dword [esp + 0x74]
push ecx
fimul dword [esp + 0x18]
fidiv dword [esp + 0x14]
fstp dword [esp + 0x78]
fld dword [esp + 0x78]
fstp dword [esp]
call fcn.004804f0
add esp, 4
call fcn.005151b0
add eax, dword [esp + 0x3c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
cmp ebp, ecx
mov dword [esp + 0x60], edi
jge 0x487d89
mov edx, dword [esp + 0x58]
sub ecx, ebp
mov dword [esp + 0x74], ecx
fild dword [esp + 0x74]
sub edx, ebp
mov dword [esp + 0x74], edx
push ecx
fimul dword [esp + 0x2c]
fidiv dword [esp + 0x78]
fstp dword [esp + 0x78]
fld dword [esp + 0x78]
fstp dword [esp]
call fcn.004804f0
add esp, 4
call fcn.005151b0
add eax, edi
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
cmp esi, ecx
jge 0x487dde
mov edx, dword [esp + 0x14]
sub ecx, esi
mov dword [esp + 0x74], ecx
fild dword [esp + 0x74]
mov dword [esp + 0xa8], edx
mov dword [esp + 0x28], eax
push ecx
fimul dword [esp + 0xac]
fidiv dword [esp + 0x2c]
fstp dword [esp + 0x78]
fld dword [esp + 0x78]
fstp dword [esp]
call fcn.004804d0
add esp, 4
call fcn.005151b0
mov ebp, dword [esp + 0x50]
mov edi, dword [esp + 0x40]
mov esi, eax
add esi, dword [esp + 0x3c]
jmp 0x487de2
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
cmp ebp, eax
jge 0x487e37
mov ecx, dword [esp + 0x48]
sub eax, ebp
mov dword [esp + 0x74], eax
fild dword [esp + 0x74]
sub ecx, edi
mov dword [esp + 0xa8], ecx
mov ecx, dword [esp + 0x58]
fimul dword [esp + 0xa8]
sub ecx, ebp
mov dword [esp + 0x28], ecx
push ecx
fidiv dword [esp + 0x2c]
fstp dword [esp + 0x78]
fld dword [esp + 0x78]
fstp dword [esp]
call fcn.004804d0
add esp, 4
call fcn.005151b0
mov edi, dword [esp + 0x40]
add eax, edi
jmp 0x487e39
mov eax, edi
mov ecx, dword [esp + 0x44]
cmp esi, ecx
jle 0x487e43
mov esi, ecx
mov edx, dword [esp + 0x48]
cmp eax, edx
jle 0x487e4d
mov eax, edx
sub esi, dword [esp + 0x5c]
sub eax, dword [esp + 0x60]
mov dword [esp + 0x74], esi
mov ebp, eax
test esi, esi
jle 0x487f28
test ebp, ebp
jle 0x487f28
mov eax, ecx
sub eax, dword [esp + 0x3c]
cmp esi, eax
jle 0x487e79
mov dword [esp + 0x74], eax
mov eax, edx
sub eax, edi
cmp ebp, eax
jle 0x487e83
mov ebp, eax
movzx cx, byte [ebx + 0x11d]
mov edx, dword [ebx + 0x115]
mov eax, dword [ebx + 0x119]
add cx, cx
mov dword [ebx + 0x95], edx
mov edx, dword [esp + 0x70]
add cx, cx
push 4
neg eax
add cx, cx
push edx
mov dword [ebx + 0x99], eax
mov word [ebx + 0x9f], cx
call dword [0x5c9224]
mov edi, dword [ebx + 0x111]
mov edx, dword [esp + 0x5c]
push 0xcc0020
push 0
lea esi, [ebx + 0x91]
mov ecx, 0x1f
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x111]
mov ecx, dword [ebx + 0x119]
push eax
add eax, 0x7c
push eax
mov eax, dword [esp + 0x84]
push ebp
push eax
mov eax, dword [esp + 0x48]
sub ecx, ebp
sub ecx, dword [esp + 0x78]
push ecx
mov ecx, dword [esp + 0x54]
push edx
mov edx, dword [esp + 0x54]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x50]
sub edx, ecx
push edx
push eax
mov eax, dword [esp + 0x9c]
push ecx
push eax
call dword [0x5c9228]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x5c
ret 0x3c