Function at 0x40d7f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x8c
fld qword [0x4d39c8]
xorps xmm0, xmm0
push ebx
mov ebx, dword [esp + 0x98]
push ebp
push esi
push edi
mov edi, dword [esp + 0xa0]
sub esp, 8
fstp qword [esp]
push edi
movss dword [esp + 0x3c], xmm0
movss dword [esp + 0x40], xmm0
call fcn.0040d580
mov eax, dword [ebx + 8]
xor ebp, ebp
mov dword [esp + 0x38], ebp
test eax, eax
jbe 0x40dd18
jmp 0x40d847
mov edi, dword [esp + 0xa0]
mov ecx, ebp
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
test ecx, ecx
jge 0x40d85b
fadd qword [0x4d35b8]
fmul qword [0x4d3550]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
test eax, eax
jge 0x40d873
fadd qword [0x4d35b8]
mov edx, dword [edi + 0xaf4]
fdivp st(1)
fild dword [edi + 0xaf4]
test edx, edx
jge 0x40d88b
fadd qword [0x4d35b8]
faddp st(1)
push 0
push 0
lea esi, [esp + 0x88]
fstp dword [esp + 0x20]
cvtss2sd xmm0, dword [esp + 0x20]
movsd qword [esp + 0x80], xmm0
call fcn.0042ade0
movsd xmm0, qword [esp + 0x80]
add esp, 8
comisd xmm0, xmmword [0x4d34b0]
jb 0x40d8d3
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x94], xmm0
lea eax, [esp + 0x80]
push eax
push 0
push 0
lea ecx, [edi + 0xac0]
mov esi, edi
call fcn.0040f610
cvtsd2ss xmm0, xmm0
movss dword [esp + 0x54], xmm0
fld dword [esp + 0x54]
fistp dword [esp + 0x48]
cvtsi2sd xmm0, dword [esp + 0x48]
cvtsd2ss xmm0, xmm0
movss dword [esp + 0x3c], xmm0
fld dword [esp + 0x3c]
push ecx
fstp dword [esp]
call fcn.0040d1a0
fldz
sub esp, 8
fst dword [esp + 4]
lea ecx, [esp + 0x30]
fstp dword [esp]
lea eax, [esp + 0x24]
fld dword [esp + 0x44]
push ecx
push ecx
fstp dword [esp]
lea ecx, [esp + 0x3c]
movss dword [esp + 0x70], xmm0
call fcn.00429f00
movss xmm0, dword [esp + 0x4c]
add esp, 0x10
comiss xmm0, dword [0x4d3a50]
jbe 0x40da09
movsd xmm2, qword [0x4d3a48]
cvtps2pd xmm1, xmm0
comisd xmm2, xmm1
jbe 0x40da09
cvtps2pd xmm0, xmm0
subsd xmm0, qword [0x4d3668]
cvtpd2ps xmm0, xmm0
call fcn.00423c70
cvtss2sd xmm0, xmm0
divsd xmm0, qword [0x4d3a40]
cvtsd2ss xmm1, xmm0
movss xmm0, dword [esp + 0x2c]
cvtps2pd xmm2, xmm0
movsd xmm0, qword [0x4bab50]
subsd xmm2, xmm0
cvtss2sd xmm3, xmm1
mulsd xmm2, xmm3
addsd xmm2, xmm0
cvtsd2ss xmm3, xmm2
movss xmm2, dword [esp + 0x1c]
cvtps2pd xmm2, xmm2
cvtss2sd xmm4, xmm1
subsd xmm2, xmm0
mulsd xmm2, xmm4
movss xmm4, dword [esp + 0x28]
cvtps2pd xmm4, xmm4
subsd xmm4, xmm0
cvtss2sd xmm1, xmm1
mulsd xmm4, xmm1
addsd xmm2, xmm0
addsd xmm4, xmm0
cvtpd2ps xmm2, xmm2
cvtpd2ps xmm1, xmm4
movss dword [esp + 0x2c], xmm3
movss dword [esp + 0x1c], xmm2
movss dword [esp + 0x28], xmm1
jmp 0x40da1b
movss xmm1, dword [esp + 0x28]
movss xmm2, dword [esp + 0x1c]
movss xmm3, dword [esp + 0x2c]
cvtss2sd xmm4, xmm2
cvtss2sd xmm5, xmm3
comisd xmm4, xmm5
movaps xmm0, xmm3
jbe 0x40da2f
movaps xmm0, xmm2
cvtss2sd xmm4, xmm1
cvtps2pd xmm5, xmm0
comisd xmm4, xmm5
jbe 0x40da3f
movaps xmm0, xmm1
xorps xmm4, xmm4
ucomiss xmm0, xmm4
lahf
test ah, 0x44
jnp 0x40da8a
cvtps2pd xmm5, xmm0
cvtss2sd xmm3, xmm3
divsd xmm3, xmm5
cvtps2pd xmm5, xmm0
cvtss2sd xmm2, xmm2
cvtss2sd xmm1, xmm1
cvtps2pd xmm0, xmm0
divsd xmm2, xmm5
divsd xmm1, xmm0
cvtsd2ss xmm3, xmm3
cvtpd2ps xmm2, xmm2
cvtsd2ss xmm1, xmm1
movss dword [esp + 0x2c], xmm3
movss dword [esp + 0x1c], xmm2
movss dword [esp + 0x28], xmm1
comiss xmm4, xmm3
jbe 0x40da98
movaps xmm3, xmm4
movss dword [esp + 0x2c], xmm3
comiss xmm4, xmm2
jbe 0x40daa6
movaps xmm2, xmm4
movss dword [esp + 0x1c], xmm2
comiss xmm4, xmm1
jbe 0x40dab4
movaps xmm1, xmm4
movss dword [esp + 0x28], xmm1
movsd xmm0, qword [0x4d35b0]
cvtss2sd xmm3, xmm3
mulsd xmm3, xmm0
cvtsd2ss xmm3, xmm3
movss dword [esp + 0x64], xmm3
fld dword [esp + 0x64]
fistp dword [esp + 0x4c]
cvtss2sd xmm2, xmm2
mulsd xmm2, xmm0
cvtpd2ps xmm2, xmm2
movss dword [esp + 0x58], xmm2
fld dword [esp + 0x58]
fistp dword [esp + 0x44]
cvtss2sd xmm1, xmm1
mulsd xmm1, xmm0
cvtsd2ss xmm0, xmm1
movss dword [esp + 0x5c], xmm0
fld dword [esp + 0x5c]
fistp dword [esp + 0x40]
mov eax, dword [esp + 0x4c]
or eax, 0x5000
shl eax, 8
or eax, dword [esp + 0x44]
shl eax, 8
or eax, dword [esp + 0x40]
mov ecx, eax
mov edx, eax
and edx, 0xffff00ff
mov esi, eax
and esi, 0xff00
shr ecx, 0x18
inc ecx
imul edx, ecx
imul esi, ecx
xor edx, esi
mov esi, eax
and esi, 0xff00ff
imul esi, ecx
and edx, 0xff0000
xor edx, esi
and eax, 0xff000000
shr edx, 8
or edx, eax
mov eax, ebp
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x40db70
fadd dword [0x4d33b0]
mov ecx, dword [ebx + 0xc]
fstp dword [esp + 0x20]
fld dword [esp + 0x60]
fmul qword [0x4d38a8]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fsubr qword [0x4bab50]
fild dword [ebx + 0xc]
test ecx, ecx
jge 0x40db9c
fadd qword [0x4d35b8]
fmulp st(1)
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fistp dword [esp + 0x50]
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], eax
test eax, eax
jge 0x40dbbc
xor eax, eax
mov dword [esp + 0x14], eax
mov esi, dword [ebx + 0xc]
dec esi
cmp esi, eax
jl 0x40dc2a
mov eax, edx
shr eax, 0x18
mov edi, 0x100
sub edi, eax
mov ecx, dword [ebx + 4]
mov eax, dword [ebx + 0x10]
imul ecx, esi
add ecx, ebp
lea ebx, [eax + ecx*4]
mov eax, dword [ebx]
mov ecx, eax
and eax, 0xff00ff
shr ecx, 8
imul eax, edi
mov ebp, ecx
and ebp, 0xffff00ff
imul ebp, edi
and ecx, 0xff00ff
imul ecx, edi
shr eax, 8
xor eax, ebp
mov ebp, dword [esp + 0x38]
and eax, 0xff00ff
xor eax, ecx
add eax, edx
dec esi
cmp esi, dword [esp + 0x14]
mov dword [ebx], eax
mov ebx, dword [esp + 0xa4]
jge 0x40dbd0
mov edi, dword [esp + 0xa0]
movss xmm0, dword [esp + 0x30]
ucomiss xmm0, xmm4
lahf
test ah, 0x44
jp 0x40dc5a
movss xmm0, dword [esp + 0x34]
ucomiss xmm0, xmm4
lahf
test ah, 0x44
jp 0x40dc5a
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
jmp 0x40dcb1
movss xmm0, dword [esp + 0x24]
cvtps2pd xmm1, xmm0
movsd xmm0, qword [0x4c88e8]
addsd xmm1, xmm0
cvtsd2ss xmm1, xmm1
movss dword [esp + 0x24], xmm1
movss xmm1, dword [esp + 0x20]
cvtps2pd xmm1, xmm1
addsd xmm1, xmm0
cvtpd2ps xmm0, xmm1
push ebx
lea edx, [esp + 0x24]
lea ecx, [esp + 0x34]
movss dword [esp + 0x24], xmm0
call fcn.00401fa0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
cvtss2sd xmm0, dword [esp + 0x18]
sub esp, 8
movsd qword [esp], xmm0
call fcn.0040f410
mov ecx, 0xff8ebbff
cmp eax, 1
jne 0x40dcd5
mov ecx, 0xffffcc73
jmp 0x40dcdf
cmp eax, 2
jne 0x40dcdf
mov ecx, 0xffff633d
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x68], ebp
inc ebp
lea edx, [eax - 3]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], eax
cmp ecx, 0x1000000
jb 0x40dd09
push ecx
push ebx
lea edi, [esp + 0x70]
call fcn.00474950
mov eax, dword [ebx + 8]
mov dword [esp + 0x38], ebp
cmp ebp, eax
jb 0x40d840
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x8c
ret 8