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

Disassembly:
sub esp, 0x35c
fldz
xor eax, eax
mov word [esp + 4], ax
fst dword [esp + 0x3c]
fst dword [esp]
push ebx
fldz
push ebp
fst qword [esp + 0x4c]
xor ecx, ecx
fxch st(1)
xor ebp, ebp
fst dword [esp + 0x24]
mov dword [esp + 0x54], ebp
fst dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x378]
mov word [esp + 0x4c], cx
fstp dword [esp + 0x24]
mov dword [esp + 0x18], ebp
lea eax, [esp + 0x5c]
fstp qword [esp + 0x28]
mov dword [esp + 0x28], ebp
fld qword [0x4242d8]
mov ebx, 1
fadd qword [0x41f348]
lea edx, [esp + 0x58]
push eax
push esi
fstp qword [0x4242d8]
fld qword [0x424b58]
fsub qword [0x4242d8]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], edx
fstp qword [0x424b58]
mov dword [esp + 0x30], 0x227a978b
call fcn.004025d0
add esp, 8
test eax, eax
jl 0x407481
mov ecx, dword [esi + 8]
test byte [ecx], bl
je 0x407481
fld dword [0x41f840]
lea edx, [esp + 0x14]
push esi
fstp dword [esp + 0x10]
push edx
call fcn.00401940
mov ax, word [0x425d48]
mov ecx, dword [esp + 0x20]
cwde
add eax, 0xf03f0c57
add ecx, eax
push ebp
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x40]
mov word [0x425d48], cx
add dword [esp + 0x28], ebx
push eax
call fcn.004022e0
push 0x300
lea ecx, [esp + 0x80]
push ebp
push ecx
call fcn.0040ae70
movzx edx, word [esp + 0x30]
mov eax, dword [esp + 0x394]
add edx, 0x38fbbf40
push eax
mov word [esp + 0x34], dx
call fcn.004019e0
add esp, 0x24
cmp eax, 0x29f
jle 0x406d75
mov dword [esp + 0x1c], 6
jmp 0x406da5
cmp eax, 0xef
jle 0x406d86
mov dword [esp + 0x1c], 5
jmp 0x406da5
cmp eax, 0x4f
jle 0x406d95
mov dword [esp + 0x1c], 4
jmp 0x406da5
xor ecx, ecx
cmp eax, 0x17
setg cl
lea ecx, [ecx + ecx + 1]
mov dword [esp + 0x1c], ecx
fld dword [0x424af8]
push edi
fsub qword [0x41f838]
fstp dword [0x424af8]
mov dx, word [0x424634]
mov edi, dword [esi + 4]
movsx eax, dx
mov dword [esp + 0x2c], eax
add edi, ebx
push edi
fild dword [esp + 0x30]
fmul dword [0x424630]
fstp dword [0x424630]
add word [0x424634], bx
mov ebx, dword [esp + 0x374]
push ebx
call fcn.00401d90
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x4073d4
lea ecx, [esp + 0x78]
push edi
push ecx
call fcn.00401d90
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x4073d4
lea edx, [edi + edi]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00401d90
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x4073d4
mov ebp, dword [esp + 0x380]
test ebp, ebp
je 0x406e61
cmp dword [ebp + 8], 0
je 0x406e61
mov ecx, dword [ebp]
mov edx, dword [ebp + 4]
mov eax, dword [ebp + 8]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
jmp 0x406f2d
fld dword [esp + 0x10]
lea edx, [esp + 0x34]
fsub qword [0x41f830]
xor ecx, ecx
push 1
push edx
fstp dword [esp + 0x18]
fldz
fstp dword [esp + 0x34]
mov word [esp + 0x1c], cx
call fcn.00401d90
mov edi, eax
add esp, 8
test edi, edi
jne 0x406ebd
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
lea ecx, [eax*4]
push ecx
push edi
push edx
call fcn.0040ae70
mov eax, dword [esp + 0x48]
mov dword [eax], 1
add esp, 0xc
mov dword [esp + 0x34], 1
mov dword [esp + 0x14], edi
test edi, edi
jne 0x4073db
mov ecx, dword [esi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.004034a0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073db
lea eax, [esp + 0x34]
push esi
push eax
mov ecx, eax
push ecx
call fcn.00406680
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073db
fld dword [esp + 0x10]
fsub qword [0x41f828]
fstp dword [esp + 0x10]
test ebp, ebp
je 0x406f2d
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [ebp], edx
mov dword [ebp + 4], eax
mov dword [ebp + 8], ecx
mov edi, dword [esp + 0x374]
push esi
push edi
call fcn.004025d0
add esp, 8
test eax, eax
jl 0x406f53
push esi
lea edx, [esp + 0x7c]
push edi
push edx
call fcn.00406680
add esp, 0xc
jmp 0x406f61
lea eax, [esp + 0x78]
push edi
push eax
call fcn.00402c20
add esp, 8
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x40]
push ecx
push edx
push esi
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x88]
push ecx
call fcn.00402f20
fld qword [0x4243e0]
fld1
lea edx, [esp + 0x48]
fadd st(1), st(0)
push edx
fxch st(1)
push ebx
fstp qword [0x4243e0]
fsubr dword [esp + 0x44]
fstp dword [esp + 0x44]
fld qword [0x4243e0]
fsub dword [esp + 0x44]
fadd dword [esp + 0x40]
fstp dword [esp + 0x40]
call fcn.00402c20
add esp, 0x1c
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073db
fld dword [esp + 0x10]
lea eax, [esp + 0x40]
fsubr qword [0x41f820]
push eax
fsub qword [0x41f818]
fmul dword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
fsub qword [0x41f348]
push ecx
push esi
push ebx
fstp dword [esp + 0x20]
call fcn.00403b40
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp eax, 1
jle 0x4070fa
mov edx, dword [esi + 4]
lea ebx, [eax - 1]
mov ecx, ebx
mov ebp, 1
shl ebp, cl
inc edx
push edx
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x70]
push edi
call fcn.00401d90
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073d4
lea eax, [esp + 0x78]
push eax
push edi
call fcn.00402c20
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073d4
test ebx, ebx
jle 0x407071
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x40]
push ecx
push edx
push esi
push edi
push edi
call fcn.00402f20
add esp, 0x14
sub ebx, 1
jne 0x407057
mov ecx, dword [esp + 0x20]
mov ebx, 1
shl ebx, cl
inc ebp
cmp ebp, ebx
jge 0x4070f3
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x6c]
lea esp, [esp]
mov eax, dword [esi + 4]
inc eax
push eax
push edi
call fcn.00401d90
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073d4
lea ecx, [edi - 0xc]
push ecx
push edi
call fcn.00402c20
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4073d4
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x40]
push eax
push ecx
mov edx, 0x1f2c
mov word [0x424634], dx
push esi
lea edx, [esp + 0x84]
push edx
push edi
call fcn.00402f20
inc ebp
add esp, 0x14
add edi, 0xc
cmp ebp, ebx
jl 0x407090
mov ebx, dword [esp + 0x370]
mov eax, dword [esp + 0x378]
mov ecx, dword [eax + 4]
mov dx, word [0x423dbc]
mov dword [esp + 0x2c], ecx
mov cx, word [esp + 0x50]
movsx eax, dx
movsx edx, cx
lea eax, [edx + eax - 0x45c24d0d]
mov dword [esp + 0x50], eax
xor ebp, ebp
xor edi, edi
fild dword [esp + 0x50]
mov dword [esp + 0x1c], ebp
fmul dword [esp + 0x10]
fstp dword [esp + 0x10]
mov dword [esp + 0x10], edi
fld1
cmp dword [esp + 0x1c], 0
jne 0x407196
fld dword [0x424b8c]
fcomp qword [0x41f810]
fnstsw ax
fld dword [0x424b8c]
fsub st(1)
fstp dword [0x424b8c]
test ah, 0x41
jp 0x40717b
movzx ecx, word [0x424b9c]
sub ecx, 0x4ebe65ff
mov word [0x424b9c], cx
mov eax, dword [esp + 0x2c]
mov edx, eax
dec eax
mov dword [esp + 0x2c], eax
test edx, edx
je 0x4072d8
mov dword [esp + 0x1c], 0x20
mov eax, dword [esp + 0x378]
mov edx, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
mov edx, dword [edx + eax*4]
dec ecx
shr edx, cl
mov dword [esp + 0x1c], ecx
and edx, 1
jne 0x4071e0
cmp dword [esp + 0x10], edx
je 0x40713f
cmp dword [esp + 0x10], 1
jne 0x4071e0
mov edx, dword [esp + 0x18]
fstp st(0)
lea ecx, [esp + 0x40]
push ecx
push edx
push esi
push ebx
push ebx
call fcn.00402f20
add esp, 0x14
jmp 0x40713d
fld qword [esp + 0x54]
mov dword [esp + 0x10], 2
fcomp qword [0x41f808]
fnstsw ax
test ah, 5
jp 0x40720b
fld qword [0x4246f0]
fadd qword [0x41f800]
fstp qword [0x4246f0]
mov eax, dword [esp + 0x20]
inc edi
mov ecx, eax
sub ecx, edi
shl edx, cl
or ebp, edx
cmp edi, eax
jne 0x40713f
fld qword [esp + 0x54]
fadd st(1)
fstp qword [esp + 0x54]
fsubr dword [str.R_aG8]
fstp dword [str.R_aG8]
fld dword [str.R_aG8]
fld qword [esp + 0x54]
fsub qword [esp + 0x54]
fld dword [esp + 0x28]
fsubp st(2)
fxch st(1)
fadd qword [0x41f7f8]
fcompp
fnstsw ax
test ah, 0x41
jp 0x407267
fld qword [0x41f7f0]
fstp qword [0x423140]
mov edi, dword [esp + 0x20]
test edi, edi
jle 0x40728a
nop
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x40]
push eax
push ecx
push esi
push ebx
push ebx
call fcn.00402f20
add esp, 0x14
sub edi, 1
jne 0x407270
fld dword [esp + 0x24]
mov eax, dword [esp + 0x18]
fadd qword [0x41f7e8]
lea edx, [esp + 0x40]
push edx
push eax
lea ecx, [ebp + ebp*2]
fstp dword [esp + 0x2c]
push esi
lea edx, [esp + ecx*4 + 0x78]
push edx
push ebx
call fcn.00402f20
mov ax, word [0x424680]
cwde
add eax, 0x8219ff6a
add dword [0x425d70], eax
add esp, 0x14
xor edi, edi
mov dword [esp + 0x10], 1
xor ebp, ebp
jmp 0x40713d
mov ecx, dword [esp + 0x20]
fstp st(0)
mov eax, 1
rol eax, cl
mov dword [esp + 0x1c], eax
test edi, edi
jle 0x4073c0
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x18]
lea esp, [esp]
lea ecx, [esp + 0x40]
push ecx
push edi
push esi
push ebx
push ebx
call fcn.00402f20
fld qword [0x424b38]
mov dx, word [0x423154]
fsubr qword [0x41f7e0]
movsx eax, dx
mov dword [esp + 0x38], eax
add esp, 0x14
fild dword [esp + 0x24]
fsubp st(1)
fld dword [esp + 0x28]
fcompp
fnstsw ax
fld dword [esp + 0x28]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x28]
fld qword [0x424b38]
fadd st(1)
fstp qword [0x424b38]
test ah, 1
jne 0x40738d
fadd dword [esp + 0x4c]
fstp dword [esp + 0x4c]
mov cx, word [0x424c7c]
movsx edx, cx
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fld dword [esp + 0x4c]
fadd qword [0x41f7d8]
fsubp st(1)
call fcn.0040aef0
mov word [0x424c7c], ax
jmp 0x40738f
fstp st(0)
mov edi, dword [esp + 0x18]
add ebp, ebp
test dword [esp + 0x1c], ebp
je 0x4073b3
lea eax, [esp + 0x40]
push eax
push edi
push esi
lea ecx, [esp + 0x84]
push ecx
push ebx
call fcn.00402f20
add esp, 0x14
sub dword [esp + 0x2c], 1
jne 0x407300
jmp 0x4073c4
mov edi, dword [esp + 0x18]
lea edx, [esp + 0x40]
push edx
push edi
push esi
push ebx
call fcn.00403b40
add esp, 0x10
mov ebp, dword [esp + 0x380]
mov esi, dword [esp + 0x20]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x407414
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x6c]
mov edi, edx
push 0
push esi
call fcn.004010c0
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x407401
dec dword [0x424340]
mov eax, dword [0x424340]
sub eax, 0xbb53a2c
pop edi
cmp eax, 0xe4c29536
jne 0x40743e
fld dword [0x424490]
fmul qword [0x41f7d0]
fstp dword [0x424490]
push 0
lea ecx, [esp + 0x40]
lea edx, [esp + 0x78]
test ebp, ebp
je 0x407464
push ecx
push edx
call fcn.004010c0
mov eax, dword [esp + 0x1c]
add esp, 0xc
pop esi
pop ebp
pop ebx
add esp, 0x35c
ret
lea eax, [esp + 0x34]
push eax
push ecx
push edx
call fcn.004010c0
mov eax, dword [esp + 0x20]
add esp, 0x10
pop esi
pop ebp
pop ebx
add esp, 0x35c
ret
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x35c
ret