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

Disassembly:
sub esp, 0xf8
push ebp
mov ebp, dword [esp + 0x100]
push esi
push edi
mov al, byte [ebp + 0x52]
mov dword [esp + 0xc], 0
test al, al
je 0x405869
mov eax, dword [ebp + 0x60]
lea ecx, [esp + 0x44]
push eax
push 1
push ecx
call fcn.00404240
mov edx, dword [ebp + 0x64]
lea eax, [esp + 0xd0]
push edx
push 2
push eax
call fcn.00404240
lea ecx, [esp + 0xdc]
lea edx, [esp + 0x5c]
push ecx
push edx
call fcn.00404320
mov eax, dword [ebp + 0x68]
lea ecx, [esp + 0xe4]
push eax
push 3
push ecx
call fcn.00404240
lea edx, [esp + 0xf0]
lea eax, [esp + 0x70]
push edx
push eax
call fcn.00404320
add esp, 0x34
lea esi, [esp + 0x44]
lea edi, [esp + 0x84]
jmp 0x405873
lea esi, [ebp + 0xac]
lea edi, [esp + 0x44]
mov eax, dword [esp + 0x110]
mov ecx, 0x10
test eax, eax
rep movsd dword es:[edi], dword [esi]
je 0x405893
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.00404320
add esp, 8
mov al, byte [ebp + 0x52]
test al, al
je 0x4058cd
mov edx, dword [ebp + 0x5c]
mov eax, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x54]
push edx
push eax
lea edx, [esp + 0xcc]
push ecx
push edx
call fcn.004042e0
lea eax, [esp + 0xd4]
lea ecx, [esp + 0x94]
push eax
push ecx
call fcn.00404320
add esp, 0x18
jmp 0x4058de
lea esi, [ebp + 0x6c]
mov ecx, 0x10
lea edi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x4058fa
lea edx, [esp + 0x84]
push eax
push edx
call fcn.00404320
add esp, 8
lea esi, [ebp + 0x10]
mov edi, 0x10
mov eax, dword [esi]
test eax, eax
je 0x40591e
lea ecx, [esp + 0x44]
lea edx, [esp + 0x84]
push ecx
push edx
push eax
call fcn.004057e0
add esp, 0xc
add esi, 4
dec edi
jne 0x405902
mov eax, dword [ebp + 4]
test eax, eax
je 0x40624f
cmp dword [ebp], 0
je 0x40624f
mov eax, dword [0x450a08]
sub esp, 0xc
fld dword [eax + 0x38]
fchs
fstp dword [esp + 8]
fld dword [eax + 0x34]
fchs
fstp dword [esp + 4]
fld dword [eax + 0x30]
fchs
fstp dword [esp]
lea eax, [esp + 0xd0]
push eax
call fcn.004042e0
lea ecx, [esp + 0xd4]
lea edx, [esp + 0x94]
push ecx
push edx
call fcn.00404320
lea eax, [esp + 0x9c]
push 0x4509c8
push eax
call fcn.00404320
lea ecx, [esp + 0x64]
push 0x4509c8
push ecx
call fcn.00404320
mov ecx, dword [ebp]
mov eax, dword [ebp + 8]
add esp, 0x28
fld dword [eax + 8]
fmul dword [esp + 0x8c]
fld dword [eax + 4]
fmul dword [esp + 0x88]
add eax, 0x30
dec ecx
faddp st(1)
fld dword [esp + 0x84]
fmul dword [eax - 0x30]
faddp st(1)
fadd dword [esp + 0x90]
fstp dword [eax - 0x24]
fld dword [eax - 0x28]
fmul dword [esp + 0x9c]
fld dword [eax - 0x2c]
fmul dword [esp + 0x98]
faddp st(1)
fld dword [esp + 0x94]
fmul dword [eax - 0x30]
faddp st(1)
fadd dword [esp + 0xa0]
fstp dword [eax - 0x20]
fld dword [eax - 0x28]
fmul dword [esp + 0xac]
fld dword [eax - 0x2c]
fmul dword [esp + 0xa8]
faddp st(1)
fld dword [esp + 0xa4]
fmul dword [eax - 0x30]
faddp st(1)
fadd dword [esp + 0xb0]
fstp dword [eax - 0x1c]
fld dword [eax - 0x14]
fmul dword [esp + 0x48]
fld dword [eax - 0x10]
fmul dword [esp + 0x4c]
faddp st(1)
fld dword [eax - 0x18]
fmul dword [esp + 0x44]
faddp st(1)
fadd dword [esp + 0x50]
fstp dword [eax - 0xc]
fld dword [eax - 0x14]
fmul dword [esp + 0x58]
fld dword [eax - 0x10]
fmul dword [esp + 0x5c]
faddp st(1)
fld dword [eax - 0x18]
fmul dword [esp + 0x54]
faddp st(1)
fadd dword [esp + 0x60]
fstp dword [eax - 8]
fld dword [eax - 0x14]
fmul dword [esp + 0x68]
fld dword [eax - 0x10]
fmul dword [esp + 0x6c]
faddp st(1)
fld dword [eax - 0x18]
fmul dword [esp + 0x64]
faddp st(1)
fadd dword [esp + 0x70]
fstp dword [eax - 4]
jne 0x4059a7
mov edx, dword [ebp + 4]
mov ecx, dword [0x461420]
mov esi, dword [ebp + 0xc]
mov eax, dword [0x450a38]
add ecx, edx
push ebx
mov dword [0x461420], ecx
mov ebx, dword [ebp + 4]
mov edi, eax
add eax, ebx
mov dword [0x450a38], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x40], eax
lea ebx, [edi + edi*2]
mov eax, 0xffffff88
mov dword [esp + 0x38], edi
shl ebx, 2
sub eax, esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], eax
mov al, byte [ebp + 0x50]
test al, al
jne 0x405aeb
mov ecx, dword [esi + 0x18]
test byte [ecx + 0x4c], 2
je 0x405b0c
fld dword [esi + 0x14]
fmul dword [esp + 0x50]
fld dword [esi + 0x10]
fmul dword [esp + 0x4c]
faddp st(1)
fld dword [esi + 0xc]
fmul dword [esp + 0x48]
faddp st(1)
fadd dword [esp + 0x54]
fstp dword [esp + 0x10]
fld dword [esi + 0x10]
fmul dword [esp + 0x5c]
fld dword [esi + 0x14]
fmul dword [esp + 0x60]
test al, al
faddp st(1)
fld dword [esi + 0xc]
fmul dword [esp + 0x58]
faddp st(1)
fadd dword [esp + 0x64]
fstp dword [esp + 0x28]
fld dword [esi + 0x10]
fmul dword [esp + 0x6c]
fld dword [esi + 0x14]
fmul dword [esp + 0x70]
faddp st(1)
fld dword [esi + 0xc]
fmul dword [esp + 0x68]
faddp st(1)
fadd dword [esp + 0x74]
fstp dword [esp + 0x24]
je 0x405b7e
mov eax, dword [esi]
fld dword [eax + 0x14]
fmul dword [esp + 0x24]
fld dword [eax + 0x10]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [eax + 0xc]
fmul dword [esp + 0x10]
faddp st(1)
fcomp qword [0x447670]
fnstsw ax
test ah, 5
jp 0x406225
push esi
call fcn.00401b80
add esp, 4
test eax, eax
je 0x406225
cmp eax, 2
mov eax, dword [0x450a3c]
setne dl
mov byte [ebx + eax + 8], dl
mov ebx, dword [esi + 0x18]
mov dword [esp + 0x30], ebx
mov al, byte [ebx + 0x4c]
test al, 6
mov byte [esp + 0x1b], al
je 0x405e44
fld dword [esi + 0x74]
test al, 2
je 0x405e13
mov ecx, dword [0x450a40]
xor ebp, ebp
test ecx, ecx
jbe 0x405e13
mov ecx, dword [0x450a20]
add ecx, 4
mov edx, dword [0x450a0c]
fld dword [0x447578]
mov edi, dword [edx + ebp*4]
mov bl, byte [edi]
mov dl, bl
and dl, 4
je 0x405c83
mov eax, dword [esi]
fstp st(0)
fld dword [ecx - 4]
fsub dword [eax + 0xc]
fstp dword [esp + 0x14]
fld dword [ecx]
fsub dword [eax + 0x10]
fstp dword [esp + 0x20]
fld dword [ecx + 4]
fsub dword [eax + 0x14]
fst dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fcom qword [0x447648]
fnstsw ax
and eax, 0x4100
jne 0x405c62
fsqrt
fdivr dword [0x447564]
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x20]
fmul st(1)
fstp dword [esp + 0x20]
fmul dword [esp + 0x1c]
fstp dword [esp + 0x1c]
jmp 0x405c64
fstp st(0)
fld dword [esp + 0x1c]
fmul dword [esp + 0x24]
fld dword [esp + 0x20]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x10]
faddp st(1)
fmul dword [edi + 0x10]
test bl, 2
je 0x405db5
mov eax, dword [esi]
fld dword [ecx - 4]
fsub dword [eax + 0xc]
test dl, dl
fstp dword [esp + 0x14]
fld dword [ecx]
fsub dword [eax + 0x10]
fstp dword [esp + 0x20]
fld dword [ecx + 4]
fsub dword [eax + 0x14]
fstp dword [esp + 0x1c]
je 0x405d44
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x447620]
fsubr qword [0x447568]
fst dword [esp + 0x14]
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jp 0x405d02
fld dword [esp + 0x14]
fld qword [0x447580]
fcompp
fnstsw ax
test ah, 5
jp 0x405d35
fld dword [esp + 0x14]
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jp 0x405d23
fld dword [esp + 0x14]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x405db5
fld qword [0x447568]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x405db5
fld qword [0x447580]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x405db5
fstp st(0)
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x447620]
fsubr qword [0x447568]
fld st(0)
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jp 0x405d91
fld st(0)
fld qword [0x447580]
fcompp
fnstsw ax
test ah, 5
jp 0x405daa
fld st(0)
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jnp 0x405db2
fstp st(0)
fld qword [0x447568]
jmp 0x405db2
fstp st(0)
fld qword [0x447580]
fmul dword [edi + 0x10]
cmp bl, 1
jne 0x405dd7
fstp st(0)
fld dword [ecx + 4]
fmul dword [esp + 0x24]
fld dword [ecx - 4]
fmul dword [esp + 0x10]
faddp st(1)
fld dword [ecx]
fmul dword [esp + 0x28]
faddp st(1)
fmul dword [edi + 0x10]
fcom qword [0x447580]
fnstsw ax
and eax, 0x4100
jne 0x405dea
faddp st(1)
jmp 0x405dfe
mov eax, dword [esp + 0x10c]
mov dl, byte [eax + 0x51]
test dl, dl
je 0x405dfc
fsubp st(1)
jmp 0x405dfe
fstp st(0)
mov eax, dword [0x450a40]
inc ebp
add ecx, 0xc
cmp ebp, eax
jb 0x405bd8
mov al, byte [esp + 0x1b]
mov ebx, dword [esp + 0x30]
test al, 4
je 0x405e3f
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov eax, dword [esi]
fld dword [ecx + 0x14]
fadd dword [edx + 0x14]
fadd dword [eax + 0x14]
fld dword [ebx + 0x28]
fmul qword [0x447600]
fdivp st(1)
fsubr qword [0x447568]
faddp st(1)
fstp dword [esi + 0x70]
jmp 0x405e4b
mov dword [esi + 0x70], 0
test byte [ebx + 0x4d], 2
je 0x405ee7
mov edi, dword [esi]
fld dword [edi + 0x24]
fmul qword [0x447668]
fadd qword [0x447668]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x58], eax
fld dword [edi + 0x28]
fmul qword [0x447668]
fsubr qword [0x447668]
call sub.MSVCRT.dll__ftol
mov edi, dword [esi + 4]
mov dword [esi + 0x64], eax
fld dword [edi + 0x24]
fmul qword [0x447668]
fadd qword [0x447668]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x5c], eax
fld dword [edi + 0x28]
fmul qword [0x447668]
fsubr qword [0x447668]
call sub.MSVCRT.dll__ftol
mov edi, dword [esi + 8]
mov dword [esi + 0x68], eax
fld dword [edi + 0x24]
fmul qword [0x447668]
fadd qword [0x447668]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x60], eax
fld dword [edi + 0x28]
fmul qword [0x447668]
fsubr qword [0x447668]
call sub.MSVCRT.dll__ftol
mov dword [esi + 0x6c], eax
test byte [ebx + 0x4c], 0x18
je 0x4061d4
lea ecx, [esi + 0x78]
mov dword [esp + 0x30], 3
mov dword [esp + 0x24], ecx
mov eax, dword [esi + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x44], eax
mov al, byte [eax + 0x4c]
fld dword [edx + 0xc]
test al, 8
mov byte [esp + 0x2f], al
je 0x40616f
mov ecx, dword [0x450a40]
mov dword [esp + 0x28], 0
test ecx, ecx
jbe 0x40616f
mov ecx, dword [esp + 0x3c]
mov eax, edx
mov edx, dword [0x450a20]
lea ebp, [eax + ecx]
lea ecx, [edx + 4]
mov edx, dword [esp + 0x28]
mov eax, dword [0x450a0c]
fld dword [0x447578]
mov edi, dword [eax + edx*4]
mov bl, byte [edi]
and bl, 4
je 0x405fd7
mov edx, dword [esi + ebp]
fstp st(0)
fld dword [ecx - 4]
fsub dword [edx + 0xc]
fstp dword [esp + 0x10]
fld dword [ecx]
fsub dword [edx + 0x10]
fld dword [ecx + 4]
fsub dword [edx + 0x14]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
faddp st(1)
fcom qword [0x447648]
fnstsw ax
and eax, 0x4100
jne 0x405fb5
fsqrt
fdivr dword [0x447564]
fld dword [esp + 0x10]
fmul st(1)
fstp dword [esp + 0x10]
fld st(0)
fmulp st(3)
fmulp st(1)
jmp 0x405fb7
fstp st(0)
fld dword [edx + 0x2c]
fmul st(1)
fld dword [edx + 0x28]
fmul st(3)
faddp st(1)
fld dword [edx + 0x24]
fmul dword [esp + 0x10]
mov edx, dword [esp + 0x28]
faddp st(1)
fmul dword [edi + 0x10]
fstp st(2)
fstp st(0)
mov al, byte [edi]
test al, 2
mov byte [esp + 0x1b], al
je 0x40610b
mov eax, dword [esi + ebp]
fld dword [ecx - 4]
fsub dword [eax + 0xc]
test bl, bl
fstp dword [esp + 0x10]
fld dword [ecx]
fsub dword [eax + 0x10]
fld dword [ecx + 4]
fsub dword [eax + 0x14]
je 0x406096
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x447620]
fsubr qword [0x447568]
fstp dword [esp + 0x10]
fstp st(0)
fstp st(0)
fld dword [esp + 0x10]
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jp 0x406054
fld dword [esp + 0x10]
fld qword [0x447580]
fcompp
fnstsw ax
test ah, 5
jp 0x406087
fld dword [esp + 0x10]
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jp 0x406075
fld dword [esp + 0x10]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x40610b
fld qword [0x447568]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x40610b
fld qword [0x447580]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x40610b
fstp st(0)
fstp st(0)
fstp st(0)
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x447620]
fsubr qword [0x447568]
fld st(0)
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jp 0x4060e7
fld st(0)
fld qword [0x447580]
fcompp
fnstsw ax
test ah, 5
jp 0x406100
fld st(0)
fcomp qword [0x447568]
fnstsw ax
test ah, 5
jnp 0x406108
fstp st(0)
fld qword [0x447568]
jmp 0x406108
fstp st(0)
fld qword [0x447580]
fmul dword [edi + 0x10]
cmp byte [esp + 0x1b], 1
jne 0x40612f
mov eax, dword [esi + ebp]
fstp st(0)
fld dword [eax + 0x2c]
fmul dword [ecx + 4]
fld dword [eax + 0x24]
fmul dword [ecx - 4]
faddp st(1)
fld dword [eax + 0x28]
fmul dword [ecx]
faddp st(1)
fmul dword [edi + 0x10]
fcom qword [0x447580]
fnstsw ax
and eax, 0x4100
jne 0x406142
faddp st(1)
jmp 0x406156
mov eax, dword [esp + 0x10c]
mov bl, byte [eax + 0x51]
test bl, bl
je 0x406154
fsubp st(1)
jmp 0x406156
fstp st(0)
mov eax, dword [0x450a40]
inc edx
add ecx, 0xc
cmp edx, eax
mov dword [esp + 0x28], edx
jb 0x405f49
mov al, byte [esp + 0x2f]
test al, 0x10
je 0x40618c
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
mov edx, dword [ecx - 0x78]
fld dword [edx + 0x14]
fdiv dword [eax + 0x28]
fsubr qword [0x447568]
faddp st(1)
fcom dword [0x447578]
fnstsw ax
test ah, 5
jp 0x4061a1
fstp st(0)
fld dword [0x447578]
fcom qword [0x447568]
fnstsw ax
and eax, 0x4100
jne 0x4061b8
fstp st(0)
fld dword [0x447564]
mov eax, dword [esp + 0x24]
fstp dword [eax]
add eax, 4
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp + 0x30], eax
jne 0x405f00
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov ebp, dword [esp + 0x10c]
fld dword [ecx + 0x14]
fadd dword [edx + 0x14]
mov ecx, dword [0x450a3c]
fadd dword [eax + 0x14]
mov eax, dword [esp + 0x34]
add eax, 0xc
mov dword [esp + 0x34], eax
fstp dword [eax + ecx - 0xc]
mov edx, dword [0x450a3c]
mov ebx, dword [esp + 0x34]
mov dword [eax + edx - 8], esi
mov edx, dword [esp + 0x38]
mov eax, dword [0x461424]
inc edx
inc eax
mov dword [esp + 0x38], edx
mov dword [0x461424], eax
mov edi, edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add esi, 0x90
sub ecx, 0x90
dec eax
mov dword [0x450a38], edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
jne 0x405adb
pop ebx
pop edi
pop esi
pop ebp
add esp, 0xf8
ret