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

Disassembly:
sub esp, 0x98
fldz
push ebx
xor ebx, ebx
mov dword [esp + 0x54], ebx
xor eax, eax
mov word [esp + 8], ax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x78], ebx
fst qword [esp + 0x94]
mov dword [esp + 0x14], ebx
fst qword [esp + 0x4c]
mov dword [esp + 0xc], ebx
fst qword [esp + 0xc]
fstp qword [esp + 0x64]
xor ecx, ecx
fldz
mov word [esp + 4], cx
fst dword [esp + 0x18]
mov dword [esp + 0x84], ebx
fstp dword [esp + 4]
push esi
fld dword [esp + 8]
push edi
fld dword [esp + 0xc]
mov edi, dword [esp + 0xb4]
fsub dword [esp + 0x20]
lea ecx, [esp + 0x90]
mov esi, 1
push ecx
lea eax, [esp + 0x90]
fsubp st(1)
push edi
fstp dword [esp + 0x14]
fld dword [esp + 0x28]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x28]
fsubr dword [esp + 0x14]
mov dword [esp + 0x98], esi
fstp dword [esp + 0x14]
mov edx, dword [0x425fcc]
imul edx, edx, 0xef3fba10
mov dword [0x425fcc], edx
mov dword [esp + 0x9c], esi
mov dword [esp + 0xa0], eax
call fcn.00401380
add esp, 8
test eax, eax
jne 0x406717
pop edi
pop esi
lea eax, [ebx - 0xc]
pop ebx
add esp, 0x98
ret
push ebp
push ebx
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00402d70
fld qword [esp + 0x70]
fadd qword [0x41f358]
mov ebp, dword [esp + 0xcc]
push edi
push ebp
fstp qword [esp + 0x78]
fld qword [esp + 0x78]
fmul qword [0x425748]
fstp qword [0x425748]
call fcn.00401a40
add esp, 0x20
test eax, eax
jge 0x406807
mov edi, dword [esp + 0xac]
cmp edi, ebx
je 0x4067db
xor ecx, ecx
push esi
mov word [esp + 0x18], cx
push edi
mov dword [esp + 0x20], ebx
call fcn.00401ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
mov edx, dword [edi + 4]
mov eax, dword [edi + 8]
add edx, edx
add edx, edx
push edx
push ebx
push eax
call fcn.0040bae0
mov dx, word [esp + 0x20]
mov ecx, dword [edi + 8]
mov dword [ecx], ebx
movsx eax, dx
mov ecx, 0xe43031ae
sub ecx, eax
add esp, 0xc
add ecx, dword [0x4238c4]
mov dword [0x4238c4], ecx
mov dword [edi], 1
cmp esi, ebx
jne 0x40700c
mov eax, dword [esp + 0xb0]
cmp eax, ebx
je 0x4067fa
push ebp
push eax
call fcn.00403d20
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x98
ret
lea edx, [esp + 0x30]
push ebp
push edx
call fcn.00403d20
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.00403d20
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
mov ecx, dword [ebp + 4]
add ecx, 2
push ecx
lea edx, [esp + 0x68]
mov edi, 1
push edx
mov dword [esp + 0x54], edi
mov dword [esp + 0x38], edi
call fcn.00401ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
lea eax, [esp + 0x64]
push ebx
push eax
call fcn.00401cb0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
mov ecx, dword [0x4238fc]
mov dx, word [0x425a5c]
mov eax, 0x12fcfbd4
sub eax, ecx
movsx ecx, dx
cmp ecx, eax
jle 0x4068e0
fld qword [esp + 0x18]
fsub qword [0x41f358]
fstp qword [esp + 0x18]
fld qword [esp + 0x18]
mov edx, dword [0x4235f0]
mov ax, word [0x425a7c]
mov dword [esp + 0x70], edx
fild dword [esp + 0x70]
movsx ecx, ax
mov dword [esp + 0x70], ecx
fsubp st(1)
fild dword [esp + 0x70]
faddp st(1)
call fcn.0040b510
mov dword [esp + 0x2c], eax
dec word [0x425a7c]
add dword [0x4235f0], edi
lea edx, [esp + 0x3c]
push 2
push edx
call fcn.00401ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
lea eax, [esp + 0x78]
push 3
push eax
call fcn.00401ba0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
lea ecx, [esp + 0x4c]
push ecx
call fcn.00402960
add esp, 4
and eax, 0x8000001f
jns 0x40692b
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x40696d
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x30]
push edi
push edx
mov dword [esp + 0x78], edi
call fcn.00403e60
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.00403e60
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40700c
jmp 0x406971
mov dword [esp + 0x70], ebx
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x50]
dec ebp
dec eax
mov edi, ebp
sub edi, eax
mov ebx, edi
shl ebx, 5
lea ecx, [esp + 0x4c]
push ebx
push ecx
mov dword [esp + 0x2c], eax
call fcn.00403e60
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.00401380
add esp, 0x10
test eax, eax
jl 0x4069df
lea esp, [esp]
mov eax, dword [esp + 0x6c]
inc dword [eax + edi*4]
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x34]
push edx
mov eax, edx
push eax
call fcn.00405e30
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00401380
add esp, 0x14
test eax, eax
jge 0x4069b0
lea eax, [esp + 0x4c]
push ebx
push eax
call fcn.004016a0
add esp, 8
cmp ebp, dword [esp + 0x24]
mov eax, ebp
mov dword [esp + 0x48], eax
jle 0x406f5b
lea ebp, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0x88], ebp
mov dword [esp + 0x8c], ebx
jmp 0x406a24
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov edi, dword [edx + esi*4]
cmp dword [ecx + eax*4], edi
jb 0x406a49
mov eax, dword [esp + 0x6c]
mov dword [eax + ebp - 4], 0xffffffff
jmp 0x406c14
mov esi, dword [ecx + eax*4]
mov eax, esi
xor edx, edx
mov ebx, edi
shr ebx, 0x10
div ebx
mov edx, dword [esp + 0x48]
lea ecx, [ecx + edx*4 - 4]
mov dx, word [0x4238a0]
mov dword [esp + 0x18], ecx
movzx ecx, word [ecx + 2]
inc word [0x4238a0]
mov ebp, eax
imul eax, ebx
sub esi, eax
movsx eax, dx
shl esi, 0x10
add eax, 0x3f746ced
or esi, ecx
cmp eax, 0xb9d4b103
mov dword [esp + 0x10], ebp
jle 0x406ad9
mov ecx, dword [0x4236ac]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
fld dword [0x4238f8]
faddp st(2)
fsubrp st(1)
call fcn.0040b510
mov dword [esp + 0x2c], eax
inc dword [0x4236ac]
fld dword [0x4238f8]
fsub qword [0x41f358]
fstp dword [0x4238f8]
movzx ecx, di
mov eax, ebp
imul eax, ecx
mov dword [esp + 0x28], eax
cmp esi, eax
jae 0x406b3b
fld dword [0x423a54]
mov eax, dword [esp + 0x60]
fsub qword [0x41f778]
mov dword [esp + 0x60], eax
fild dword [esp + 0x60]
dec ebp
mov dword [esp + 0x10], ebp
add esi, edi
fmulp st(1)
call fcn.0040b510
mov dword [esp + 0x60], eax
cmp esi, edi
jb 0x406b28
cmp esi, dword [esp + 0x28]
jae 0x406b24
add esi, edi
dec ebp
cmp esi, edi
jae 0x406b17
mov dword [esp + 0x10], ebp
mov ecx, dword [0x425e90]
mov eax, 0x965d80d5
sub eax, ecx
add dword [0x4235e4], eax
fld qword [esp + 0xa0]
call fcn.0040b510
sub esi, dword [esp + 0x28]
mov dword [0x423710], eax
mov eax, esi
xor edx, edx
div ebx
mov dx, word [esp + 0x14]
mov ebp, eax
movsx eax, dx
mov edx, dword [esp + 0x18]
add eax, 0x37d22169
mov dword [esp + 0x28], eax
mov ecx, ebp
imul ecx, ebx
fild dword [esp + 0x28]
fadd dword [0x425f94]
fstp dword [0x425f94]
fld qword [esp + 0x58]
fsub qword [0x41f770]
movzx eax, word [edx]
sub esi, ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x18], ecx
shl esi, 0x10
or esi, eax
fild dword [esp + 0x18]
movzx eax, di
fmulp st(1)
mov ebx, ebp
imul ebx, eax
call fcn.0040b510
mov dword [esp + 0x20], eax
fld qword [esp + 0x58]
fadd qword [0x41f358]
fstp qword [esp + 0x58]
cmp esi, ebx
jae 0x406be1
add dword [esp + 0x20], 0xd4405899
add esi, edi
dec ebp
cmp esi, edi
jb 0x406be1
cmp esi, ebx
jae 0x406be1
add esi, edi
dec ebp
cmp esi, edi
jae 0x406bd6
fld dword [0x425fb8]
mov eax, dword [esp + 0x10]
fadd qword [0x41f768]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x8c]
shl eax, 0x10
fstp dword [0x425fb8]
or eax, ebp
mov dword [ecx + edx - 4], eax
mov ebp, ecx
mov eax, dword [esp + 0x6c]
mov edi, 1
add dword [eax + ebp - 4], edi
mov eax, dword [esp + 0x6c]
dec dword [eax + ebp - 4]
fld qword [0x425db0]
fsub qword [0x41f760]
fcomp qword [0x41f758]
fnstsw ax
fld qword [0x425db0]
fadd qword [0x41f358]
fstp qword [0x425db0]
test ah, 0x44
jp 0x406c76
mov edx, dword [esp + 0x84]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fadd qword [0x423a70]
fstp qword [0x423a70]
add dword [esp + 0x84], edi
xor eax, eax
lea ecx, [esp + 0x3c]
push edi
mov word [esp + 0x14], ax
push ecx
mov dword [esp + 0x20], eax
call fcn.00401ba0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40700a
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040bae0
mov ax, word [esp + 0x1c]
mov edx, dword [esp + 0x50]
mov dword [edx], esi
movsx ecx, ax
mov edx, 0xe43031ae
sub edx, ecx
add esp, 0xc
add edx, dword [0x4238c4]
mov dword [esp + 0x3c], edi
mov dword [0x4238c4], edx
test esi, esi
jne 0x40700a
add dword [esp + 0x20], edi
movzx eax, word [esp + 0x14]
mov ecx, dword [esp + 0x20]
imul eax, ecx
mov ecx, dword [esp + 0x24]
cmp ecx, edi
mov word [esp + 0x14], ax
jge 0x406d01
xor eax, eax
jmp 0x406d09
mov edx, dword [esp + 0x54]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x44]
mov dword [edx], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x44]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + ebp - 4]
push ecx
lea edx, [esp + 0x40]
push edx
mov eax, edx
push eax
call fcn.00405350
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40700a
xor ecx, ecx
lea edx, [esp + 0x78]
push edi
mov word [esp + 0x14], cx
push edx
mov dword [esp + 0x20], ecx
call fcn.00401ba0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40700a
mov eax, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040bae0
mov cx, word [esp + 0x1c]
mov eax, dword [esp + 0x8c]
mov dword [eax], esi
movsx edx, cx
mov eax, 0xe43031ae
sub eax, edx
add esp, 0xc
add eax, dword [0x4238c4]
mov dword [esp + 0x78], edi
mov dword [0x4238c4], eax
test esi, esi
jne 0x40700a
mov eax, dword [esp + 0x48]
cmp eax, 2
jge 0x406dbc
xor ecx, ecx
jmp 0x406dc4
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, edi
mov edx, dword [esp + 0x80]
mov dword [edx], ecx
fld qword [0x423678]
mov ecx, dword [0x425750]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fsubp st(1)
fadd qword [0x425dc0]
fstp qword [0x425dc0]
jge 0x406df7
xor ecx, ecx
jmp 0x406dff
mov edx, dword [esp + 0x38]
mov ecx, dword [edx + eax*4 - 4]
mov edx, dword [esp + 0x80]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x80]
lea ecx, [esp + 0x78]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00401380
add esp, 8
test eax, eax
jg 0x406c21
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax + ebp - 4]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00405350
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40700a
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.00403e60
mov esi, eax
add esp, 8
test esi, esi
jne 0x40700a
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00405e30
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40700a
mov dx, word [esp + 0x14]
movsx eax, dx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fld qword [0x425a18]
fsub qword [0x41f750]
fsub qword [0x41f748]
fsubp st(1)
call fcn.0040b510
lea ecx, [esp + 0x30]
push esi
push ecx
mov word [esp + 0x1c], ax
call fcn.00401d30
add esp, 8
test eax, eax
jge 0x406f33
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00403d20
mov esi, eax
add esp, 8
test esi, esi
jne 0x40700a
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.00403e60
mov esi, eax
add esp, 8
test esi, esi
jne 0x40700a
add dword [esp + 0x20], 0x6202e2e4
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, eax
push ecx
call fcn.00404c10
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40700a
mov eax, dword [esp + 0x6c]
dec dword [eax + ebp - 4]
mov eax, dword [esp + 0x48]
sub eax, edi
sub ebx, 0x20
sub ebp, 4
cmp eax, dword [esp + 0x24]
mov dword [esp + 0x48], eax
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x88], ebp
jg 0x406a20
mov edi, dword [esp + 0xac]
test edi, edi
je 0x406f89
lea edx, [esp + 0x64]
push edx
push edi
call fcn.00403d20
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax]
mov edx, dword [esp + 0xc0]
add esp, 8
imul ecx, dword [edx]
mov dword [edi], ecx
mov edi, dword [esp + 0xb0]
test edi, edi
je 0x407000
mov eax, dword [esp + 0x70]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.004016a0
mov edx, dword [esp + 0x34]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fadd qword [esp + 0x60]
mov ax, word [0x425994]
movsx ecx, ax
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
faddp st(1)
call fcn.0040b510
lea edx, [esp + 0x38]
push edx
mov word [0x425994], ax
dec dword [esp + 0x38]
push edi
call fcn.00403d20
mov eax, dword [esp + 0xc4]
mov ecx, dword [eax]
push 0
push edi
mov dword [edi], ecx
call fcn.00401d30
add esp, 0x18
test eax, eax
jne 0x407000
mov dword [edi], 1
mov edx, 0xffffcdef
mov word [esp + 0x10], dx
xor ebx, ebx
push ebx
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00402890
fld qword [esp + 0x70]
fld1
add esp, 0x18
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x58]
fld qword [0x425f48]
fsub qword [0x41f740]
fadd qword [esp + 0x58]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fmulp st(1)
call fcn.0040b510
pop ebp
mov dword [esp + 0x28], eax
fadd qword [0x425f48]
pop edi
mov eax, esi
pop esi
fstp qword [0x425f48]
pop ebx
add esp, 0x98
ret