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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0xec]
test eax, eax
je 0x407955
lea edi, [esi + 0x3c]
mov ebx, 0x10
mov eax, dword [edi]
sub eax, ebp
mov dword [edi], eax
jns 0x40794f
call fcn.00456d3d
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, 0x80010003
shl ecx, 2
imul ecx
add edx, ecx
sar edx, 0xe
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 0x14]
mov dword [edi], ecx
add edi, 4
dec ebx
jne 0x40791f
mov eax, dword [esi + 0xa4]
test eax, eax
je 0x407aa8
mov ecx, esi
call fcn.004086a0
mov edx, dword [esi + 0xa0]
mov ecx, dword [esi + 0xd0]
add edx, ebp
test ecx, ecx
mov dword [esi + 0xa0], edx
mov eax, edx
je 0x407991
cdq
idiv dword [esi + 0xa4]
mov dword [esi + 0xa0], edx
mov ebx, dword [esi + 0xa0]
mov edi, dword [esi + 0xa4]
cmp ebx, edi
mov dword [esp + 0x20], edi
jl 0x4079f4
mov edx, dword [esi + 0x98]
mov eax, dword [esi + 0x9c]
mov ecx, dword [esi + 0xb8]
mov dword [esi + 0x88], edx
mov edx, dword [esi + 0xbc]
mov dword [esi + 0x8c], eax
mov eax, dword [esi + 0xc8]
mov dword [esi + 0xa8], ecx
mov dword [esi + 0xc0], eax
xor eax, eax
mov dword [esi + 0xac], edx
mov dword [esi + 0xa4], eax
mov dword [esi + 0xa0], eax
jmp 0x407aa1
mov eax, dword [esi + 0x90]
mov edx, dword [esi + 0x98]
mov ecx, edi
imul edx, ebx
sub ecx, ebx
mov dword [esp + 0x24], ebx
imul eax, ecx
add eax, edx
mov dword [esp + 0x80], ecx
cdq
fild dword [esp + 0x80]
idiv edi
fild dword [esp + 0x24]
fild dword [esp + 0x20]
fld st(1)
fmul dword [esi + 0xb8]
fld st(3)
fmul dword [esi + 0xb0]
faddp st(1)
mov edx, dword [esi + 0x9c]
imul edx, ebx
fdiv st(1)
mov dword [esi + 0x88], eax
mov eax, dword [esi + 0x94]
imul eax, ecx
fstp dword [esi + 0xa8]
fxch st(1)
fmul dword [esi + 0xbc]
fxch st(2)
fmul dword [esi + 0xb4]
faddp st(2)
fxch st(1)
fdiv st(1)
add eax, edx
cdq
idiv edi
fstp dword [esi + 0xac]
fstp st(0)
mov dword [esi + 0x8c], eax
mov eax, dword [esi + 0xc4]
imul eax, ecx
mov ecx, dword [esi + 0xc8]
imul ecx, ebx
add eax, ecx
cdq
idiv edi
mov dword [esi + 0xc0], eax
mov ecx, esi
call fcn.004086a0
mov edx, dword [esi + 0xe8]
mov ecx, dword [esi + 0xec]
add edx, ebp
test ecx, ecx
mov dword [esi + 0xe8], edx
mov eax, edx
je 0x407df2
sub eax, ebp
mov ecx, esi
push eax
call fcn.00407e00
mov edx, dword [esi + 0xe8]
mov ecx, esi
push edx
mov dword [esp + 0x40], eax
call fcn.00407e00
fild dword [esi + 0x34]
mov dword [esp + 0x40], eax
fmul dword [esi + 0xa8]
fmul dword [0x4896bc]
call fcn.0045676c
fild dword [esi + 0x38]
mov ecx, dword [esi + 0x88]
sub ecx, eax
fmul dword [esi + 0xac]
mov dword [esp + 0x34], ecx
fmul dword [0x4896bc]
call fcn.0045676c
mov ecx, dword [esi + 0x8c]
mov dword [esp + 0x18], 0
sub ecx, eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x24], eax
mov ecx, dword [ecx]
mov dword [esp + 0x30], ecx
mov edx, dword [ecx + 0xc]
test edx, edx
jle 0x407dd5
mov edx, dword [ecx + 8]
mov ebx, dword [edx + eax*4]
mov dword [esp + 0x20], ebx
mov eax, dword [ebx + 0x24]
test eax, eax
jne 0x407b70
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
xor eax, eax
cmp edx, ecx
jmp 0x407b78
mov ecx, dword [esp + 0x18]
xor eax, eax
test ecx, ecx
sete al
test eax, eax
jne 0x407dbd
mov ecx, dword [esi + 0xcc]
mov eax, dword [ebx]
and ecx, 1
je 0x407b97
mov edx, dword [esi + 0x34]
sub edx, eax
jmp 0x407b9c
mov edx, dword [ebx + 0x10]
add edx, eax
test ecx, ecx
mov dword [esp + 0x10], edx
je 0x407bb4
mov ecx, dword [esi + 0x34]
mov edi, dword [ebx + 0x10]
sub ecx, edi
sub ecx, eax
mov dword [esp + 0x14], ecx
jmp 0x407bb8
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmul dword [esi + 0xa8]
fadd dword [0x4896bc]
call fcn.0045676c
mov edx, dword [ebx + 4]
mov edi, eax
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul dword [esi + 0xac]
fadd dword [0x4896bc]
call fcn.0045676c
fild dword [esp + 0x10]
mov ebp, eax
fmul dword [esi + 0xa8]
fadd dword [0x4896bc]
call fcn.0045676c
mov edx, dword [esp + 0x14]
mov ebx, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 0x14]
add ecx, edx
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
fmul dword [esi + 0xac]
fadd dword [0x4896bc]
call fcn.0045676c
mov cl, byte [esi + 0xcc]
mov dword [esp + 0x78], eax
test cl, 2
je 0x407d70
fild dword [esi + 0x34]
fmul dword [esi + 0xa8]
fstp dword [esp + 0x20]
fild dword [esi + 0x38]
fmul dword [esi + 0xac]
fstp dword [esp + 0x14]
fild dword [esp + 0x38]
fld dword [esp + 0x14]
call fcn.00456d6a
fsub dword [esp + 0x14]
fst dword [esp + 0x10]
fild dword [0x4990c4]
fxch st(1)
fcompp
fnstsw ax
test ah, 1
je 0x407dbd
fld dword [esp + 0x20]
fstp qword [esp + 0x28]
fild dword [esp + 0x34]
fld qword [esp + 0x28]
call fcn.00456d6a
fsub qword [esp + 0x28]
fstp dword [esp + 0x28]
mov edx, dword [esp + 0x28]
fild dword [0x4990c0]
mov dword [esp + 0x80], edx
fcomp dword [esp + 0x80]
fnstsw ax
test ah, 0x41
jne 0x407d4d
fld dword [esp + 0x10]
call fcn.0045676c
mov dword [esp + 0x48], eax
fld dword [esp + 0x80]
call fcn.0045676c
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x78]
push edx
push eax
lea eax, [esp + 0x54]
mov dword [esp + 0x54], edi
push eax
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ecx
call dword [0x489498]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x64]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x68]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0x7c]
call fcn.00402ee0
fld dword [esp + 0x80]
fadd dword [esp + 0x20]
fstp dword [esp + 0x80]
fild dword [0x4990c0]
fcomp dword [esp + 0x80]
fnstsw ax
test ah, 0x41
je 0x407cce
fld dword [esp + 0x10]
fadd dword [esp + 0x14]
fstp dword [esp + 0x10]
fild dword [0x4990c4]
fcomp dword [esp + 0x10]
fnstsw ax
test ah, 0x41
je 0x407c9e
jmp 0x407dbd
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x68], eax
push ecx
lea eax, [esp + 0x60]
push edx
push eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebx
call dword [0x489498]
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x74]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x78]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0x7c]
call fcn.00402ee0
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
inc eax
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x24], eax
cmp eax, edx
jl 0x407b51
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
inc eax
add edx, 4
cmp eax, 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jl 0x407b36
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 4