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

Disassembly:
sub esp, 0x98
fldz
xor eax, eax
mov word [esp + 0x10], ax
fst qword [esp + 0x4c]
push ebx
xor ebx, ebx
xor ecx, ecx
mov word [esp + 0x10], cx
mov dword [esp + 4], ebx
fst qword [esp + 0x84]
fstp qword [esp + 0x74]
push esi
fldz
push edi
fst dword [esp + 0x10]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x48], ebx
fst dword [esp + 0x20]
mov dword [esp + 0x28], ebx
movzx edx, word [esp + 0x18]
sub edx, 0x2bb68519
mov word [esp + 0x18], dx
fstp dword [esp + 0x2c]
mov dword [esp + 0x10], ebx
fld dword [str.wp_vo]
fsub qword [0x41f388]
fstp dword [str.wp_vo]
fld dword [str.wp_vo]
fsub qword [0x41f530]
fstp dword [esp + 0x2c]
mov ax, word [0x425474]
movsx ecx, ax
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
fmul qword [0x4234c8]
call fcn.0040b310
mov edi, dword [esp + 0xb4]
mov word [0x425474], ax
lea eax, [esp + 0x98]
push eax
mov esi, 1
lea edx, [esp + 0x98]
push edi
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], edx
call fcn.00401620
add esp, 8
test eax, eax
jne 0x406431
pop edi
pop esi
lea eax, [ebx - 0xc]
pop ebx
add esp, 0x98
ret
push ebp
push ebx
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00401e50
mov ebp, dword [esp + 0xcc]
push edi
push ebp
call fcn.00402d70
add esp, 0x20
test eax, eax
jge 0x406549
or eax, 0xffffffff
add dword [0x4254ac], eax
add word [0x4253f4], ax
mov eax, dword [0x4254ac]
mov edi, dword [esp + 0xac]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fadd qword [0x4234e8]
mov cx, word [0x4253f4]
movsx edx, cx
mov dword [esp + 0x2c], edx
fild dword [esp + 0x2c]
fsubp st(1)
fadd qword [0x424438]
fstp qword [0x424438]
cmp edi, ebx
je 0x40651d
fldz
xor eax, eax
push esi
mov word [esp + 0x1c], ax
fstp dword [esp + 0x24]
push edi
call fcn.00402510
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
fld dword [esp + 0x20]
fsub qword [0x41f5e8]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
mov ecx, dword [edi + 4]
fadd qword [0x41f388]
mov edx, dword [edi + 8]
add ecx, ecx
add ecx, ecx
push ecx
fstp dword [esp + 0x24]
push ebx
push edx
call fcn.0040b400
mov eax, dword [edi + 8]
add esp, 0xc
mov dword [eax], ebx
mov dword [edi], 1
cmp esi, ebx
jne 0x406e26
mov eax, dword [esp + 0xb0]
cmp eax, ebx
je 0x40653c
push ebp
push eax
call fcn.00403da0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x98
ret
lea ecx, [esp + 0x34]
push ebp
push ecx
call fcn.00403da0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
lea edx, [esp + 0x50]
push edi
push edx
call fcn.00403da0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
mov eax, 1
mov dword [esp + 0x50], eax
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 4]
add eax, 2
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.00402510
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
lea edx, [esp + 0x68]
push ebx
push edx
call fcn.00403e60
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
lea eax, [esp + 0x40]
push 2
push eax
call fcn.00402510
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
lea ecx, [esp + 0x74]
push 3
push ecx
call fcn.00402510
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
lea edx, [esp + 0x50]
push edx
call fcn.00401b60
add esp, 4
and eax, 0x8000001f
jns 0x406607
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x406662
fld qword [esp + 0x5c]
mov edi, 0x1f
fsub qword [0x41f7f0]
sub edi, eax
lea ecx, [esp + 0x34]
push edi
fstp qword [esp + 0x60]
mov ax, word [0x425b74]
cwde
add dword [esp + 0x50], eax
push ecx
mov dword [esp + 0x38], edi
call fcn.004033a0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
lea edx, [esp + 0x50]
push edi
push edx
call fcn.004033a0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x406e26
jmp 0x406666
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x54]
dec eax
dec ebx
mov edi, ebx
sub edi, eax
mov ebp, edi
mov dword [esp + 0x64], eax
shl ebp, 5
lea eax, [esp + 0x50]
push ebp
push eax
call fcn.004033a0
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00401620
add esp, 0x10
test eax, eax
jl 0x4066cf
mov edi, edi
mov eax, dword [esp + 0x70]
inc dword [eax + edi*4]
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x38]
push ecx
mov edx, ecx
push edx
call fcn.00406240
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401620
add esp, 0x14
test eax, eax
jge 0x4066a0
lea edx, [esp + 0x50]
push ebp
push edx
call fcn.00401cd0
fld1
add esp, 8
cmp ebx, dword [esp + 0x64]
mov dword [esp + 0x8c], ebx
jle 0x406c4f
add edi, edi
add edi, edi
add ebp, 0xffffffe0
mov dword [esp + 0x18], edi
mov dword [esp + 0x88], ebp
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x64]
lea ebp, [eax + ebx*4]
mov eax, dword [ebp]
lea esi, [ecx + edx*4]
mov dword [esp + 0x14], ebp
cmp eax, dword [esi]
jb 0x406731
mov ecx, dword [esp + 0x70]
fstp st(0)
or ebp, 0xffffffff
mov dword [edi + ecx - 4], ebp
jmp 0x4068e3
mov dx, word [esp + 0x20]
movsx eax, dx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmul qword [0x425bd0]
call fcn.0040b310
mov word [esp + 0x20], ax
fld qword [0x425bd0]
fadd st(1)
fstp qword [0x425bd0]
fld qword [esp + 0x90]
fcomp qword [0x41f7e8]
fnstsw ax
test ah, 0x44
jnp 0x4067ab
mov cx, word [0x4240b4]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsub dword [0x42405c]
fsub qword [0x41f7e0]
fadd qword [0x425478]
fstp qword [0x425478]
fld dword [0x42405c]
fadd st(1)
fstp dword [0x42405c]
fld dword [esp + 0x24]
mov edi, dword [esi]
fadd qword [0x41f7d8]
xor edx, edx
mov ebx, edi
shr ebx, 0x10
fstp qword [esp + 0x5c]
fld dword [esp + 0x24]
mov esi, dword [ebp]
mov eax, esi
fadd st(1)
div ebx
fstp dword [esp + 0x24]
movzx edx, word [ebp - 2]
mov ecx, eax
imul eax, ebx
sub esi, eax
movzx eax, di
mov ebp, ecx
imul ebp, eax
movzx eax, word [esp + 0x1c]
shl esi, 0x10
or esi, edx
mov edx, dword [0x425a48]
imul eax, edx
mov dword [esp + 0x10], ecx
mov word [esp + 0x1c], ax
cmp esi, ebp
jae 0x40683c
fld qword [esp + 0x5c]
fsubr qword [0x41f7d0]
call fcn.0040b310
mov word [0x42314c], ax
mov eax, 1
sub dword [esp + 0x10], eax
add esi, edi
cmp esi, edi
jb 0x406838
cmp esi, ebp
jae 0x406838
sub dword [esp + 0x10], eax
add esi, edi
cmp esi, edi
jae 0x40682a
mov ecx, dword [esp + 0x10]
sub esi, ebp
mov eax, esi
xor edx, edx
div ebx
add dword [esp + 0x28], 0x40730bdd
mov edx, eax
imul eax, ebx
sub esi, eax
mov eax, dword [esp + 0x14]
movzx eax, word [eax - 4]
shl esi, 0x10
or esi, eax
movzx ebx, di
mov eax, edx
imul eax, ebx
cmp esi, eax
jae 0x40687e
add esi, edi
dec edx
cmp esi, edi
jb 0x40687e
cmp esi, eax
jae 0x40687e
add esi, edi
dec edx
cmp esi, edi
jae 0x406873
mov eax, dword [esp + 0x2c]
sub eax, 0x18e6b5dc
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fadd dword [0x4234d4]
fcomp qword [0x41f7c8]
fnstsw ax
fadd dword [0x4234d4]
fstp dword [0x4234d4]
test ah, 1
jne 0x4068be
movzx eax, word [esp + 0x1c]
imul eax, eax, 0x7e14a49
mov word [esp + 0x1c], ax
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x8c]
shl ecx, 0x10
or ecx, edx
mov edx, dword [esp + 0x70]
mov dword [eax + edx - 4], ecx
mov dword [esp + 0x10], 0x7ddaa7de
mov edi, eax
or ebp, 0xffffffff
mov eax, dword [esp + 0x70]
inc dword [edi + eax - 4]
jmp 0x4068f0
mov eax, dword [esp + 0x70]
fldz
add dword [edi + eax - 4], ebp
xor ecx, ecx
lea edx, [esp + 0x40]
push 1
mov word [esp + 0x1c], cx
fstp dword [esp + 0x1c]
push edx
call fcn.00402510
mov esi, eax
add esp, 8
test esi, esi
jne 0x406e24
fld dword [esp + 0x18]
fsub qword [0x41f5e8]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
mov eax, dword [esp + 0x44]
fadd qword [0x41f388]
mov edx, dword [esp + 0x48]
lea ecx, [eax*4]
push ecx
push esi
fstp dword [esp + 0x20]
push edx
call fcn.0040b400
mov eax, dword [esp + 0x54]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x40], 1
test esi, esi
jne 0x406e24
mov ecx, dword [esp + 0x28]
add ecx, dword [esp + 0x10]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x64]
cmp ecx, 1
jge 0x406983
xor eax, eax
jmp 0x40698b
mov edx, dword [esp + 0x58]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x48]
mov dword [edx], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x48]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x70]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x44]
push edx
mov eax, edx
push eax
call fcn.00405100
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406e24
fldz
xor ecx, ecx
lea edx, [esp + 0x74]
push 1
mov word [esp + 0x1c], cx
fstp dword [esp + 0x1c]
push edx
call fcn.00402510
mov esi, eax
add esp, 8
test esi, esi
jne 0x406e24
fld dword [esp + 0x18]
fsub qword [0x41f5e8]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
mov eax, dword [esp + 0x78]
fadd qword [0x41f388]
mov edx, dword [esp + 0x7c]
lea ecx, [eax*4]
push ecx
push esi
fstp dword [esp + 0x20]
push edx
call fcn.0040b400
mov eax, dword [esp + 0x88]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x74], 1
test esi, esi
jne 0x406e24
cmp ebx, 2
jge 0x406a40
xor eax, eax
jmp 0x406a48
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx + ebx*4 - 8]
cmp ebx, 1
mov edx, dword [esp + 0x7c]
mov dword [edx], eax
jge 0x406a57
xor eax, eax
jmp 0x406a5f
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + ebx*4 - 4]
mov ecx, dword [esp + 0x7c]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + ebx*4]
mov ecx, dword [esp + 0x7c]
lea edx, [esp + 0x74]
mov dword [ecx + 8], eax
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00401620
add esp, 8
test eax, eax
jg 0x4068f0
fld dword [0x426014]
lea eax, [esp + 0x50]
fadd qword [0x4254d0]
mov ecx, dword [esp + 0x70]
fstp dword [0x426014]
mov edx, dword [edi + ecx - 4]
push edx
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00405100
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406e24
mov ebp, dword [esp + 0x88]
lea edx, [esp + 0x40]
push ebp
push edx
call fcn.004033a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406e24
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x38]
push ecx
mov edx, ecx
push edx
call fcn.00406240
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406e24
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00402f70
add esp, 8
test eax, eax
jge 0x406c02
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00403da0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406e24
lea eax, [esp + 0x40]
push ebp
push eax
call fcn.004033a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406e24
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edx
push eax
call fcn.00405de0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406e24
mov cx, word [0x425b68]
mov edx, dword [esp + 0x28]
movsx eax, cx
mov ecx, 0xaed47939
add eax, 0x5d953a1
sub ecx, edx
cmp eax, ecx
jne 0x406bbe
fld qword [esp + 0x80]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x80]
fld qword [esp + 0x80]
fsub qword [0x41f7c0]
call fcn.0040b310
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x70]
dec dword [edi + eax - 4]
jmp 0x406c04
fld qword [esp + 0x90]
fcomp qword [0x41f7b8]
fnstsw ax
fld qword [esp + 0x90]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x90]
test ah, 0x41
jp 0x406bf8
fld dword [0x423198]
fsub qword [0x41f7b0]
fstp dword [0x423198]
mov eax, dword [esp + 0x70]
dec dword [edi + eax - 4]
jmp 0x406c04
fld1
mov edx, dword [0x424014]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
dec ebx
fld qword [esp + 0x5c]
sub ebp, 0x20
fld qword [0x424430]
sub edi, 4
cmp ebx, dword [esp + 0x64]
faddp st(2)
fxch st(1)
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x88], ebp
fsub qword [0x41f7a8]
mov dword [esp + 0x18], edi
fsubp st(1)
fstp qword [esp + 0x5c]
jg 0x406702
fld qword [esp + 0x80]
mov eax, dword [esp + 0x28]
fsub qword [0x41f7a0]
mov dword [esp + 0x14], eax
fsub qword [0x41f798]
fild dword [esp + 0x14]
fmulp st(1)
call fcn.0040b310
mov edi, dword [esp + 0xac]
mov dword [esp + 0x28], eax
fld qword [esp + 0x80]
fsub st(1)
fstp qword [esp + 0x80]
test edi, edi
je 0x406d09
fld dword [str._oP_T]
lea ecx, [esp + 0x68]
fld dword [0x4234d4]
push ecx
fsub qword [0x41f790]
push edi
fsubp st(1)
fstp dword [str._oP_T]
fsubr dword [0x4234d4]
fstp dword [0x4234d4]
call fcn.00403da0
mov edx, dword [esp + 0xbc]
mov eax, dword [edx]
mov ecx, dword [esp + 0xc0]
add esp, 8
imul eax, dword [ecx]
mov dword [edi], eax
fld dword [0x4245ec]
fld dword [0x424600]
fadd dword [0x4259fc]
fsubp st(1)
fstp dword [0x4245ec]
fld dword [0x424600]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x424600]
fld dword [esp + 0x24]
mov edi, dword [esp + 0xb0]
fmul qword [0x41f788]
fstp dword [esp + 0x24]
test edi, edi
je 0x406e00
fsubr qword [esp + 0x5c]
fstp qword [esp + 0x5c]
movzx edx, word [str.X_kq]
movsx eax, dx
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fsub qword [esp + 0x5c]
call fcn.0040b310
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x38]
mov word [str.X_kq], ax
push edx
call fcn.00401cd0
mov eax, dword [0x425aa0]
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x38], eax
or ebx, 0xffffffff
add dword [0x425aa0], ebx
push edi
call fcn.00403da0
add dword [esp + 0x2c], ebx
fld dword [0x42319c]
movzx edx, word [0x4231c8]
mov cx, word [esp + 0x2c]
movsx eax, dx
movsx edx, cx
sub eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc4]
push 0
fisub dword [esp + 0x28]
push edi
fstp dword [0x42319c]
add word [0x4231c8], bx
movzx edx, word [esp + 0x34]
mov ecx, dword [eax]
sub edx, 0x2eeaeeef
mov dword [edi], ecx
mov word [esp + 0x34], dx
call fcn.00402f70
add esp, 0x18
test eax, eax
jne 0x406dde
mov dword [edi], 1
mov ax, word [0x425490]
movzx ecx, word [esp + 0x1c]
cwde
add eax, 0x29ec0240
imul ecx, eax
mov word [esp + 0x1c], cx
inc word [0x425490]
jmp 0x406e05
fstp st(0)
or ebx, 0xffffffff
add dword [esp + 0x20], ebx
movzx edx, word [esp + 0x20]
mov eax, dword [esp + 0x10]
lea ecx, [edx + eax + 0x34f1e04b]
mov word [0x4234a8], cx
add dword [esp + 0x10], ebx
xor ebx, ebx
push ebx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x48]
push eax
call fcn.004018b0
fld dword [esp + 0x3c]
fsub qword [0x41f780]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x2c], ecx
fiadd dword [esp + 0x2c]
mov dword [esp + 0x2c], edx
add esp, 0x18
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040b310
mov dword [esp + 0x10], eax
inc dword [esp + 0x4c]
fld dword [esp + 0x24]
fadd qword [0x41f388]
pop ebp
pop edi
mov eax, esi
pop esi
fstp dword [esp + 0x18]
pop ebx
add esp, 0x98
ret