Function at 0x101630b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
xor ecx, ecx
xor edx, edx
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 4], edx
cmp byte [0x101fd8ec], cl
je 0x10163170
mov esi, dword [ebp + 0xc]
lea edx, [edi - 0x10]
xorps xmm2, xmm2
test edx, edx
js 0x1016311c
mov ecx, dword [ebp + 8]
add edx, 0x10
sub ecx, esi
shr edx, 4
mov dword [ebp - 0xc], ecx
mov eax, esi
mov edi, dword [ebp - 0xc]
mov ecx, edx
shl ecx, 4
jmp 0x10163100
lea eax, [eax + 0x10]
movdqu xmm1, xmmword [edi + eax - 0x10]
movdqu xmm0, xmmword [eax - 0x10]
psadbw xmm1, xmm0
paddd xmm2, xmm1
dec edx
jne 0x10163100
mov edi, dword [ebp + 0x10]
lea eax, [edi - 4]
cmp ecx, eax
jg 0x10163158
mov edi, dword [ebp + 8]
lea edx, [ecx + esi]
sub eax, ecx
sub edi, esi
shr eax, 2
inc eax
mov dword [ebp - 0xc], edi
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 0xc]
lea ecx, [ecx + eax*4]
lea ecx, [ecx]
movd xmm1, dword [edx + esi]
lea edx, [edx + 4]
movd xmm0, dword [edx - 4]
psadbw xmm1, xmm0
paddd xmm2, xmm1
dec eax
jne 0x10163140
movdqa xmm0, xmm2
punpckhqdq xmm0, xmm2
paddd xmm0, xmm2
movd edx, xmm0
mov dword [ebp - 4], edx
jmp 0x1016321e
lea eax, [edi - 4]
mov dword [ebp - 0x10], eax
test eax, eax
js 0x1016321e
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov edi, edx
sub edi, eax
mov dword [ebp - 0xc], edi
xor edi, edi
lea esi, [eax + 3]
lea eax, [edx + 1]
mov dword [ebp - 4], esi
mov dword [ebp - 8], eax
lea esp, [esp]
movzx edx, byte [eax + ecx - 1]
movzx eax, byte [esi - 3]
sub edx, eax
mov eax, edx
cdq
mov esi, eax
mov eax, dword [ebp - 8]
xor esi, edx
sub esi, edx
movzx edx, byte [eax + ecx + 1]
mov eax, dword [ebp - 4]
movzx eax, byte [eax - 1]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, dword [ebp - 8]
movzx edx, byte [eax + ecx]
add ecx, 4
mov eax, dword [ebp - 4]
movzx eax, byte [eax - 2]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0xc]
add esi, eax
mov eax, dword [ebp - 4]
movzx edx, byte [eax + edx]
movzx eax, byte [eax]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [ebp - 8]
add edi, esi
mov esi, dword [ebp - 4]
add esi, 4
mov dword [ebp - 4], esi
cmp ecx, dword [ebp - 0x10]
jle 0x101631a0
mov dword [ebp - 4], edi
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
mov eax, edi
sub eax, ecx
cmp ecx, edi
jge 0x101632ec
cmp eax, 8
jb 0x101632ec
cmp dword [0x101fe438], 2
jl 0x101632ec
and eax, 0x80000007
jns 0x1016324c
dec eax
or eax, 0xfffffff8
inc eax
mov esi, dword [ebp + 0xc]
mov edx, edi
sub edx, eax
xorps xmm3, xmm3
mov dword [ebp - 8], edx
movdqa xmm2, xmm3
mov edx, dword [ebp + 8]
mov edi, edx
sub edi, esi
lea eax, [ecx + esi]
add edx, 4
mov esi, edi
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
movd xmm0, dword [eax + esi]
lea eax, [eax + 8]
mov edi, dword [ebp - 0xc]
pmovzxbd xmm1, xmm0
movd xmm0, dword [eax - 8]
pmovzxbd xmm0, xmm0
psubd xmm1, xmm0
pabsd xmm0, xmm1
paddd xmm3, xmm0
movd xmm0, dword [edi + ecx]
mov edi, dword [ebp + 0x10]
add ecx, 8
pmovzxbd xmm1, xmm0
movd xmm0, dword [eax - 4]
pmovzxbd xmm0, xmm0
psubd xmm1, xmm0
pabsd xmm0, xmm1
paddd xmm2, xmm0
cmp ecx, dword [ebp - 8]
jl 0x10163272
paddd xmm2, xmm3
movdqa xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movdqa xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd eax, xmm2
add edx, eax
mov dword [ebp - 4], edx
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
cmp ecx, edi
jge 0x101633ad
mov eax, edi
sub eax, ecx
cmp eax, 2
jl 0x1016336e
lea eax, [edi - 1]
add esi, ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov edx, eax
sub edx, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0x14], edx
xor edi, edi
mov dword [ebp - 0x10], eax
jmp 0x10163330
movzx edx, byte [edx + esi]
lea esi, [esi + 2]
movzx eax, byte [esi - 2]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [ebp - 0x10]
movzx edx, byte [eax + ecx]
add ecx, 2
movzx eax, byte [esi - 1]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x14]
add dword [ebp - 8], eax
cmp ecx, dword [ebp - 0xc]
jl 0x10163330
mov dword [ebp - 0xc], edi
mov edi, dword [ebp + 0x10]
cmp ecx, edi
jge 0x1016339c
mov eax, dword [ebp + 8]
pop edi
pop esi
movzx edx, byte [ecx + eax]
mov eax, dword [ebp + 0xc]
movzx eax, byte [ecx + eax]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 4]
add edx, eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 8]
add eax, edx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
add eax, edx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, edx
pop esi
mov esp, ebp
pop ebp
ret