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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x64]
push ebx
push ebp
push esi
push edi
mov edi, 1
cmp eax, edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], edi
jle 0x58744e
fild dword [esp + 0x74]
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0x3fe00000
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0x40000000
fstp qword [esp + 0x24]
fld qword [0x788568]
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 0x41
jne 0x587413
fld qword [esp + 0x24]
fsub qword [0x7856f8]
fmul qword [0x785728]
fst qword [esp + 0x38]
fadd qword [0x7856f8]
fstp qword [esp + 0x30]
jmp 0x587413
fstp st(0)
mov ecx, 0xa57948
call fcn.005764d0
fmul qword [esp + 0x38]
fadd qword [esp + 0x30]
fcom qword [0x7856f8]
fnstsw ax
test ah, 1
jne 0x587411
fcom qword [esp + 0x24]
fnstsw ax
test ah, 0x41
je 0x587411
call fcn.0076a6b0
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
lea eax, [edi + eax*4]
shl eax, 2
cmp edi, 2
mov ecx, dword [eax + 0x7cbaa8]
mov ebp, dword [eax + 0x7cbb28]
mov dword [esp + 0x30], ecx
jne 0x5874df
mov ecx, 0xa581b8
call fcn.0062fc90
xor ebx, ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ebx
fild qword [esp + 0x40]
fmul qword [0x790db8]
fcomp qword [0x790d58]
fnstsw ax
test ah, 1
je 0x5874e1
lea esi, [ebp - 1]
mov dword [esp + 0x4c], ebx
lea edx, [esi - 6]
mov dword [esp + 0x48], edx
fild qword [esp + 0x48]
fstp qword [esp + 0x14]
mov ecx, 0xa581b8
call fcn.0062fc90
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ebx
fild qword [esp + 0x50]
fmul qword [esp + 0x14]
fmul qword [0x790db8]
fadd qword [0x78b5d0]
call fcn.0076a6b0
cmp eax, esi
ja 0x5874ae
jmp 0x587520
xor ebx, ebx
lea esi, [ebp - 1]
mov dword [esp + 0x5c], ebx
lea eax, [esi + 1]
mov dword [esp + 0x58], eax
fild qword [esp + 0x58]
fstp qword [esp + 0x14]
mov ecx, 0xa581b8
call fcn.0062fc90
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ebx
fild qword [esp + 0x60]
fmul qword [esp + 0x14]
fmul qword [0x790db8]
call fcn.0076a6b0
cmp eax, esi
ja 0x5874f7
cmp ebp, ebx
mov dword [esp + 0x14], eax
jle 0x5875bc
mov ecx, dword [esp + 0x14]
xor esi, esi
lea eax, [ebx + ecx]
cdq
idiv ebp
mov eax, dword [esp + 0x30]
mov edx, dword [eax + edx*4]
lea ecx, [edx + edx*2]
lea edi, [ecx*4 + 0xa57c98]
mov ecx, dword [ecx*4 + 0xa57c98]
test ecx, ecx
jle 0x58756a
mov eax, dword [edi + 4]
add eax, 4
mov edx, dword [esp + 0x1c]
cmp dword [eax], edx
je 0x58756a
inc esi
add eax, 8
cmp esi, ecx
jl 0x58755a
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x2c]
push 1
push 1
mov eax, dword [eax + esi*8]
mov dx, word [ecx]
mov dword [esp + 0x70], eax
sub dx, ax
mov ax, word [ecx + 2]
mov word [esp + 0x28], dx
sub ax, word [esp + 0x72]
lea edx, [esp + 0x40]
mov word [esp + 0x2a], ax
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x40], ecx
mov ecx, dword [edi + 8]
call fcn.00586190
test al, al
jne 0x5875e8
inc ebx
cmp ebx, ebp
jl 0x58752c
mov edi, dword [esp + 0x10]
xor ebx, ebx
mov edx, dword [esp + 0x74]
lea eax, [edi + 1]
lea ecx, [edx + 1]
cdq
idiv ecx
cmp edx, ebx
mov dword [esp + 0x10], edx
jne 0x5875dd
mov dword [esp + 0x10], 1
mov edx, dword [esp + 0x10]
cmp edx, dword [esp + 0x24]
je 0x587637
jmp 0x58744a
mov edx, dword [edi + 4]
mov ecx, dword [esp + 0x2c]
mov eax, dword [edx + esi*8]
mov dx, word [ecx]
mov dword [esp + 0x68], eax
sub dx, ax
mov ax, word [ecx + 2]
mov ecx, dword [esp + 0x7c]
sub ax, word [esp + 0x6a]
mov word [esp + 0x74], dx
mov word [esp + 0x76], ax
mov edx, dword [esp + 0x74]
mov dword [ecx], edx
mov ecx, dword [esp + 0x78]
mov eax, dword [edi + 8]
mov edx, dword [esp + 0x80]
mov dword [ecx], eax
pop edi
mov dword [edx], esi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x60
ret 0x10
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
mov word [esp + 0x74], bx
mov word [esp + 0x76], bx
mov edx, dword [esp + 0x74]
mov dword [eax], 0xffff
mov eax, dword [esp + 0x80]
pop edi
mov dword [ecx], edx
pop esi
mov dword [eax], 0xffffffff
pop ebp
xor al, al
pop ebx
add esp, 0x60
ret 0x10