Function at 0x40b570
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, 0x78
mov eax, dword [0x4b5c78]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x24], eax
test byte [edi + 8], 0x42
jne 0x40c097
cmp byte [edi + 0xa4], 0
jg 0x40c097
cmp byte [edi + 0xa5], 0
jg 0x40c097
cmp byte [edi + 0x8b], 0
je 0x40c097
movss xmm2, dword [eax + 0x1930]
xor edx, edx
movss xmm0, dword [edi + 0x44]
movaps xmm1, xmm2
addss xmm0, dword [0x491c7c]
mulss xmm2, dword [0x491c2c]
mov esi, 4
mov cl, byte [eax + 0xb4]
mulss xmm1, dword [0x491c88]
test cl, cl
mov byte [ebp - 3], 0
addss xmm0, xmm2
cmovne edx, esi
mov dword [ebp - 0x38], edx
maxss xmm1, xmm0
cvttss2si eax, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x491c60]
cvttss2si esi, xmm0
mov dword [ebp - 0x2c], esi
je 0x40b63b
movss xmm0, dword [0x491cb8]
jmp 0x40b63e
xorps xmm0, xmm0
movss dword [ebp - 0x20], xmm0
movss xmm0, dword [0x491d28]
movss dword [ebp - 0x10], xmm0
movss dword [ebp - 0x14], xmm0
movss dword [ebp - 0x1c], xmm0
movss dword [ebp - 8], xmm0
mov dword [edi + 0x144], 1
call fcn.0040f240
xor edx, edx
mov dword [ebp - 0x18], edx
cmp dword [ebx + 0xc], edx
jle 0x40bb2d
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]
movss xmm2, dword [edi + 0x18]
xorps xmm6, xmm6
addss xmm2, xmm1
mov dword [ebp - 0x28], ecx
cvtsi2ss xmm6, esi
subss xmm3, xmm0
subss xmm2, xmm1
mulss xmm3, dword [ecx*8 + 0x4b2f20]
mulss xmm2, dword [ecx*8 + 0x4b2f24]
addss xmm3, xmm0
movss xmm0, dword [ecx*8 + 0x4b2f28]
movaps xmm5, xmm0
addss xmm2, xmm1
mulss xmm5, xmm6
movss xmm1, dword [ecx*8 + 0x4b2f2c]
movaps xmm4, xmm1
mulss xmm4, xmm6
addss xmm5, xmm3
movss xmm6, dword [ebp - 0x20]
mulss xmm0, xmm6
mulss xmm1, xmm6
addss xmm4, xmm2
subss xmm3, xmm0
movss dword [ebp - 0x58], xmm5
subss xmm2, xmm1
movss dword [ebp - 0x54], xmm4
comiss xmm3, xmm5
movss dword [ebp - 0x60], xmm3
movss dword [ebp - 0x5c], xmm2
jbe 0x40b72a
movss dword [ebp - 0x60], xmm5
movss dword [ebp - 0x58], xmm3
comiss xmm2, xmm4
jbe 0x40b739
movss dword [ebp - 0x5c], xmm4
movss dword [ebp - 0x54], xmm2
mov ecx, dword [edi + 0xc4]
mov esi, 4
mov eax, dword [edi + 0xcc]
lea edi, [ebp - 0x34]
mov dword [ebp - 0x34], edx
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 + 0x48d7c0]
sub esi, 1
jne 0x40b756
mov eax, dword [0x4b5c78]
not edx
mov esi, dword [ebp - 0x2c]
cmp dword [eax + 0x1bd4], edx
jne 0x40b788
mov dword [eax + 0x1bd8], edx
cmp dword [eax + 0x1c0c], edx
jne 0x40b797
mov byte [eax + 0x1c10], 1
push 0x40800
lea eax, [ebp - 1]
push eax
lea eax, [ebp - 2]
push eax
lea ecx, [ebp - 0x60]
call fcn.00426850
mov cl, byte [ebp - 2]
add esp, 0xc
test cl, cl
jne 0x40b7c1
mov al, byte [ebp - 1]
test al, al
je 0x40bae0
mov edx, dword [ebp - 0x18]
mov eax, edx
mov ecx, dword [ebp - 0x24]
not eax
and eax, 1
add eax, 5
mov dword [ecx + 0x1e40], eax
mov al, byte [ebp - 1]
test al, al
je 0x40bae8
cmp byte [ecx + 0x3dd], 0
je 0x40b8be
test edx, edx
jne 0x40b8be
push dword [ebp - 0x30]
mov edi, dword [ebp - 0xc]
lea ecx, [ebp - 0x68]
mov edx, edi
call fcn.0040aed0
mov edx, dword [0x4b5c78]
add esp, 4
mov byte [ebp - 3], 1
movss xmm3, dword [eax]
mov ecx, dword [edx + 0x1bd4]
test ecx, ecx
movss xmm2, dword [eax + 4]
setne al
movss dword [ebp - 0x1c], xmm3
movss dword [ebp - 8], xmm2
mov byte [edx + 0x1be0], al
test ecx, ecx
je 0x40b859
mov dword [edx + 0x1bdc], 0
mov word [edx + 0x1be3], 0
mov dword [edx + 0x1c08], 0xffffffff
mov dword [edx + 0x1bd4], 0
mov word [edx + 0x1be1], 0
mov dword [edx + 0x1c00], 0
mov word [edx + 0x1be5], 0
mov dword [edx + 0x1be8], 0
mov dword [edx + 0x1bec], 0
mov dword [edx + 0x1bf0], 0
mov dword [edx + 0x1bf4], 0
mov edx, dword [ebp - 0x18]
cmp byte [ebp - 1], 0
je 0x40bb02
mov ecx, 0x20
jmp 0x40bb0d
mov edx, dword [ebp - 0x28]
movss xmm3, dword [0x491c7c]
mov edi, dword [ebx + 0x14]
movss xmm2, dword [0x491d50]
movss xmm1, dword [edx*8 + 0x4b2f24]
ucomiss xmm1, xmm3
lahf
test ah, 0x44
jp 0x40b8ed
movss xmm6, dword [edi + 4]
jmp 0x40b8f0
movaps xmm6, xmm2
movss xmm0, dword [edx*8 + 0x4b2f20]
ucomiss xmm0, xmm3
lahf
test ah, 0x44
jp 0x40b908
movss xmm5, dword [edi]
jmp 0x40b90b
movaps xmm5, xmm2
xorps xmm2, xmm2
ucomiss xmm1, xmm2
movss xmm1, dword [0x491d28]
lahf
test ah, 0x44
jp 0x40b926
movss xmm7, dword [edi + 0xc]
jmp 0x40b929
movaps xmm7, xmm1
ucomiss xmm0, xmm2
lahf
test ah, 0x44
jp 0x40b93e
movss xmm0, dword [edi + 8]
movss dword [ebp - 0x1c], xmm0
jmp 0x40b943
movss dword [ebp - 0x1c], xmm1
movss xmm4, dword [edx*8 + 0x4b2f28]
xorps xmm3, xmm3
movss xmm2, dword [edx*8 + 0x4b2f2c]
movaps xmm0, xmm4
mulss xmm0, dword [ebp - 0x20]
movaps xmm1, xmm2
mulss xmm1, dword [ebp - 0x20]
cvtsi2ss xmm3, esi
xorps xmm3, xmmword [0x492d80]
mulss xmm4, xmm3
mulss xmm2, xmm3
subss xmm4, xmm0
subss xmm2, xmm1
mulss xmm4, dword [edx*8 + 0x4b2f20]
mulss xmm2, dword [edx*8 + 0x4b2f24]
addss xmm4, xmm0
movss xmm0, dword [ecx + 0xe4]
subss xmm0, dword [ecx + 0x1bf8]
addss xmm2, xmm1
addss xmm4, xmm0
movss xmm0, dword [ecx + 0xe8]
subss xmm0, dword [ecx + 0x1bfc]
addss xmm0, xmm2
comiss xmm6, xmm0
ja 0x40b9d1
movaps xmm6, xmm7
minss xmm6, xmm0
comiss xmm5, xmm4
ja 0x40b9df
movss xmm5, dword [ebp - 0x1c]
minss xmm5, xmm4
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x48]
movss xmm7, dword [edx*8 + 0x4b2f20]
lea ecx, [ebp - 0x50]
push eax
movss xmm2, dword [edi + 0xc]
movss xmm4, dword [edi + 0x10]
movaps xmm3, xmm2
movss xmm1, dword [edi + 0x18]
subss xmm3, xmm5
addss xmm2, dword [edi + 0x14]
addss xmm1, dword [edi + 0x10]
subss xmm4, xmm6
mulss xmm3, xmm7
mulss xmm4, dword [edx*8 + 0x4b2f24]
addss xmm3, xmm5
subss xmm5, xmm2
addss xmm4, xmm6
subss xmm6, xmm1
movss dword [ebp - 0x10], xmm3
mulss xmm5, xmm7
mulss xmm6, dword [edx*8 + 0x4b2f24]
mov edx, edi
addss xmm5, xmm2
movss dword [ebp - 0x14], xmm4
addss xmm6, xmm1
subss xmm5, xmm3
subss xmm6, xmm4
movss dword [ebp - 0x48], xmm5
movss dword [ebp - 0x44], xmm6
call fcn.0040aed0
mov ecx, dword [ebp - 0x28]
add esp, 4
movss xmm3, dword [ebp - 0x50]
xorps xmm2, xmm2
movss dword [ebp - 0x1c], xmm3
movss xmm0, dword [ecx*8 + 0x4b2f20]
ucomiss xmm0, xmm2
lahf
test ah, 0x44
jp 0x40baa6
movss xmm1, dword [ebp - 0x10]
movaps xmm0, xmm3
subss xmm0, dword [ebp - 0x48]
subss xmm1, xmm0
movss dword [ebp - 0x10], xmm1
movss xmm0, dword [ecx*8 + 0x4b2f24]
ucomiss xmm0, xmm2
movss xmm2, dword [ebp - 0x4c]
movss dword [ebp - 8], xmm2
lahf
test ah, 0x44
jp 0x40bad8
movss xmm1, dword [ebp - 0x14]
movaps xmm0, xmm2
subss xmm0, dword [ebp - 0x44]
subss xmm1, xmm0
movss dword [ebp - 0x14], xmm1
mov edx, dword [ebp - 0x18]
mov al, byte [ebp - 1]
jmp 0x40baeb
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
jmp 0x40baee
mov edi, dword [ebp - 0xc]
mov cl, byte [ebp - 2]
test edx, edx
je 0x40b8aa
test al, al
jne 0x40b8b4
test cl, cl
je 0x40bb20
xor ecx, ecx
cmp byte [ebp - 2], cl
setne cl
add ecx, 0x1e
movss xmm1, dword [0x491c7c]
call fcn.004055b0
mov ecx, dword [ebx + 0x10]
mov dword [ecx + edx*4], eax
inc edx
mov dword [ebp - 0x18], edx
cmp edx, dword [ebx + 0xc]
jl 0x40b680
xor edi, edi
mov dword [ebp - 0x34], edi
cmp dword [ebp - 0x38], edi
jbe 0x40bdf7
nop dword [eax + eax]
lea eax, [edi*8]
sub eax, edi
shl eax, 2
mov dword [ebp - 0x40], eax
test edi, edi
je 0x40bb72
cmp edi, 1
je 0x40bb72
mov dword [ebp - 0x28], 3
lea eax, [ebp - 0x44]
mov dword [ebp - 0x20], 0xe8
mov dword [ebp - 0x18], 0x1bfc
jmp 0x40bb8a
mov dword [ebp - 0x28], 4
lea eax, [ebp - 0x48]
mov dword [ebp - 0x20], 0xe4
mov dword [ebp - 0x18], 0x1bf8
mov edx, dword [ebp - 0xc]
movd xmm0, esi
push ecx
cvtdq2ps xmm3, xmm0
mov dword [esp], 0x40800000
lea ecx, [ebp - 0x78]
push edi
mov dword [ebp - 0x30], eax
call fcn.0040b450
mov ecx, dword [edx + 0xc4]
lea eax, [edi + 4]
mov dword [ebp - 0x3c], eax
lea esi, [ebp - 0x3c]
mov eax, dword [edx + 0xcc]
add esp, 8
mov edi, 4
mov edx, dword [eax + ecx*4 - 4]
not edx
nop dword [eax + eax]
movzx eax, byte [esi]
lea esi, [esi + 1]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x48d7c0]
sub edi, 1
jne 0x40bbd0
mov eax, dword [0x4b5c78]
not edx
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x34]
cmp dword [eax + 0x1bd4], edx
jne 0x40bc05
mov dword [eax + 0x1bd8], edx
cmp dword [eax + 0x1c0c], edx
jne 0x40bc14
mov byte [eax + 0x1c10], 1
push 0x800
lea eax, [ebp - 1]
push eax
lea eax, [ebp - 2]
push eax
lea ecx, [ebp - 0x78]
call fcn.00426850
mov al, byte [ebp - 1]
add esp, 0xc
cmp byte [ebp - 2], 0
mov edx, dword [ebp - 0x24]
je 0x40bc49
movss xmm0, dword [edx + 0x1bcc]
comiss xmm0, dword [0x491c18]
ja 0x40bc51
test al, al
je 0x40bdea
mov ecx, dword [ebp - 0x28]
mov dword [edx + 0x1e40], ecx
test al, al
je 0x40bdea
mov eax, dword [ebx + 8]
mov dword [eax], edi
cmp edi, 3
jne 0x40be7b
mov eax, dword [ebx + 0x14]
movss xmm4, dword [0x491d50]
movss xmm5, dword [eax + 4]
movss xmm1, dword [0x491d28]
movss xmm2, dword [0x491d28]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x20]
movss xmm0, dword [eax + 0xc]
movss dword [ebp - 0x48], xmm0
movss xmm0, dword [eax + 0x10]
movss dword [ebp - 0x44], xmm0
movss xmm0, dword [ecx + edx]
mov ecx, dword [ebp - 0x18]
subss xmm0, dword [ecx + edx]
mov ecx, dword [ebp - 0x30]
addss xmm0, dword [0x491cb8]
movss dword [ecx], xmm0
movss xmm0, dword [ebp - 0x44]
comiss xmm5, xmm0
ja 0x40bcd7
movaps xmm5, xmm1
minss xmm5, xmm0
movss xmm0, dword [ebp - 0x48]
comiss xmm4, xmm0
ja 0x40bce8
movaps xmm4, xmm2
minss xmm4, xmm0
mov ecx, dword [ebp - 0x40]
mov edx, eax
movss xmm7, dword [eax + 0x10]
movss xmm6, dword [eax + 0xc]
subss xmm7, xmm5
movss xmm2, dword [eax + 0x18]
subss xmm6, xmm4
movss xmm0, dword [ecx + 0x4b2f8c]
minss xmm0, dword [ecx + 0x4b2f94]
movss xmm3, dword [ecx + 0x4b2f88]
minss xmm3, dword [ecx + 0x4b2f90]
addss xmm2, dword [eax + 0x10]
lea ecx, [ebp - 0x50]
movss dword [ebp - 0x30], xmm0
mulss xmm7, xmm0
push ecx
movss xmm0, dword [eax + 0x14]
lea ecx, [ebp - 0x58]
addss xmm0, dword [eax + 0xc]
mulss xmm6, xmm3
addss xmm7, xmm5
subss xmm5, xmm2
movss dword [ebp - 0x40], xmm3
addss xmm6, xmm4
subss xmm4, xmm0
movss dword [ebp - 0x14], xmm7
mulss xmm5, dword [ebp - 0x30]
movss dword [ebp - 0x10], xmm6
mulss xmm4, xmm3
addss xmm5, xmm2
addss xmm4, xmm0
subss xmm5, xmm7
subss xmm4, xmm6
movss dword [ebp - 0x4c], xmm5
movss dword [ebp - 0x50], xmm4
call fcn.0040aed0
movss xmm0, dword [ebp - 0x40]
add esp, 4
xorps xmm2, xmm2
ucomiss xmm0, xmm2
movss xmm0, dword [ebp - 0x58]
movss dword [ebp - 0x1c], xmm0
lahf
test ah, 0x44
jp 0x40bdbf
subss xmm0, dword [ebp - 0x50]
movss xmm1, dword [ebp - 0x10]
subss xmm1, xmm0
movss dword [ebp - 0x10], xmm1
movss xmm0, dword [ebp - 0x30]
ucomiss xmm0, xmm2
movss xmm0, dword [ebp - 0x54]
movss dword [ebp - 8], xmm0
lahf
test ah, 0x44
jp 0x40bdea
subss xmm0, dword [ebp - 0x4c]
movss xmm1, dword [ebp - 0x14]
subss xmm1, xmm0
movss dword [ebp - 0x14], xmm1
inc edi
mov dword [ebp - 0x34], edi
cmp edi, dword [ebp - 0x38]
jl 0x40bb40
mov eax, dword [0x4b5c78]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x24]
mov eax, dword [eax + 0x1b9c]
dec dword [eax + 0xc4]
mov dword [esi + 0x144], 0
mov eax, dword [edi + 0x1e08]
test eax, eax
je 0x40bfe6
cmp dword [eax + 0x31c], esi
jne 0x40bfe6
mov eax, dword [edi + 0x1d30]
cmp eax, 2
jne 0x40bec9
cmp byte [edi + 0xfd], 0
je 0x40bfe6
sub esp, 8
lea edx, [eax - 1]
xorps xmm3, xmm3
lea ecx, [ebp - 0x50]
mov dword [esp + 4], 0
call fcn.004115e0
add esp, 8
xorps xmm6, xmm6
movss xmm7, dword [eax]
movss xmm5, dword [eax + 4]
jmp 0x40bf0d
movss xmm0, dword [0x491d50]
movaps xmm5, xmm0
cmp edi, 1
jne 0x40be97
mov eax, dword [ebx + 0x14]
movss xmm4, dword [eax]
jmp 0x40bc80
movaps xmm4, xmm0
cmp edi, 2
jne 0x40beac
mov eax, dword [ebx + 0x14]
movss xmm1, dword [eax + 0xc]
jmp 0x40bc88
movss xmm1, dword [0x491d28]
test edi, edi
jne 0x40bc88
mov eax, dword [ebx + 0x14]
movss xmm2, dword [eax + 8]
jmp 0x40bc90
cmp eax, 3
jne 0x40bfe6
xor edx, edx
lea ecx, [eax + 2]
call fcn.00411500
lea ecx, [edx + 4]
movaps xmm7, xmm0
call fcn.00411500
subss xmm7, xmm0
xorps xmm6, xmm6
lea ecx, [edx + 7]
addss xmm7, xmm6
call fcn.00411500
lea ecx, [edx + 6]
movaps xmm5, xmm0
call fcn.00411500
subss xmm5, xmm0
addss xmm5, xmm6
ucomiss xmm7, xmm6
lahf
test ah, 0x44
jp 0x40bf23
ucomiss xmm5, xmm6
lahf
test ah, 0x44
jnp 0x40bfe9
movss xmm1, dword [edi + 0xa8]
mov ecx, 0x20
movss xmm0, dword [edi + 0x18]
mulss xmm0, dword [0x491d0c]
minss xmm1, dword [edi + 0xac]
mulss xmm1, xmm0
cvttss2si eax, xmm1
movss xmm1, dword [0x491c7c]
movd xmm2, eax
mov eax, dword [ebx + 0x14]
cvtdq2ps xmm2, xmm2
movss xmm0, dword [eax]
subss xmm0, dword [esi + 0xc]
mulss xmm7, xmm2
mulss xmm5, xmm2
subss xmm0, dword [esi + 0x14]
maxss xmm7, xmm0
movss xmm0, dword [eax + 4]
subss xmm0, dword [esi + 0x10]
subss xmm0, dword [esi + 0x18]
mov byte [edi + 0x1e1c], 0
mov byte [edi + 0x1d53], 1
maxss xmm5, xmm0
movss dword [ebp - 0x40], xmm5
call fcn.004055b0
mov ecx, dword [ebx + 0x10]
mov edx, esi
mov dword [ecx], eax
lea eax, [ebp - 0x58]
movss xmm0, dword [esi + 0x20]
lea ecx, [ebp - 0x48]
addss xmm7, dword [esi + 0x1c]
addss xmm0, dword [ebp - 0x40]
push eax
movss dword [ebp - 0x58], xmm7
movss dword [ebp - 0x54], xmm0
call fcn.0040aed0
add esp, 4
xorps xmm6, xmm6
movss xmm0, dword [eax]
movss dword [ebp - 0x1c], xmm0
movss xmm0, dword [eax + 4]
jmp 0x40bfee
xorps xmm6, xmm6
movss xmm0, dword [ebp - 8]
movss xmm1, dword [0x491d28]
movss xmm2, dword [ebp - 0x1c]
ucomiss xmm2, xmm1
lahf
test ah, 0x44
jnp 0x40c02f
test dword [esi + 8], 0x100
mov ecx, dword [0x4b5c78]
movss dword [esi + 0x1c], xmm2
movss dword [esi + 0x20], xmm0
jne 0x40c02f
comiss xmm6, dword [ecx + 0x2ea0]
jb 0x40c02f
mov eax, dword [ecx + 0x1c]
mov dword [ecx + 0x2ea0], eax
movss xmm0, dword [ebp - 0x10]
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jnp 0x40c07f
test dword [esi + 8], 0x100
cvttss2si eax, xmm0
mov edx, dword [0x4b5c78]
movd xmm1, eax
cvttss2si eax, dword [ebp - 0x14]
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esi + 0xc], xmm1
movss dword [esi + 0x10], xmm0
jne 0x40c07f
comiss xmm6, dword [edx + 0x2ea0]
jb 0x40c07f
mov ecx, dword [edx + 0x1c]
mov dword [edx + 0x2ea0], ecx
mov ecx, dword [esi + 0x1c]
mov al, byte [ebp - 3]
mov dword [esi + 0x14], ecx
mov ecx, dword [esi + 0x20]
mov dword [esi + 0x18], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret