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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x43f517
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
push ebx
push esi
push edi
mov eax, dword [0x44dd70]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0x20]
xor ebx, ebx
sub eax, ebx
mov dword [esp + 0x1c], ebx
lea ecx, [ebx + 2]
je 0x40a5e9
mov edx, 1
sub eax, edx
je 0x40a5c7
sub eax, edx
jne 0x40a62d
mov eax, dword [ebp + 0x14]
mov dword [edi + 8], ebx
mov dword [edi + 0xc], edx
mov dword [edi + 4], ecx
mov dword [edi + 0x10], ecx
fld dword [eax]
fld dword [eax + 8]
fld dword [eax + 0x10]
fld dword [eax + 4]
fld dword [eax + 0xc]
fld dword [eax + 0x14]
jmp 0x40a60d
mov eax, dword [ebp + 0x14]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ebx
mov dword [edi + 4], edx
mov dword [edi + 0x10], edx
fld dword [eax + 0x10]
fld dword [eax]
fld dword [eax + 8]
fld dword [eax + 0x14]
fld dword [eax + 4]
fld dword [eax + 0xc]
jmp 0x40a60d
mov eax, dword [ebp + 0x14]
mov dword [edi + 8], 1
mov dword [edi + 0xc], ecx
mov dword [edi + 4], ebx
mov dword [edi + 0x10], ebx
fld dword [eax + 8]
fld dword [eax + 0x10]
fld dword [eax]
fld dword [eax + 0xc]
fld dword [eax + 0x14]
fld dword [eax + 4]
fxch st(5)
fstp dword [esp + 0x54]
fxch st(1)
fstp dword [esp + 0x58]
fxch st(2)
fstp dword [esp + 0x5c]
fxch st(1)
fstp dword [esp + 0x60]
fstp dword [esp + 0x64]
fstp dword [esp + 0x68]
fld qword [ebp + 0x18]
fld qword [0x443278]
fmul st(1)
fld qword [ebp + 0x2c]
fcom st(1)
fnstsw ax
test ah, 5
jp 0x40a648
fstp st(0)
jmp 0x40a64a
fstp st(1)
fld dword [esp + 0x54]
fld st(0)
fsub st(2)
fld dword [esp + 0x58]
fld st(0)
fadd st(4)
fsub st(2)
fdiv st(5)
call fcn.0043cdf0
fxch st(1)
fstp dword [edi + 0x24]
inc eax
fxch st(1)
mov dword [esp + 0x1c], eax
fstp dword [edi + 0x30]
mov dword [edi + 0x14], eax
fstp dword [edi + 0x34]
fld dword [esp + 0x5c]
fld st(0)
fsub st(2)
fld dword [esp + 0x60]
fld st(0)
fadd st(4)
fsub st(2)
fdiv st(5)
call fcn.0043cdf0
fxch st(1)
fstp dword [edi + 0x28]
lea esi, [eax + 1]
fxch st(1)
mov dword [edi + 0x18], esi
fstp dword [edi + 0x38]
fstp dword [edi + 0x3c]
fld dword [esp + 0x64]
fld st(0)
fsub st(2)
fld dword [esp + 0x68]
fld st(0)
faddp st(4)
fxch st(3)
fsub st(1)
fdivrp st(4)
fxch st(3)
call fcn.0043cdf0
imul esi, dword [esp + 0x1c]
fxch st(2)
fstp dword [edi + 0x2c]
fxch st(1)
fstp dword [edi + 0x40]
fstp dword [edi + 0x44]
inc eax
mov dword [edi + 0x1c], eax
xor ecx, ecx
mov eax, esi
mov edx, 0x10
mul edx
seto cl
mov dword [edi + 0x48], esi
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0xc0], 0
test eax, eax
je 0x40a738
push 0x409d20
push 0x4092d0
push esi
mov dword [eax], esi
add eax, 4
push 0x10
push eax
mov dword [esp + 0x30], eax
call fcn.0043ceb8
mov eax, dword [esp + 0x1c]
xor ecx, ecx
jmp 0x40a73c
xor ecx, ecx
xor eax, eax
mov dword [esp + 0xc0], 0xffffffff
mov dword [edi + 0x4c], eax
cmp eax, ecx
jne 0x40a77d
mov dword [edi + 0x4c], ecx
mov dword [edi + 0x48], ecx
mov dword [edi + 0x1c], ecx
mov dword [edi + 0x18], ecx
mov dword [edi + 0x14], ecx
mov dword [edi + 0x50], ecx
mov eax, 4
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x2c
fld qword [ebp + 0x18]
mov ecx, dword [ebp + 0x24]
fstp dword [edi + 0x20]
mov dword [edi + 0x50], ecx
mov esi, dword [edi + 0x14]
cmp esi, dword [edi + 0x18]
lea eax, [edi + 0x14]
lea edx, [edi + 0x18]
jg 0x40a799
mov eax, edx
mov esi, dword [eax]
cmp esi, dword [edi + 0x1c]
lea edx, [edi + 0x1c]
jg 0x40a7a5
mov eax, edx
mov eax, dword [eax]
push eax
call fcn.00409d60
test eax, eax
jne 0x40a760
xor esi, esi
xor ecx, ecx
cmp dword [edi + 0x48], esi
jle 0x40a7d6
lea ebx, [ebx]
mov edx, dword [edi + 0x4c]
mov dword [eax + edx], esi
mov edx, dword [edi + 0x4c]
mov dword [eax + edx + 4], esi
inc ecx
add eax, 0x10
cmp ecx, dword [edi + 0x48]
jl 0x40a7c0
mov eax, dword [ebp + 0x28]
cmp eax, esi
jne 0x40a7ee
mov eax, dword [ebp + 0x20]
cmp eax, esi
jne 0x40a7eb
mov eax, 2
jmp 0x40a800
dec eax
jmp 0x40a800
cmp eax, 1
mov eax, dword [ebp + 0x20]
jne 0x40a800
cmp eax, 2
jne 0x40a7ff
xor eax, eax
jmp 0x40a800
inc eax
sub eax, esi
je 0x40ac9b
sub eax, 1
je 0x40aa69
sub eax, 1
jne 0x40a9f5
fld dword [edi + 0x40]
lea eax, [esp + 0x2c]
fstp dword [esp + 0x28]
push eax
fld dword [edi + 0x44]
sub esp, 0x18
fstp dword [esp + 0x3c]
mov ecx, 0x44b108
fld qword [0x443438]
fstp qword [esp + 0x10]
fldz
fst qword [esp + 8]
fstp qword [esp]
call fcn.00409480
fld1
lea ecx, [esp + 0x24]
push ecx
sub esp, 0x18
fstp qword [esp + 0x10]
mov ecx, 0x44b108
fldz
fst qword [esp + 8]
fstp qword [esp]
call fcn.00409480
fld qword [ebp + 0xc]
cmp dword [edi + 0x14], esi
fmul st(0), st(0)
mov dword [esp + 0x18], esi
fstp qword [esp + 0x4c]
jle 0x40a9f5
fld qword [ebp + 0x18]
cmp dword [edi + 0x18], 0
fild dword [esp + 0x18]
mov edx, dword [edi + 8]
mov eax, dword [ebp + 8]
fmul st(1)
mov dword [esp + 0x14], 0
fadd dword [edi + 0x24]
fsub qword [eax + edx*8]
fmul st(0), st(0)
fstp qword [esp + 0x44]
jle 0x40a9e1
mov esi, dword [esp + 0x14]
mov ecx, dword [edi + 0x50]
mov edx, dword [ecx + 0x28]
mov dword [esp + 0x1c], edx
mov eax, esi
cdq
idiv dword [ecx + 0x2c]
cmp edx, dword [esp + 0x1c]
jne 0x40a9d3
fild dword [esp + 0x14]
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp + 8]
fmul st(1)
fadd dword [edi + 0x28]
fsub qword [ecx + eax*8]
fmul st(0), st(0)
fadd qword [esp + 0x44]
fcomp qword [esp + 0x4c]
fnstsw ax
test ah, 5
jp 0x40a9d3
push 0x18
fstp st(0)
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
mov dword [esp + 0x30], esi
test esi, esi
je 0x40a97e
fld dword [esp + 0x20]
mov edx, dword [esp + 0x24]
fstp dword [esp + 0x3c]
mov dword [esp + 0x40], edx
fld dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
fstp dword [esp + 0x34]
or ebx, 0x10
mov dword [esp + 0x38], eax
push 0x4092e0
push 0x4092e0
push 2
push 8
or ebx, 0x20
push esi
mov dword [esp + 0xd4], 0xd
mov dword [esp + 0x30], ebx
call fcn.0043ceb8
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
xor eax, eax
mov dword [esi], ecx
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 0xc], ecx
mov dword [esi + 4], edx
mov dword [esi + 8], eax
mov ecx, esi
xor esi, esi
jmp 0x40a982
xor esi, esi
xor ecx, ecx
test bl, 0x20
je 0x40a994
fldz
and ebx, 0xffffffdf
fstp dword [esp + 0x34]
mov dword [esp + 0x38], esi
mov dword [esp + 0xc0], 0xffffffff
test bl, 0x10
je 0x40a9b1
fldz
and ebx, 0xffffffef
fstp dword [esp + 0x3c]
mov dword [esp + 0x40], esi
cmp ecx, esi
je 0x40aa16
mov eax, dword [edi + 0x14]
fld qword [ebp + 0x18]
imul eax, dword [esp + 0x14]
add eax, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
shl eax, 4
add eax, dword [edi + 0x4c]
mov dword [eax], ecx
mov dword [eax + 4], ecx
inc esi
cmp esi, dword [edi + 0x18]
mov dword [esp + 0x14], esi
jl 0x40a8b5
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [edi + 0x14]
mov dword [esp + 0x18], eax
jl 0x40a887
fstp st(0)
mov ecx, edi
call fcn.004097e0
xor eax, eax
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x2c
mov eax, dword [edi + 0x4c]
cmp eax, esi
je 0x40aa3a
mov edx, dword [eax - 4]
lea ebx, [eax - 4]
push 0x409d20
push edx
push 0x10
push eax
call fcn.0043cf82
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [edi + 0x4c], esi
mov dword [edi + 0x48], esi
mov dword [edi + 0x1c], esi
mov dword [edi + 0x18], esi
mov dword [edi + 0x14], esi
mov dword [edi + 0x50], esi
mov eax, 4
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x2c
cmp dword [edi + 0x18], esi
fld qword [ebp + 0xc]
fmul st(0), st(0)
mov dword [esp + 0x14], esi
fstp qword [esp + 0x4c]
jle 0x40a9f5
mov eax, dword [esp + 0x14]
mov ecx, dword [edi + 0x50]
cdq
idiv dword [ecx + 0x2c]
mov esi, dword [ecx + 0x28]
cmp edx, esi
jne 0x40ac84
fild dword [esp + 0x14]
mov esi, dword [edi + 0xc]
mov eax, dword [ebp + 8]
add esi, esi
fmul qword [ebp + 0x18]
add esi, esi
add esi, esi
fadd dword [edi + 0x28]
fsub qword [esi + eax]
fst qword [esp + 0x44]
fmul st(0), st(0)
fsubr qword [esp + 0x4c]
fldz
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x40ac82
fabs
call sub.MSVCR90.dll__CIsqrt
mov eax, dword [edi + 0x10]
mov ecx, dword [ebp + 8]
add eax, eax
add eax, eax
add eax, eax
fld qword [eax + ecx]
fsub st(1)
fstp dword [esp + 0x24]
fld qword [eax + ecx]
mov ecx, dword [edi + 8]
fadd st(1)
add ecx, ecx
add ecx, ecx
add ecx, ecx
fstp dword [esp + 0x2c]
fld qword [esp + 0x44]
fld qword [ebp + 0xc]
fdiv st(1), st(0)
fxch st(1)
fst qword [esp + esi + 0x6c]
fstp qword [esp + esi + 0x54]
fldz
fst qword [esp + ecx + 0x6c]
fstp qword [esp + ecx + 0x54]
lea ecx, [esp + 0x20]
push ecx
fdivp st(1)
sub esp, 0x18
mov ecx, 0x44b108
fst qword [esp + eax + 0x88]
fchs
fstp qword [esp + eax + 0x70]
fld qword [esp + 0x80]
fstp qword [esp + 0x10]
fld qword [esp + 0x78]
fstp qword [esp + 8]
fld qword [esp + 0x70]
fstp qword [esp]
call fcn.00409480
fld qword [esp + 0x7c]
lea edx, [esp + 0x28]
push edx
sub esp, 0x18
fstp qword [esp + 0x10]
mov ecx, 0x44b108
fld qword [esp + 0x90]
fstp qword [esp + 8]
fld qword [esp + 0x88]
fstp qword [esp]
call fcn.00409480
xor esi, esi
cmp dword [edi + 0x14], esi
mov dword [esp + 0x1c], esi
jle 0x40ac84
jmp 0x40ab90
fild dword [esp + 0x1c]
fmul qword [ebp + 0x18]
fadd dword [edi + 0x24]
fld dword [edi + 0x30]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x40ac70
fld dword [edi + 0x34]
fcompp
fnstsw ax
test ah, 0x41
jne 0x40ac72
push 0x18
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
je 0x40ac18
fld dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
fstp dword [esp + 0x34]
mov dword [esp + 0x38], ecx
fld dword [esp + 0x24]
mov edx, dword [esp + 0x20]
fstp dword [esp + 0x3c]
or ebx, 4
mov dword [esp + 0x40], edx
push 0
push 0
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x48]
or ebx, 8
push edx
mov ecx, eax
mov dword [esp + 0xd0], 8
mov dword [esp + 0x2c], ebx
call fcn.004092f0
jmp 0x40ac1a
xor eax, eax
test bl, 8
je 0x40ac30
fldz
and ebx, 0xfffffff7
fstp dword [esp + 0x3c]
mov dword [esp + 0x40], 0
mov dword [esp + 0xc0], 0xffffffff
test bl, 4
je 0x40ac51
fldz
and ebx, 0xfffffffb
fstp dword [esp + 0x34]
mov dword [esp + 0x38], 0
test eax, eax
je 0x40aecb
mov ecx, dword [edi + 0x14]
imul ecx, dword [esp + 0x14]
add ecx, esi
shl ecx, 4
add ecx, dword [edi + 0x4c]
mov dword [ecx], eax
mov dword [ecx + 4], eax
jmp 0x40ac72
fstp st(0)
inc esi
cmp esi, dword [edi + 0x14]
mov dword [esp + 0x1c], esi
jl 0x40ab90
jmp 0x40ac84
fstp st(0)
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [edi + 0x18]
mov dword [esp + 0x14], eax
jl 0x40aa7f
jmp 0x40a9f5
cmp dword [edi + 0x14], esi
fld qword [ebp + 0xc]
fmul st(0), st(0)
mov dword [esp + 0x18], esi
fstp qword [esp + 0x4c]
jle 0x40a9f5
fild dword [esp + 0x18]
mov esi, dword [edi + 8]
mov eax, dword [ebp + 8]
add esi, esi
fmul qword [ebp + 0x18]
add esi, esi
add esi, esi
fadd dword [edi + 0x24]
fsub qword [esi + eax]
fst qword [esp + 0x44]
fmul st(0), st(0)
fsubr qword [esp + 0x4c]
fldz
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x40aeb2
fabs
call sub.MSVCR90.dll__CIsqrt
mov eax, dword [edi + 0x10]
mov ecx, dword [ebp + 8]
add eax, eax
add eax, eax
add eax, eax
fld qword [eax + ecx]
fsub st(1)
fstp dword [esp + 0x24]
fld qword [eax + ecx]
mov ecx, dword [edi + 0xc]
fadd st(1)
add ecx, ecx
add ecx, ecx
add ecx, ecx
fstp dword [esp + 0x2c]
fld qword [esp + 0x44]
fld qword [ebp + 0xc]
fdiv st(1), st(0)
fxch st(1)
fst qword [esp + esi + 0x54]
fstp qword [esp + esi + 0x6c]
fldz
fst qword [esp + ecx + 0x54]
fstp qword [esp + ecx + 0x6c]
lea ecx, [esp + 0x20]
push ecx
fdivp st(1)
sub esp, 0x18
mov ecx, 0x44b108
fst qword [esp + eax + 0x70]
fchs
fstp qword [esp + eax + 0x88]
fld qword [esp + 0x98]
fstp qword [esp + 0x10]
fld qword [esp + 0x90]
fstp qword [esp + 8]
fld qword [esp + 0x88]
fstp qword [esp]
call fcn.00409480
fld qword [esp + 0x64]
lea edx, [esp + 0x28]
push edx
sub esp, 0x18
fstp qword [esp + 0x10]
mov ecx, 0x44b108
fld qword [esp + 0x78]
fstp qword [esp + 8]
fld qword [esp + 0x70]
fstp qword [esp]
call fcn.00409480
cmp dword [edi + 0x18], 0
mov dword [esp + 0x14], 0
jle 0x40aeb4
lea ebx, [ebx]
mov eax, dword [esp + 0x14]
mov ecx, dword [edi + 0x50]
cdq
idiv dword [ecx + 0x2c]
mov esi, dword [ecx + 0x28]
cmp edx, esi
jne 0x40ae9e
fild dword [esp + 0x14]
fmul qword [ebp + 0x18]
fadd dword [edi + 0x28]
fld dword [edi + 0x38]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x40ae9c
fld dword [edi + 0x3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x40ae9e
push 0x18
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x30], eax
xor esi, esi
cmp eax, esi
je 0x40ae4e
fld dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
fstp dword [esp + 0x34]
mov dword [esp + 0x38], ecx
fld dword [esp + 0x24]
mov edx, dword [esp + 0x20]
fstp dword [esp + 0x3c]
or ebx, 1
mov dword [esp + 0x40], edx
push esi
push esi
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x48]
or ebx, 2
push edx
mov ecx, eax
mov dword [esp + 0xd0], 3
mov dword [esp + 0x2c], ebx
call fcn.004092f0
jmp 0x40ae50
xor eax, eax
test bl, 2
je 0x40ae62
fldz
and ebx, 0xfffffffd
fstp dword [esp + 0x3c]
mov dword [esp + 0x40], esi
mov dword [esp + 0xc0], 0xffffffff
test bl, 1
je 0x40ae7f
fldz
and ebx, 0xfffffffe
fstp dword [esp + 0x34]
mov dword [esp + 0x38], esi
cmp eax, esi
je 0x40aecb
mov ecx, dword [edi + 0x14]
imul ecx, dword [esp + 0x14]
add ecx, dword [esp + 0x18]
shl ecx, 4
add ecx, dword [edi + 0x4c]
mov dword [ecx], eax
mov dword [ecx + 4], eax
jmp 0x40ae9e
fstp st(0)
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [edi + 0x18]
mov dword [esp + 0x14], eax
jl 0x40adb0
jmp 0x40aeb4
fstp st(0)
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [edi + 0x14]
mov dword [esp + 0x18], eax
jl 0x40acb1
jmp 0x40a9f5
mov ecx, edi
call fcn.00409f50
mov eax, 4
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x2c