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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x64]
mov dword [esp + 0x1c], edi
sub eax, 2
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
jne 0x4078d4
lea eax, [esp + 0x40]
lea ecx, [esp + 0x48]
push eax
push ecx
push esi
mov ecx, edi
call fcn.004074b0
test eax, eax
je 0x4078d4
lea edx, [esp + 0x40]
lea eax, [esp + 0x48]
push edx
push eax
push esi
call fcn.00405160
fdiv dword [0x45a3b4]
mov edx, dword [edi + 0x1f8]
add esp, 0xc
mov eax, dword [esi + 0xb4]
push 0x3f800000
push ecx
mov ecx, dword [edi + 0x1fc]
fstp dword [esp]
fld dword [esi + 8]
push ecx
push edx
push eax
call fcn.0043d2c4
fld dword [esi + 4]
push eax
call fcn.0043d2c4
push eax
call fcn.00424cd0
add esp, 0x1c
mov dword [esp + 0x10], 1
mov eax, dword [esi + 0x64]
sub eax, 2
jne 0x407bad
add edi, 0x2c0
mov dword [esp + 0x14], 0x40
mov dword [esp + 0xc], edi
mov edi, dword [edi]
test edi, edi
je 0x407b93
cmp esi, edi
je 0x407b93
cmp dword [edi + 0x64], 2
jne 0x407b93
fld dword [esi + 4]
fsub dword [edi + 4]
fld dword [esi + 8]
fsub dword [edi + 8]
xor ebx, ebx
xor ecx, ecx
mov bl, byte [edi + 0x5e]
mov cl, byte [esi + 0x5e]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
add ebx, ecx
faddp st(1)
call fcn.0043d2c4
mov edx, ebx
imul edx, ebx
fstp st(0)
fstp st(0)
cmp eax, edx
jg 0x407b93
xor eax, eax
xor ecx, ecx
mov al, byte [edi + 0x5d]
mov cl, byte [edi + 0x5c]
mov dword [esp + 0x18], eax
xor edx, edx
fild dword [esp + 0x18]
mov dword [esp + 0x18], ecx
mov dl, byte [esi + 0x5d]
xor eax, eax
fmul dword [0x45a388]
mov al, byte [esi + 0x5c]
fstp dword [esp + 0x38]
fild dword [esp + 0x18]
mov dword [esp + 0x18], edx
fmul dword [0x45a388]
fstp dword [esp + 0x3c]
fild dword [esp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x70], eax
fmul dword [0x45a388]
fstp dword [esp + 0x30]
fild dword [esp + 0x18]
fmul dword [0x45a388]
fstp dword [esp + 0x34]
fld dword [esi + 0x14]
fstp dword [esp + 0x20]
fld dword [esi + 0x10]
fchs
fstp dword [esp + 0x24]
fld dword [edi + 0x14]
fstp dword [esp + 0x50]
fld dword [edi + 0x10]
fchs
fstp dword [esp + 0x54]
fld dword [edi + 4]
fsub dword [esi + 4]
fld dword [edi + 8]
fsub dword [esi + 8]
fld st(0)
fmul dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
fld st(2)
fmul dword [esp + 0x20]
mov dword [esp + 0x68], ecx
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x74], ecx
mov eax, dword [esp + 0x54]
faddp st(1)
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x7c], eax
fstp dword [esp + 0x28]
fld dword [esp + 0x74]
fmul st(1)
fld dword [esp + 0x70]
fmul st(3)
mov dword [esp + 0x78], edx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], edx
faddp st(1)
fstp dword [esp + 0x2c]
xor edi, edi
fstp st(0)
fstp st(0)
lea eax, [esp + 0x78]
lea ecx, [esp + edi + 0x58]
mov edx, 2
fld dword [eax + 4]
fmul dword [esp + edi + 0x6c]
fld dword [eax]
fmul dword [esp + edi + 0x68]
add ecx, 4
add eax, 8
dec edx
faddp st(1)
fstp dword [ecx - 4]
jne 0x407a47
add edi, 8
cmp edi, 0x10
jl 0x407a3a
lea ecx, [esp + 0x5c]
xor edx, edx
fld dword [esp + edx + 0x30]
fld dword [ecx - 4]
fcomp dword [0x45a378]
fld dword [ecx - 4]
fnstsw ax
test ah, 0x41
je 0x407a89
fchs
fld dword [ecx]
fcomp dword [0x45a378]
fld dword [ecx]
fnstsw ax
test ah, 0x41
je 0x407a9c
fchs
fld dword [esp + edx + 0x28]
fabs
fxch st(1)
fmul dword [esp + 0x3c]
fxch st(2)
fmul dword [esp + 0x38]
faddp st(2)
fxch st(1)
fadd st(2)
fcompp
fnstsw ax
test ah, 1
fstp st(0)
jne 0x407b93
add edx, 4
add ecx, 8
cmp edx, 8
jl 0x407a70
xor ecx, ecx
fld dword [esp + ecx + 0x58]
fcomp dword [0x45a378]
fld dword [esp + ecx + 0x58]
fnstsw ax
test ah, 0x41
je 0x407ae7
fchs
fld dword [esp + ecx + 0x60]
fcomp dword [0x45a378]
fld dword [esp + ecx + 0x60]
fnstsw ax
test ah, 0x41
je 0x407afe
fchs
fld dword [esp + 0x2c]
fmul dword [esp + ecx + 0x60]
fld dword [esp + 0x28]
fmul dword [esp + ecx + 0x58]
faddp st(1)
fabs
fxch st(1)
fmul dword [esp + 0x34]
fxch st(2)
fmul dword [esp + 0x30]
faddp st(2)
fld dword [esp + ecx + 0x38]
faddp st(2)
fxch st(1)
fcompp
fnstsw ax
test ah, 1
jne 0x407b93
add ecx, 4
cmp ecx, 8
jl 0x407ad0
mov eax, dword [esp + 0xc]
mov eax, dword [eax]
push eax
push esi
call fcn.004052e0
fdiv dword [0x45a3bc]
mov eax, dword [esp + 0x24]
add esp, 8
mov edx, dword [eax + 0x1f8]
push 0x3f800000
push ecx
mov ecx, dword [eax + 0x1fc]
mov eax, dword [esi + 0xb8]
fstp dword [esp]
fld dword [esi + 8]
push ecx
push edx
push eax
call fcn.0043d2c4
fld dword [esi + 4]
push eax
call fcn.0043d2c4
push eax
call fcn.00424cd0
add esp, 0x1c
mov dword [esp + 0x10], 1
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
add edi, 4
dec eax
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], eax
jne 0x4078f2
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407bc1
inc byte [esi + 0x61]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [esi + 0x61], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4