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

Disassembly:
sub esp, 0x374
fldz
push ebx
fst dword [esp + 0x20]
xor eax, eax
fldz
push ebp
fst qword [esp + 0x40]
push esi
fst qword [esp + 0x78]
push edi
xor edi, edi
mov word [esp + 0x18], ax
fstp qword [esp + 0x58]
mov eax, 0x241418f2
mov ebp, 1
fst dword [esp + 0x20]
mov dword [esp + 0x50], edi
fst dword [esp + 0x28]
or ebx, 0xffffffff
fst dword [esp + 0x24]
movzx ecx, word [0x423f4c]
movsx edx, cx
sub eax, edx
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x394]
fild dword [esp + 0x10]
fmul dword [0x424924]
fstp dword [0x424924]
add word [0x423f4c], bp
add word [0x424948], bx
movzx ecx, word [0x424948]
mov dx, word [0x425f48]
movsx ecx, cx
movsx eax, dx
sub eax, ecx
mov ecx, dword [0x42558c]
mov edx, dword [esp + 0x50]
add eax, ecx
add edx, eax
mov word [0x425f48], dx
add dword [0x42558c], ebx
lea eax, [esp + 0x60]
fst dword [esp + 0x14]
lea ecx, [esp + 0x64]
fstp dword [esp + 0x18]
push ecx
fld dword [esp + 0x18]
push esi
fld dword [esp + 0x1c]
fsub dword [0x42567c]
fsub qword [0x41f4f8]
fsubp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fsub dword [esp + 0x1c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
mov dword [esp + 0x68], edi
fld1
mov dword [esp + 0x6c], ebp
fsub st(1), st(0)
mov dword [esp + 0x70], ebp
fxch st(1)
mov dword [esp + 0x74], eax
fstp dword [esp + 0x1c]
fsubr dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fsub qword [0x41f4f0]
fsub qword [0x41f4e8]
fstp dword [esp + 0x20]
call fcn.00401fa0
add esp, 8
test eax, eax
jl 0x4078e6
mov edx, dword [esi + 8]
test byte [edx], 1
je 0x4078e6
lea eax, [esp + 0x1c]
push esi
push eax
call fcn.00402620
push edi
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00401360
push 0x300
lea eax, [esp + 0x9c]
push edi
push eax
call fcn.0040b450
mov ecx, dword [esp + 0x3b0]
push ecx
call fcn.004013f0
add esp, 0x24
cmp eax, 0x29f
jle 0x4070c7
mov dword [esp + 0x14], 6
jmp 0x4070f7
cmp eax, 0xef
jle 0x4070d8
mov dword [esp + 0x14], 5
jmp 0x4070f7
cmp eax, 0x4f
jle 0x4070e7
mov dword [esp + 0x14], 4
jmp 0x4070f7
xor edx, edx
cmp eax, 0x17
setg dl
lea edx, [edx + edx + 1]
mov dword [esp + 0x14], edx
mov eax, dword [0x423e8c]
sub eax, 0x7183b720
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fstp qword [esp + 0x58]
add dword [0x423e8c], ebx
mov edi, dword [esi + 4]
add edi, ebp
mov ebp, dword [esp + 0x388]
push edi
push ebp
call fcn.00401280
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
lea ecx, [esp + 0x90]
push edi
push ecx
call fcn.00401280
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
lea edx, [edi + edi]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.00401280
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
mov cx, word [0x4256dc]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul qword [0x425710]
call fcn.0040b030
mov edi, dword [esp + 0x398]
mov word [0x4256dc], ax
fld qword [0x425710]
fsub qword [0x41f348]
fstp qword [0x425710]
test edi, edi
je 0x4071ce
cmp dword [edi + 8], 0
je 0x4071ce
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
jmp 0x4072c3
add word [0x423e28], bx
mov ax, word [0x423e28]
movsx ecx, ax
mov edx, 0x950a117a
sub edx, ecx
mov dword [esp + 0x10], edx
lea eax, [esp + 0x3c]
push 1
fild dword [esp + 0x14]
push eax
fstp qword [esp + 0x50]
call fcn.00402cc0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x407831
mov ecx, dword [esi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00401a70
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x407831
fld dword [esp + 0x20]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fadd qword [esp + 0x48]
mov ax, word [0x424974]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fmulp st(1)
call fcn.0040b030
mov word [0x424974], ax
fsubr qword [esp + 0x48]
lea edx, [esp + 0x3c]
push esi
push edx
fstp qword [esp + 0x50]
mov eax, edx
push eax
call fcn.004068e0
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne 0x407831
test edi, edi
je 0x40729d
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov dword [edi], ecx
mov dword [edi + 4], edx
mov dword [edi + 8], eax
fld dword [0x4259e0]
fsub qword [0x41f850]
fmul dword [esp + 0x2c]
fstp dword [esp + 0x2c]
fld dword [0x4259e0]
fsub qword [0x41f348]
fstp dword [0x4259e0]
mov edi, dword [esp + 0x38c]
push esi
push edi
call fcn.00401fa0
add esp, 8
test eax, eax
jl 0x4072ec
push esi
lea ecx, [esp + 0x94]
push edi
push ecx
call fcn.004068e0
add esp, 0xc
jmp 0x4072fd
lea edx, [esp + 0x90]
push edi
push edx
call fcn.004021f0
add esp, 8
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push ecx
push esi
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0xa0]
push eax
call fcn.00404500
lea ecx, [esp + 0x50]
push ecx
push ebp
call fcn.004021f0
add esp, 0x1c
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
fld qword [0x4259e8]
fld qword [esp + 0x48]
fcompp
fnstsw ax
fld qword [0x4259e8]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [0x4259e8]
test ah, 0x41
jne 0x4073bb
fld dword [0x423e38]
fsub qword [0x41f848]
fld dword [esp + 0x28]
mov dx, word [0x423f44]
fadd qword [0x41f840]
inc word [0x423f44]
movsx eax, dx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
faddp st(1)
fucompp
fnstsw ax
fadd dword [0x423e38]
fstp dword [0x423e38]
test ah, 0x44
jp 0x4073bd
fld qword [0x423e78]
fld qword [0x425fe8]
fsub qword [0x41f838]
fsubp st(1)
fstp qword [0x423e78]
jmp 0x4073bd
fstp st(0)
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
push ecx
push edx
push esi
push ebp
call fcn.00404950
mov ebx, dword [esp + 0x24]
add esp, 0x10
cmp ebx, 1
jle 0x40756d
fld qword [0x423e68]
dec ebx
fsub qword [0x41f830]
mov ecx, ebx
mov ebp, 1
shl ebp, cl
fsub qword [0x41f828]
call fcn.0040b030
mov dword [0x423c80], eax
fld qword [0x423e68]
fadd qword [0x41f348]
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x84]
fstp qword [0x423e68]
mov eax, dword [esi + 4]
inc eax
push eax
push edi
call fcn.00401280
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
lea ecx, [esp + 0x90]
push ecx
push edi
mov dword [0x423f04], 0xaaa0c9ed
call fcn.004021f0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
test ebx, ebx
jle 0x407480
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push edx
push eax
push esi
push edi
push edi
call fcn.00404500
add esp, 0x14
sub ebx, 1
jne 0x407466
fld dword [esp + 0x2c]
fsub dword [esp + 0x28]
fcomp qword [0x41f820]
fnstsw ax
test ah, 1
jne 0x4074d2
fld dword [0x424890]
fsub qword [0x41f348]
fstp dword [0x424890]
fld dword [0x424890]
mov cx, word [0x425a5c]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsubp st(1)
call fcn.0040b030
mov dword [0x4255c8], eax
inc word [0x425a5c]
mov ecx, dword [esp + 0x14]
mov ebx, 1
shl ebx, cl
inc ebp
cmp ebp, ebx
jge 0x40756d
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x84]
mov eax, dword [esi + 4]
inc eax
push eax
push edi
call fcn.00401280
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
lea ecx, [edi - 0xc]
push ecx
push edi
call fcn.004021f0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40782a
fld dword [esp + 0x24]
fsub qword [0x41f818]
fcomp qword [0x41f810]
fnstsw ax
test ah, 0x41
jp 0x407549
fld qword [esp + 0x58]
fsub qword [0x41f808]
fstp qword [esp + 0x58]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push edx
push eax
push esi
lea ecx, [esp + 0x9c]
push ecx
push edi
call fcn.00404500
inc ebp
add esp, 0x14
add edi, 0xc
cmp ebp, ebx
jl 0x4074f1
mov edx, dword [0x423c9c]
mov eax, dword [0x42571c]
lea ecx, [eax + edx + 0x40f78364]
mov edx, dword [esp + 0x390]
mov word [0x425a40], cx
mov eax, 1
add dword [0x42571c], eax
add dword [0x423c9c], eax
fld dword [0x423f28]
fld qword [esp + 0x7c]
mov eax, dword [edx + 4]
fsub dword [esp + 0x28]
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x10], eax
fsubp st(1)
mov dword [esp + 0x20], ebx
xor ebp, ebp
fstp dword [0x423f28]
fld dword [esp + 0x28]
fadd qword [0x41f348]
fstp dword [esp + 0x28]
jmp 0x4075d7
fstp st(0)
cmp dword [esp + 0x20], 0
jne 0x4075f9
mov eax, dword [esp + 0x10]
mov ecx, eax
dec eax
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x407771
mov dword [esp + 0x20], 0x20
mov edx, dword [esp + 0x390]
fld dword [0x424038]
mov eax, dword [edx + 8]
fsub qword [0x41f800]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
mov eax, dword [eax + edx*4]
fstp dword [0x424038]
dec ecx
shr eax, cl
mov dword [esp + 0x20], ecx
and eax, 1
jne 0x4076b8
test ebx, ebx
je 0x4075d7
cmp ebx, 1
jne 0x4076b8
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x38c]
push ecx
push esi
push eax
push eax
call fcn.00404500
fld qword [esp + 0x5c]
fcomp qword [0x41f7f8]
add esp, 0x14
fnstsw ax
fld qword [esp + 0x48]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x48]
test ah, 0x44
jp 0x4075d5
fld dword [0x42567c]
fadd st(1)
fstp dword [0x42567c]
fld dword [0x42567c]
fcomp qword [0x41f7f0]
fnstsw ax
test ah, 0x44
jnp 0x4075d5
fld dword [esp + 0x2c]
fadd qword [0x41f7e8]
fstp dword [esp + 0x28]
fsubr dword [esp + 0x2c]
fstp dword [esp + 0x2c]
jmp 0x4075d7
mov edx, dword [esp + 0x14]
inc edi
mov ecx, edx
sub ecx, edi
shl eax, cl
mov ebx, 2
or ebp, eax
cmp edi, edx
jne 0x4075d7
mov edi, dword [esp + 0x1c]
mov ebx, edx
test ebx, ebx
jle 0x4076fd
lea esp, [esp]
mov eax, dword [esp + 0x388]
lea edx, [esp + 0x30]
push edx
push edi
push esi
push eax
push eax
call fcn.00404500
add esp, 0x14
sub ebx, 1
jne 0x4076e0
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x38c]
push edi
lea ecx, [ebp + ebp*2]
push esi
lea edx, [esp + ecx*4 + 0x90]
push edx
push eax
call fcn.00404500
fld qword [0x423fa0]
fsub qword [0x41f348]
add esp, 0x14
mov ebx, 1
xor edi, edi
fstp qword [0x423fa0]
fld qword [0x423fa0]
mov cx, word [0x423f4c]
fadd qword [0x41f7e0]
movsx edx, cx
mov dword [esp + 0x24], edx
fsub qword [0x41f7d8]
fild dword [esp + 0x24]
fmulp st(1)
call fcn.0040b030
mov word [0x423f4c], ax
xor ebp, ebp
jmp 0x4075d7
mov ecx, dword [esp + 0x14]
mov eax, 1
rol eax, cl
mov dword [esp + 0x24], eax
test edi, edi
jle 0x4077dd
mov dword [esp + 0x10], edi
jmp 0x407790
add dword [esp + 0x50], 0xf57522a0
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x388]
lea eax, [esp + 0x30]
push eax
push ebx
push esi
push edi
push edi
call fcn.00404500
add ebp, ebp
add esp, 0x14
test dword [esp + 0x24], ebp
je 0x4077d4
lea ecx, [esp + 0x30]
push ecx
push ebx
push esi
lea edx, [esp + 0x9c]
push edx
push edi
call fcn.00404500
add esp, 0x14
sub dword [esp + 0x10], 1
jne 0x407790
jmp 0x4077e8
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x388]
fldz
lea ecx, [esp + 0x30]
push ecx
fstp dword [esp + 0x28]
push ebx
mov eax, 1
push esi
lea edx, [esp + 0x7c]
mov dword [esp + 0x60], 0
mov dword [esp + 0x60], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
push edx
lea eax, [esp + 0x64]
push edi
mov dword [esp + 0x8c], eax
call fcn.00404500
add esp, 0x14
mov edi, dword [esp + 0x398]
mov esi, dword [esp + 0x14]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x40787a
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x84]
mov edi, edx
lea ebx, [ebx]
push 0
push esi
call fcn.004024b0
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x407860
mov edi, dword [esp + 0x398]
inc word [0x424894]
mov ax, word [0x424894]
movzx ecx, word [0x425f64]
cwde
sub ecx, eax
sub ecx, 0x6651e1c7
mov word [0x425f64], cx
push 0
lea edx, [esp + 0x34]
lea eax, [esp + 0x94]
test edi, edi
je 0x4078c8
push edx
push eax
call fcn.004024b0
mov eax, dword [esp + 0x24]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x374
ret
lea ecx, [esp + 0x40]
push ecx
push edx
push eax
call fcn.004024b0
mov eax, dword [esp + 0x28]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x374
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x374
ret