Function at 0x435840
Capabilities:
Encode data using xor

Disassembly:
cmp byte [esp + 4], 0
push ebx
push esi
push edi
mov edi, ecx
je 0x435a42
sar edx, 1
xor ecx, ecx
lea ebx, [edi + edx]
test edx, edx
jle 0x435ac0
cmp edx, 0x10
jb 0x435a12
lea eax, [edx - 1]
lea esi, [edi - 1]
add eax, ebx
add esi, edx
cmp edi, eax
ja 0x43587e
cmp esi, ebx
jae 0x435a12
mov eax, edx
push ebp
and eax, 0x8000000f
jns 0x43588d
dec eax
or eax, 0xfffffff0
inc eax
movaps xmm2, xmmword [0x4e2d30]
mov esi, edx
sub esi, eax
mov ebp, ebx
mov eax, 1
sub ebp, edi
movd xmm3, eax
mov eax, edi
nop word [eax + eax]
movd xmm0, dword [eax]
lea eax, [eax + 0x10]
punpcklbw xmm0, xmm0
movd xmm1, dword [eax + ebp - 0x10]
punpcklwd xmm0, xmm0
psrad xmm0, 0x18
punpcklbw xmm1, xmm1
pxor xmm0, xmm2
punpcklwd xmm1, xmm1
psrad xmm1, 0x18
pxor xmm1, xmm2
paddd xmm1, xmm0
psrad xmm1, xmm3
pshuflw xmm0, xmm1, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movd dword [eax - 0x10], xmm0
movd xmm0, dword [eax - 0xc]
movd xmm1, dword [ebx + ecx + 4]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
psrad xmm0, 0x18
punpcklbw xmm1, xmm1
pxor xmm0, xmm2
punpcklwd xmm1, xmm1
psrad xmm1, 0x18
pxor xmm1, xmm2
paddd xmm1, xmm0
psrad xmm1, xmm3
pshuflw xmm0, xmm1, 0xd8
movd xmm1, dword [ebx + ecx + 8]
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movd dword [eax - 0xc], xmm0
movd xmm0, dword [eax - 8]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
punpcklbw xmm1, xmm1
psrad xmm0, 0x18
punpcklwd xmm1, xmm1
pxor xmm0, xmm2
psrad xmm1, 0x18
pxor xmm1, xmm2
paddd xmm1, xmm0
psrad xmm1, xmm3
pshuflw xmm0, xmm1, 0xd8
movd xmm1, dword [ebx + ecx + 0xc]
add ecx, 0x10
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movd dword [eax - 8], xmm0
movd xmm0, dword [eax - 4]
punpcklbw xmm0, xmm0
punpcklbw xmm1, xmm1
punpcklwd xmm0, xmm0
punpcklwd xmm1, xmm1
psrad xmm0, 0x18
psrad xmm1, 0x18
pxor xmm0, xmm2
pxor xmm1, xmm2
paddd xmm1, xmm0
psrad xmm1, xmm3
pshuflw xmm0, xmm1, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movd dword [eax - 4], xmm0
cmp ecx, esi
jl 0x4358b0
pop ebp
cmp ecx, edx
jge 0x435ac0
sub ebx, edi
lea esi, [ecx + edi]
sub edx, ecx
movsx ecx, byte [esi + ebx]
lea esi, [esi + 1]
movsx eax, byte [esi - 1]
xor ecx, 0xffffff80
xor eax, 0xffffff80
add ecx, eax
sar ecx, 1
mov byte [esi - 1], cl
sub edx, 1
jne 0x435a21
pop edi
pop esi
pop ebx
ret
xor eax, eax
test edx, edx
jle 0x435ac0
cmp edx, 0x40
jb 0x435ab3
mov ecx, edx
and ecx, 0x8000003f
jns 0x435a60
dec ecx
or ecx, 0xffffffc0
inc ecx
movaps xmm2, xmmword [0x4e2d10]
mov esi, edx
sub esi, ecx
nop dword [eax + eax]
movups xmm0, xmmword [edi + eax]
movaps xmm1, xmm2
pxor xmm0, xmm2
movups xmmword [edi + eax], xmm0
movups xmm0, xmmword [edi + eax + 0x10]
pxor xmm1, xmm0
movups xmmword [edi + eax + 0x10], xmm1
movups xmm0, xmmword [edi + eax + 0x20]
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmmword [edi + eax + 0x20], xmm1
movups xmm0, xmmword [edi + eax + 0x30]
pxor xmm0, xmm2
movups xmmword [edi + eax + 0x30], xmm0
add eax, 0x40
cmp eax, esi
jl 0x435a70
cmp eax, edx
jge 0x435ac0
xor byte [eax + edi], 0x80
inc eax
cmp eax, edx
jl 0x435ab7
pop edi
pop esi
pop ebx
ret