Function at 0x40dc50
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x47d040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x40], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x50], eax
mov eax, dword [0x48536c]
test byte [edi + 8], 0x42
mov dword [ebp - 8], edx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], eax
jne 0x40e6fa
cmp byte [edi + 0x90], 0
jg 0x40e6fa
cmp byte [edi + 0x91], 0
jg 0x40e6fa
cmp byte [edi + 0x7b], 0
je 0x40e6fa
movss xmm2, dword [eax + 0x192c]
xor edx, edx
movss xmm0, dword [edi + 0x3c]
movaps xmm1, xmm2
addss xmm0, dword [0x475a9c]
mulss xmm2, dword [0x475a50]
mov esi, 4
mov cl, byte [eax + 0xb3]
mulss xmm1, dword [0x475aa4]
test cl, cl
mov byte [ebp - 0x15], 0
addss xmm0, xmm2
cmovne edx, esi
mov dword [ebp - 0x4c], edx
maxss xmm1, xmm0
cvttss2si eax, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x475a84]
cvttss2si esi, xmm0
mov dword [ebp - 0x48], esi
je 0x40dd2e
movss xmm0, dword [0x475ac8]
jmp 0x40dd31
xorps xmm0, xmm0
movss dword [ebp - 0x20], xmm0
movss xmm0, dword [0x475b9c]
movss dword [ebp - 0x24], xmm0
movss dword [ebp - 0x28], xmm0
movss dword [ebp - 0x38], xmm0
movss dword [ebp - 0x14], xmm0
mov dword [edi + 0x134], 1
mov dword [edi + 0x138], 2
call fcn.00411f30
xor edx, edx
mov dword [ebp - 0x1c], edx
cmp dword [ebx + 0xc], edx
jle 0x40e193
nop dword [eax]
movss xmm0, dword [edi + 0xc]
lea ecx, [edx + edx*2]
movss xmm1, dword [edi + 0x10]
movaps xmm3, xmm0
addss xmm3, dword [edi + 0x14]
movaps xmm2, xmm1
mov dword [ebp - 0x44], ecx
addss xmm2, dword [edi + 0x18]
xorps xmm6, xmm6
cvtsi2ss xmm6, esi
subss xmm3, xmm0
subss xmm2, xmm1
mulss xmm3, dword [ecx*8 + 0x480288]
mulss xmm2, dword [ecx*8 + 0x48028c]
addss xmm3, xmm0
movss xmm0, dword [ecx*8 + 0x480290]
movaps xmm5, xmm0
mulss xmm0, dword [ebp - 0x20]
addss xmm2, xmm1
mulss xmm5, xmm6
movss xmm1, dword [ecx*8 + 0x480294]
movaps xmm4, xmm1
mulss xmm1, dword [ebp - 0x20]
mulss xmm4, xmm6
addss xmm5, xmm3
subss xmm3, xmm0
addss xmm4, xmm2
subss xmm2, xmm1
movss dword [ebp - 0x60], xmm5
comiss xmm3, xmm5
movss dword [ebp - 0x68], xmm3
movss dword [ebp - 0x64], xmm2
movss dword [ebp - 0x5c], xmm4
jbe 0x40de26
movss dword [ebp - 0x68], xmm5
movss dword [ebp - 0x60], xmm3
comiss xmm2, xmm4
jbe 0x40de35
movss dword [ebp - 0x64], xmm4
movss dword [ebp - 0x5c], xmm2
mov ecx, dword [edi + 0xbc]
lea esi, [ebp - 0xc]
mov eax, dword [edi + 0xc4]
mov edi, 4
mov dword [ebp - 0xc], edx
mov edx, dword [eax + ecx*4 - 4]
not edx
movzx eax, byte [esi]
lea esi, [esi + 1]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x471660]
sub edi, 1
jne 0x40de52
mov eax, dword [0x48536c]
not edx
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x3c]
cmp dword [eax + 0x1aa0], edx
jne 0x40de87
mov dword [eax + 0x1aa4], edx
cmp dword [eax + 0x1adc], edx
jne 0x40de96
mov byte [eax + 0x1ae0], 1
push 0x40800
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0xd]
push eax
lea ecx, [ebp - 0x68]
call fcn.004285d0
mov cl, byte [ebp - 0xd]
add esp, 0xc
test cl, cl
jne 0x40dec0
mov al, byte [ebp - 0xe]
test al, al
je 0x40e3c9
mov edx, dword [ebp - 0x1c]
mov eax, edx
mov ecx, dword [ebp - 0x34]
not eax
and eax, 1
add eax, 5
mov dword [ecx + 0x1e5c], eax
mov al, byte [ebp - 0xe]
test al, al
je 0x40e151
cmp byte [ecx + 0x3e5], 0
je 0x40df3a
test edx, edx
jne 0x40df3a
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x70]
mov edx, edi
push dword [eax + 4]
push dword [eax]
call fcn.0040d5f0
add esp, 8
mov byte [ebp - 0x15], 1
xor edx, edx
xor ecx, ecx
movss xmm3, dword [eax]
movss xmm2, dword [eax + 4]
movss dword [ebp - 0x38], xmm3
movss dword [ebp - 0x14], xmm2
call fcn.00409db0
mov edx, dword [ebp - 0x1c]
cmp byte [ebp - 0xe], 0
je 0x40e168
mov ecx, 0x20
jmp 0x40e173
mov edx, dword [ebp - 0x44]
xorps xmm1, xmm1
movss xmm7, dword [ecx + 0xec]
subss xmm7, dword [ecx + 0x1acc]
cvtsi2ss xmm1, esi
movss xmm6, dword [edx*8 + 0x480290]
xorps xmm1, xmmword [0x476040]
movaps xmm0, xmm6
mulss xmm0, dword [ebp - 0x20]
movss xmm3, dword [edx*8 + 0x480294]
movss xmm4, dword [edx*8 + 0x480288]
movaps xmm2, xmm3
mulss xmm2, dword [ebp - 0x20]
movss xmm5, dword [edx*8 + 0x48028c]
mulss xmm6, xmm1
mulss xmm3, xmm1
movss xmm1, dword [0x475a9c]
subss xmm6, xmm0
ucomiss xmm5, xmm1
subss xmm3, xmm2
mulss xmm6, xmm4
lahf
addss xmm6, xmm0
movss xmm0, dword [ecx + 0xe8]
mulss xmm3, xmm5
subss xmm0, dword [ecx + 0x1ac8]
mov ecx, dword [ebx + 0x14]
addss xmm3, xmm2
addss xmm6, xmm0
movss xmm0, dword [0x475bb8]
addss xmm7, xmm3
test ah, 0x44
jp 0x40dfea
movss xmm5, dword [ecx + 4]
jmp 0x40dfed
movaps xmm5, xmm0
ucomiss xmm4, xmm1
lahf
test ah, 0x44
jp 0x40dffc
movss xmm4, dword [ecx]
jmp 0x40dfff
movaps xmm4, xmm0
movss xmm1, dword [edx*8 + 0x48028c]
xorps xmm0, xmm0
movss xmm2, dword [0x475b9c]
ucomiss xmm1, xmm0
lahf
test ah, 0x44
jp 0x40e023
movss xmm1, dword [ecx + 0xc]
jmp 0x40e026
movaps xmm1, xmm2
movss xmm3, dword [edx*8 + 0x480288]
ucomiss xmm3, xmm0
lahf
test ah, 0x44
jp 0x40e03f
movss xmm0, dword [ecx + 8]
jmp 0x40e042
movaps xmm0, xmm2
comiss xmm5, xmm7
ja 0x40e04e
movaps xmm5, xmm1
minss xmm5, xmm7
comiss xmm4, xmm6
ja 0x40e05a
movaps xmm4, xmm0
minss xmm4, xmm6
movss xmm0, dword [edi + 0xc]
lea ecx, [ebp - 0x58]
movss xmm1, dword [edi + 0x10]
movaps xmm2, xmm0
movss xmm6, dword [edx*8 + 0x48028c]
subss xmm2, xmm4
addss xmm0, dword [edi + 0x14]
mulss xmm2, xmm3
movaps xmm3, xmm1
addss xmm1, dword [edi + 0x18]
subss xmm3, xmm5
addss xmm2, xmm4
subss xmm4, xmm0
mulss xmm3, xmm6
mulss xmm4, dword [edx*8 + 0x480288]
mov edx, edi
addss xmm3, xmm5
movss dword [ebp - 0x24], xmm2
subss xmm5, xmm1
addss xmm4, xmm0
movss dword [ebp - 0x28], xmm3
mulss xmm5, xmm6
subss xmm4, xmm2
addss xmm5, xmm1
movss dword [ebp - 0x30], xmm4
subss xmm5, xmm3
movss dword [ebp - 0x2c], xmm5
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call fcn.0040d5f0
mov ecx, dword [ebp - 0x44]
add esp, 8
movss xmm3, dword [ebp - 0x58]
xorps xmm1, xmm1
movss dword [ebp - 0x38], xmm3
movss xmm0, dword [ecx*8 + 0x480288]
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jp 0x40e119
movss xmm2, dword [ebp - 0x24]
movaps xmm0, xmm3
subss xmm0, dword [ebp - 0x30]
subss xmm2, xmm0
movss dword [ebp - 0x24], xmm2
movss xmm0, dword [ecx*8 + 0x48028c]
movss xmm2, dword [ebp - 0x54]
ucomiss xmm0, xmm1
movss dword [ebp - 0x14], xmm2
lahf
test ah, 0x44
jp 0x40e14b
movss xmm1, dword [ebp - 0x28]
movaps xmm0, xmm2
subss xmm0, dword [ebp - 0x2c]
subss xmm1, xmm0
movss dword [ebp - 0x28], xmm1
mov edx, dword [ebp - 0x1c]
mov al, byte [ebp - 0xe]
mov cl, byte [ebp - 0xd]
test edx, edx
je 0x40df26
test al, al
jne 0x40df30
test cl, cl
je 0x40e186
xor ecx, ecx
cmp byte [ebp - 0xd], cl
setne cl
add ecx, 0x1e
movss xmm1, dword [0x475a9c]
call fcn.00408200
mov ecx, dword [ebp - 0x50]
mov dword [ecx + edx*4], eax
inc edx
mov dword [ebp - 0x1c], edx
cmp edx, dword [ebx + 0xc]
jl 0x40dd80
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x4c], ecx
jbe 0x40e4a1
movd xmm0, esi
mov edx, edi
push ecx
cvtdq2ps xmm3, xmm0
mov dword [esp], 0x40800000
push ecx
lea ecx, [ebp - 0x68]
call fcn.0040db20
mov eax, dword [ebp - 0x20]
add esp, 8
mov ecx, dword [edi + 0xbc]
add eax, 4
mov dword [ebp - 8], eax
mov esi, 4
mov eax, dword [edi + 0xc4]
lea edi, [ebp - 8]
mov edx, dword [eax + ecx*4 - 4]
not edx
movzx eax, byte [edi]
lea edi, [edi + 1]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x471660]
sub esi, 1
jne 0x40e1e1
mov eax, dword [0x48536c]
not edx
mov esi, dword [ebp - 0x48]
cmp dword [eax + 0x1aa0], edx
jne 0x40e213
mov dword [eax + 0x1aa4], edx
cmp dword [eax + 0x1adc], edx
jne 0x40e222
mov byte [eax + 0x1ae0], 1
push 0x800
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xe]
push eax
lea ecx, [ebp - 0x68]
call fcn.004285d0
mov edx, dword [ebp - 0x34]
add esp, 0xc
cmp byte [ebp - 0xe], 0
je 0x40e254
movss xmm0, dword [edx + 0x1a98]
comiss xmm0, dword [0x475a40]
ja 0x40e25e
cmp byte [ebp - 0xd], 0
je 0x40e48e
mov ecx, dword [ebp - 0x20]
mov eax, ecx
mov edi, dword [ebp - 0x3c]
and eax, 1
add eax, 3
cmp byte [ebp - 0xd], 0
mov dword [edx + 0x1e5c], eax
je 0x40e494
mov eax, dword [ebp - 0x40]
mov dword [eax], ecx
movss xmm1, dword [edi + 0xc]
movss xmm0, dword [edi + 0x10]
test ecx, ecx
jne 0x40e3d1
movss xmm0, dword [edx + 0xec]
subss xmm0, dword [edx + 0x1acc]
mov eax, dword [ebx + 0x14]
movss xmm2, dword [0x475bb8]
movaps xmm3, xmm2
addss xmm0, dword [0x475ac8]
movss xmm4, dword [eax + 0xc]
xorps xmm7, xmm7
xorps xmm6, xmm6
movss xmm5, dword [0x475b9c]
comiss xmm3, xmm0
movss dword [ebp - 0x14], xmm6
movss dword [ebp - 0x1c], xmm7
ja 0x40e2e2
movaps xmm3, xmm4
minss xmm3, xmm0
comiss xmm2, xmm1
ja 0x40e2ee
movaps xmm2, xmm5
minss xmm2, xmm1
movss xmm1, dword [edi + 0x10]
lea ecx, [ebp - 0x58]
movss xmm0, dword [edi + 0xc]
movaps xmm5, xmm1
addss xmm1, dword [edi + 0x18]
subss xmm5, xmm3
movaps xmm4, xmm0
addss xmm0, dword [edi + 0x14]
subss xmm4, xmm2
mov edx, edi
mulss xmm5, xmm6
mulss xmm4, xmm7
addss xmm5, xmm3
subss xmm3, xmm1
addss xmm4, xmm2
subss xmm2, xmm0
movss dword [ebp - 0x28], xmm5
mulss xmm3, xmm6
mulss xmm2, xmm7
addss xmm3, xmm1
movss dword [ebp - 0x24], xmm4
addss xmm2, xmm0
subss xmm3, xmm5
subss xmm2, xmm4
movss dword [ebp - 0x2c], xmm3
push dword [ebp - 0x2c]
movss dword [ebp - 0x30], xmm2
push dword [ebp - 0x30]
call fcn.0040d5f0
movss xmm0, dword [ebp - 0x1c]
add esp, 8
xorps xmm1, xmm1
ucomiss xmm0, xmm1
movss xmm0, dword [ebp - 0x58]
movss dword [ebp - 0x38], xmm0
lahf
test ah, 0x44
jp 0x40e395
subss xmm0, dword [ebp - 0x30]
movss xmm2, dword [ebp - 0x24]
subss xmm2, xmm0
movss dword [ebp - 0x24], xmm2
movss xmm0, dword [ebp - 0x14]
ucomiss xmm0, xmm1
movss xmm0, dword [ebp - 0x54]
movss dword [ebp - 0x14], xmm0
lahf
test ah, 0x44
jp 0x40e491
subss xmm0, dword [ebp - 0x2c]
movss xmm1, dword [ebp - 0x28]
subss xmm1, xmm0
movss dword [ebp - 0x28], xmm1
jmp 0x40e491
mov edx, dword [ebp - 0x1c]
jmp 0x40e154
movss xmm4, dword [0x475b9c]
cmp ecx, 1
jne 0x40e412
movss xmm1, dword [edx + 0xe8]
subss xmm1, dword [edx + 0x1ac8]
mov eax, dword [ebx + 0x14]
movss xmm7, dword [0x475a9c]
movss xmm3, dword [0x475bb8]
addss xmm1, dword [0x475ac8]
movss xmm2, dword [eax]
jmp 0x40e2c1
cmp ecx, 2
jne 0x40e44f
movss xmm0, dword [edx + 0xec]
xorps xmm7, xmm7
subss xmm0, dword [edx + 0x1acc]
mov eax, dword [ebx + 0x14]
movss xmm6, dword [0x475a9c]
movss xmm2, dword [0x475bb8]
addss xmm0, dword [0x475ac8]
movss xmm3, dword [eax + 4]
jmp 0x40e2c4
movss xmm3, dword [0x475bb8]
movaps xmm2, xmm3
cmp ecx, 3
jne 0x40e2be
movss xmm1, dword [edx + 0xe8]
xorps xmm7, xmm7
subss xmm1, dword [edx + 0x1ac8]
mov eax, dword [ebx + 0x14]
xorps xmm6, xmm6
addss xmm1, dword [0x475ac8]
movss xmm5, dword [eax + 8]
jmp 0x40e2cc
mov edi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x20]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [ebp - 0x4c]
jl 0x40e1a1
mov esi, dword [0x48536c]
xorps xmm5, xmm5
mov ecx, dword [ebp - 0x34]
mov eax, dword [esi + 0x1a68]
dec dword [eax + 0xbc]
mov dword [edi + 0x134], 0
mov dword [edi + 0x138], 1
mov eax, dword [ecx + 0x1ca8]
test eax, eax
je 0x40e64e
cmp dword [eax + 0x334], edi
jne 0x40e64e
mov eax, dword [ecx + 0x1bd0]
xorps xmm6, xmm6
xorps xmm7, xmm7
cmp eax, 3
jne 0x40e52b
cmp byte [ecx + 0x101], 0
je 0x40e56d
xor edx, edx
lea ecx, [eax + 0xf]
call fcn.00413e00
lea ecx, [edx + 0x11]
movaps xmm7, xmm0
call fcn.00413e00
subss xmm7, xmm0
lea ecx, [edx + 0x14]
addss xmm7, xmm5
call fcn.00413e00
lea ecx, [edx + 0x13]
jmp 0x40e558
cmp eax, 4
jne 0x40e56d
xor edx, edx
lea ecx, [eax + 1]
call fcn.00413e00
lea ecx, [edx + 4]
movaps xmm7, xmm0
call fcn.00413e00
subss xmm7, xmm0
lea ecx, [edx + 7]
addss xmm7, xmm5
call fcn.00413e00
lea ecx, [edx + 6]
xor edx, edx
movaps xmm6, xmm0
call fcn.00413e00
mov ecx, dword [ebp - 0x34]
subss xmm6, xmm0
addss xmm6, xmm5
ucomiss xmm7, xmm5
lahf
test ah, 0x44
jp 0x40e583
ucomiss xmm6, xmm5
lahf
test ah, 0x44
jnp 0x40e64e
movss xmm1, dword [ecx + 0xa8]
movss xmm0, dword [ecx + 0x18]
mulss xmm0, dword [0x475b80]
minss xmm1, dword [ecx + 0xac]
mulss xmm1, xmm0
cvttss2si eax, xmm1
movss xmm1, dword [0x475a9c]
movd xmm2, eax
mov eax, dword [ebx + 0x14]
cvtdq2ps xmm2, xmm2
movss xmm0, dword [eax]
subss xmm0, dword [edi + 0xc]
mulss xmm7, xmm2
mulss xmm6, xmm2
subss xmm0, dword [edi + 0x14]
maxss xmm7, xmm0
movss xmm0, dword [eax + 4]
subss xmm0, dword [edi + 0x10]
subss xmm0, dword [edi + 0x18]
mov byte [ecx + 0x1cbc], 0
mov byte [ecx + 0x1bf3], 1
mov ecx, 0x20
maxss xmm6, xmm0
movss dword [ebp - 0x40], xmm6
call fcn.00408200
mov ecx, dword [ebp - 0x50]
mov edx, edi
movss xmm0, dword [ebp - 0x40]
mov dword [ecx], eax
lea ecx, [ebp - 0x70]
addss xmm0, dword [edi + 0x20]
addss xmm7, dword [edi + 0x1c]
movss dword [ebp - 0x2c], xmm0
push dword [ebp - 0x2c]
movss dword [ebp - 0x30], xmm7
push dword [ebp - 0x30]
call fcn.0040d5f0
mov esi, dword [0x48536c]
add esp, 8
xorps xmm5, xmm5
movss xmm0, dword [eax]
movss dword [ebp - 0x38], xmm0
movss xmm0, dword [eax + 4]
jmp 0x40e653
movss xmm0, dword [ebp - 0x14]
movss xmm1, dword [0x475b9c]
movss xmm2, dword [ebp - 0x38]
ucomiss xmm2, xmm1
lahf
test ah, 0x44
jnp 0x40e68e
test dword [edi + 8], 0x100
movss dword [edi + 0x1c], xmm2
movss dword [edi + 0x20], xmm0
jne 0x40e68e
comiss xmm5, dword [esi + 0x2e6c]
jb 0x40e68e
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x2e6c], eax
movss xmm0, dword [ebp - 0x24]
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jnp 0x40e6d8
test dword [edi + 8], 0x100
cvttss2si eax, xmm0
movd xmm1, eax
cvttss2si eax, dword [ebp - 0x28]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [edi + 0xc], xmm1
movss dword [edi + 0x10], xmm0
jne 0x40e6d8
comiss xmm5, dword [esi + 0x2e6c]
jb 0x40e6d8
mov ecx, dword [esi + 0x1c]
mov dword [esi + 0x2e6c], ecx
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x20]
mov al, byte [ebp - 0x15]
mov dword [edi + 0x14], ecx
mov dword [edi + 0x18], edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044096c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
xor ecx, ebp
pop esi
call fcn.0044096c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret