Function at 0x40c410
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x48
movd xmm0, edx
movd xmm1, ecx
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
punpckldq xmm1, xmm0
movq xmm0, qword [ebp + 8]
pshufd xmm1, xmm1, 0x44
pxor xmm1, xmmword [0x5390b0]
mov esi, eax
mov ecx, eax
pshufd xmm0, xmm0, 0x44
and esi, 7
and ecx, 0xfffffff8
pxor xmm0, xmmword [0x5390c0]
mov dword [esp + 0x18], esi
movdqu xmmword [esp + 0x20], xmm1
movdqu xmmword [esp + 0x30], xmm0
je 0x40c5d7
lea eax, [ecx - 1]
xor esi, esi
and eax, 0xfffffff8
mov dword [esp + 0xc], eax
nop dword [eax]
mov edi, dword [ebx + esi]
mov eax, dword [ebx + esi + 4]
pshufd xmm2, xmm0, 0xee
movdqa xmm4, xmm0
add esi, 8
movd edx, xmm2
pshufd xmm2, xmm0, 0xff
psrlq xmm4, 0x33
xor edx, edi
movd xmm3, edx
movd edx, xmm2
xor edx, eax
movd xmm2, edx
punpcklqdq xmm2, xmm3
movdqa xmm3, xmm0
psllq xmm0, 0xd
shufps xmm3, xmm2, 0x24
movaps xmm2, xmm3
paddq xmm1, xmm3
psllq xmm3, 0x10
psrlq xmm2, 0x30
shufps xmm0, xmm3, 0xe4
shufps xmm4, xmm2, 0xe4
pshufd xmm2, xmm1, 0x1e
orps xmm0, xmm4
pxor xmm0, xmm1
paddq xmm2, xmm0
pshufd xmm3, xmm2, 0xee
pshufd xmm1, xmm2, 0xff
movd edx, xmm3
movdqa xmm3, xmm0
xor edx, edi
movd edi, xmm1
movdqa xmm1, xmm0
psrlq xmm3, 0x2b
psrlq xmm1, 0x2f
xor edi, eax
cmp esi, ecx
movsd xmm3, xmm1
movdqa xmm1, xmm0
psllq xmm0, 0x15
psllq xmm1, 0x11
movsd xmm0, xmm1
movd xmm1, edi
orpd xmm0, xmm3
movd xmm3, edx
punpcklqdq xmm1, xmm3
xorpd xmm0, xmm2
shufps xmm1, xmm2, 0x12
jb 0x40c480
mov esi, dword [esp + 0x18]
pshufd xmm1, xmm2, 0x55
add dword [esp + 0xc], 8
movd eax, xmm2
movdqu xmmword [esp + 0x30], xmm0
movd ecx, xmm1
pshufd xmm1, xmm0, 0xff
mov dword [esp + 0x2c], eax
movd eax, xmm1
pshufd xmm1, xmm0, 0xee
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edi
movd dword [esp + 0x14], xmm1
cmp esi, 4
mov ecx, 0
mov dword [esp + 0x10], eax
jb 0x40c60e
mov eax, dword [esp + 0xc]
mov ecx, 4
mov dword [esp + 8], 0
mov eax, dword [ebx + eax]
mov dword [esp + 4], eax
mov eax, ecx
or eax, 1
cmp eax, esi
jb 0x40c627
mov eax, dword [esp + 4]
cmp ecx, esi
jb 0x40c67a
mov ecx, dword [esp + 8]
test esi, esi
jne 0x40c6af
xor eax, eax
jmp 0x40c7d0
pshufd xmm2, xmm0, 0xff
pshufd xmm3, xmm0, 0xee
movd edx, xmm1
pshufd xmm1, xmm1, 0x55
mov dword [esp + 0xc], 0
movd eax, xmm2
movd dword [esp + 0x14], xmm3
movd edi, xmm1
cmp esi, 4
mov ecx, 0
mov dword [esp + 0x10], eax
jae 0x40c597
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, ecx
or eax, 1
cmp eax, esi
jae 0x40c5b8
mov eax, dword [esp + 0xc]
mov dword [esp + 0x1c], ecx
add eax, ecx
mov ecx, dword [esp + 0x1c]
movzx esi, word [ebx + eax]
xor eax, eax
lea ecx, [ecx*8]
shld eax, esi, cl
shl esi, cl
test cl, 0x20
mov ecx, dword [esp + 0x1c]
cmovne eax, esi
mov dword [esp + 0x40], eax
mov eax, 0
cmovne esi, eax
mov eax, dword [esp + 0x40]
or ecx, 2
or dword [esp + 8], eax
mov eax, dword [esp + 4]
or eax, esi
mov esi, dword [esp + 0x18]
cmp ecx, esi
jae 0x40c5c4
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc]
xor esi, esi
add eax, ecx
shl ecx, 3
movzx eax, byte [ebx + eax]
xor ebx, ebx
shld ebx, eax, cl
shl eax, cl
test cl, 0x20
mov ecx, dword [esp + 8]
cmovne ebx, eax
cmovne eax, esi
mov esi, dword [esp + 0x18]
or dword [esp + 4], eax
mov eax, dword [esp + 4]
or ecx, ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
lea ecx, [esi*8]
mov eax, 0xff
xor ebx, ebx
shld ebx, eax, cl
shl eax, cl
test cl, 0x20
mov ecx, 0
cmovne ebx, eax
cmovne eax, ecx
or eax, dword [esp + 4]
or ebx, dword [esp + 8]
cmp esi, 7
mov dword [esp + 4], eax
jne 0x40c979
mov eax, 8
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
movdqu xmm1, xmmword [esp + 0x20]
movdqa xmm4, xmm0
sub eax, esi
mov esi, dword [esp + 4]
psrlq xmm4, 0x33
xor ecx, ebx
xor edx, esi
movd xmm3, ecx
movd xmm2, edx
punpcklqdq xmm3, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0xd
shufps xmm2, xmm3, 0x24
movaps xmm3, xmm2
paddq xmm1, xmm2
psllq xmm2, 0x10
psrlq xmm3, 0x30
shufps xmm0, xmm2, 0xe4
shufps xmm4, xmm3, 0xe4
orps xmm0, xmm4
pxor xmm0, xmm1
pshufd xmm1, xmm1, 0x1e
movdqa xmm2, xmm0
movdqa xmm3, xmm0
paddq xmm1, xmm0
psrlq xmm2, 0x2f
psrlq xmm3, 0x2b
movsd xmm3, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0x15
psllq xmm2, 0x11
movsd xmm0, xmm2
pshufd xmm2, xmm1, 0x55
orpd xmm0, xmm3
pshufd xmm3, xmm1, 0xff
xorpd xmm0, xmm1
movd edi, xmm3
movupd xmmword [esp + 0x30], xmm0
movd dword [esp + 0x2c], xmm1
pshufd xmm1, xmm1, 0xee
xor edi, ebx
movd dword [esp + 0x28], xmm2
movd edx, xmm1
pshufd xmm1, xmm0, 0xff
mov dword [esp + 0x24], edi
xor edx, esi
movd dword [esp + 0x10], xmm1
pshufd xmm1, xmm0, 0xee
mov dword [esp + 0x20], edx
movd dword [esp + 0x14], xmm1
mov ecx, 1
sub ecx, eax
mov ebx, ecx
and ecx, 0xfffffff8
and ebx, 7
cmp eax, ecx
jae 0x40c8fe
movdqu xmm2, xmmword [esp + 0x20]
movdqa xmm1, xmmword [0x5390d0]
nop word cs:[eax + eax]
nop
pshufd xmm3, xmm0, 0xee
movapd xmm4, xmm0
movdqa xmm5, xmm0
add eax, 8
pxor xmm3, xmm1
psrlq xmm5, 0x30
shufps xmm4, xmm3, 0xc7
movapd xmm3, xmm0
shufps xmm3, xmm4, 0x24
movdqa xmm4, xmm0
psllq xmm0, 0xd
paddq xmm2, xmm3
psrlq xmm4, 0x33
psllq xmm3, 0x10
shufpd xmm0, xmm3, 2
movsd xmm5, xmm4
pshufd xmm3, xmm2, 0x1e
orpd xmm0, xmm5
xorpd xmm0, xmm2
movapd xmm2, xmm0
movapd xmm4, xmm0
paddq xmm3, xmm0
psrlq xmm2, 0x2f
psrlq xmm4, 0x2b
movsd xmm4, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0x15
psllq xmm2, 0x11
movsd xmm0, xmm2
pshufd xmm2, xmm3, 0xee
movd edx, xmm2
orpd xmm0, xmm4
pshufd xmm2, xmm3, 0x1c
xor edx, 0xff
xorpd xmm0, xmm3
cmp eax, ecx
movd xmm4, edx
movss xmm2, xmm4
jb 0x40c800
pshufd xmm1, xmm3, 0x55
movd eax, xmm3
movups xmmword [esp + 0x30], xmm0
xor esi, esi
movd ecx, xmm1
mov dword [esp + 0x2c], eax
xor eax, eax
cmp ebx, 4
pshufd xmm1, xmm3, 0xff
mov dword [esp + 0x28], ecx
mov ecx, 0xff
setae al
movd edi, xmm1
pshufd xmm1, xmm0, 0xff
pshufd xmm0, xmm0, 0xee
cmovb ecx, esi
shl eax, 2
movd dword [esp + 0x10], xmm1
movd dword [esp + 0x14], xmm0
mov dword [esp + 4], ecx
jmp 0x40c90a
mov dword [esp + 4], 0
xor esi, esi
xor eax, eax
mov ecx, eax
mov dword [esp + 8], esi
or ecx, 1
cmp ecx, ebx
jae 0x40c94b
mov dword [esp + 0xc], ebx
lea ecx, [eax*8]
mov esi, 0xff
xor ebx, ebx
shld ebx, esi, cl
shl esi, cl
test cl, 0x20
mov ecx, 0
cmovne ebx, esi
cmovne esi, ecx
or eax, 2
or dword [esp + 8], ebx
mov ebx, dword [esp + 0xc]
or dword [esp + 4], esi
cmp eax, ebx
jae 0x40c982
shl eax, 3
mov esi, 0xff
xor ebx, ebx
mov ecx, eax
shld ebx, esi, cl
shl esi, cl
test al, 0x20
mov eax, 0
mov ecx, dword [esp + 8]
cmovne ebx, esi
cmovne esi, eax
or dword [esp + 4], esi
or ecx, ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x14]
mov eax, dword [esp + 0x10]
jmp 0x40c98d
mov ecx, dword [ebp + 0x14]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 8]
shl ecx, 0x18
mov esi, dword [esp + 0x14]
movdqu xmm0, xmmword [esp + 0x28]
movd xmm3, edx
movd xmm5, edi
add ecx, 0x1000000
punpckldq xmm3, xmm5
or ecx, ebx
mov ebx, dword [esp + 4]
xor eax, ecx
movd xmm1, eax
movdqa xmm5, xmm0
psrlq xmm5, 0x33
xor esi, ebx
movd xmm2, esi
movd xmm4, esi
punpckldq xmm2, xmm1
punpcklqdq xmm1, xmm4
punpcklqdq xmm2, xmm3
shufps xmm1, xmm0, 0xe2
movaps xmm4, xmm1
paddq xmm2, xmm0
psllq xmm1, 0x10
psllq xmm0, 0xd
pshufd xmm3, xmm2, 0xff
psrlq xmm4, 0x30
movsd xmm0, xmm1
movdqa xmm1, xmm2
movd eax, xmm3
movsd xmm5, xmm4
orpd xmm0, xmm5
movd xmm3, eax
shufps xmm1, xmm3, 0x4e
xorpd xmm0, xmm2
shufps xmm1, xmm2, 0x42
movapd xmm2, xmm0
movapd xmm3, xmm0
psrlq xmm2, 0x2b
psrlq xmm3, 0x2f
paddq xmm1, xmm0
movsd xmm3, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0x11
psllq xmm2, 0x15
movsd xmm0, xmm2
pshufd xmm2, xmm1, 0xff
orpd xmm0, xmm3
pshufd xmm3, xmm1, 0x55
movd edx, xmm2
movd eax, xmm3
xor edx, 0xff
xorpd xmm0, xmm1
xor eax, ecx
movd ecx, xmm1
movd xmm2, edx
xor ecx, ebx
movd xmm4, eax
shufpd xmm1, xmm2, 1
movd xmm3, ecx
shufps xmm1, xmm0, 0xe2
punpcklqdq xmm4, xmm3
movaps xmm3, xmm0
shufps xmm3, xmm4, 0x24
movaps xmm4, xmm0
paddq xmm1, xmm3
psrlq xmm4, 0x33
pshufd xmm2, xmm1, 0xff
movd eax, xmm2
movaps xmm2, xmm0
psrlq xmm2, 0x30
movd xmm3, eax
movsd xmm4, xmm2
movaps xmm2, xmm0
psllq xmm0, 0xd
psllq xmm2, 0x10
movsd xmm0, xmm2
movdqa xmm2, xmm1
orpd xmm0, xmm4
shufps xmm2, xmm3, 0x4e
xorpd xmm0, xmm1
shufps xmm2, xmm1, 0x42
movapd xmm1, xmm0
movapd xmm3, xmm0
paddq xmm2, xmm0
psrlq xmm1, 0x2b
psrlq xmm3, 0x2f
movsd xmm3, xmm1
movdqa xmm1, xmm0
psllq xmm0, 0x11
psllq xmm1, 0x15
movsd xmm0, xmm1
pshufd xmm1, xmm2, 0xff
movd eax, xmm1
orpd xmm0, xmm3
movdqa xmm1, xmm2
movd xmm3, eax
xorpd xmm0, xmm2
shufps xmm1, xmm3, 0x4e
movapd xmm4, xmm0
shufps xmm1, xmm2, 0x42
psrlq xmm4, 0x33
paddq xmm1, xmm0
pshufd xmm2, xmm1, 0xff
movd eax, xmm2
movdqa xmm2, xmm0
psrlq xmm2, 0x30
movd xmm3, eax
movsd xmm4, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0xd
psllq xmm2, 0x10
movsd xmm0, xmm2
movdqa xmm2, xmm1
orpd xmm0, xmm4
shufps xmm2, xmm3, 0x4e
xorpd xmm0, xmm1
shufps xmm2, xmm1, 0x42
movapd xmm1, xmm0
movapd xmm3, xmm0
paddq xmm2, xmm0
psrlq xmm1, 0x2b
psrlq xmm3, 0x2f
movsd xmm3, xmm1
movdqa xmm1, xmm0
psllq xmm0, 0x11
psllq xmm1, 0x15
movsd xmm0, xmm1
pshufd xmm1, xmm2, 0xff
movd eax, xmm1
orpd xmm0, xmm3
movdqa xmm1, xmm2
movd xmm3, eax
xorpd xmm0, xmm2
shufps xmm1, xmm3, 0x4e
movapd xmm3, xmm0
shufps xmm1, xmm2, 0x42
movapd xmm2, xmm0
psrlq xmm3, 0x33
psrlq xmm2, 0x30
paddq xmm1, xmm0
movsd xmm3, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0xd
psllq xmm2, 0x10
movsd xmm0, xmm2
orpd xmm0, xmm3
xorpd xmm0, xmm1
pshufd xmm2, xmm0, 0xee
paddq xmm2, xmm1
pshufd xmm1, xmm2, 0x55
movd ecx, xmm2
movdqa xmm2, xmm0
movd eax, xmm1
movdqa xmm1, xmm0
psrlq xmm2, 0x2f
psrlq xmm1, 0x2b
xor ecx, eax
movsd xmm2, xmm1
movdqa xmm1, xmm0
psllq xmm0, 0x11
psllq xmm1, 0x15
movsd xmm0, xmm1
orpd xmm0, xmm2
pshufd xmm1, xmm0, 0xee
pxor xmm1, xmm0
pshufd xmm0, xmm1, 0x55
movd eax, xmm1
movd edx, xmm0
xor eax, ecx
xor edx, ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret