Function at 0x10154720
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0x10]
xor ecx, ecx
push esi
push edi
xor edi, edi
lea eax, [ebx - 4]
mov dword [ebp - 4], edi
mov dword [ebp - 8], eax
test eax, eax
js 0x101547db
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
add ebx, 4
lea esi, [eax + 2]
sub eax, ecx
shr ebx, 2
lea edx, [ecx + 6]
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], eax
lea ecx, [ebx*4]
mov dword [ebp - 8], ecx
mov ecx, edx
lea ebx, [ebx]
movsx edx, word [esi - 2]
lea ecx, [ecx + 8]
movsx eax, word [ecx - 0xe]
sub edx, eax
mov eax, edx
cdq
mov esi, eax
mov eax, dword [ebp - 4]
xor esi, edx
sub esi, edx
movsx edx, word [ecx - 0xa]
movsx eax, word [eax + 2]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
movsx edx, word [ecx - 0xc]
add esi, eax
mov eax, dword [ebp - 4]
movsx eax, word [eax]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, dword [ebp - 0x10]
movsx edx, word [eax + ecx - 8]
movsx eax, word [ecx - 8]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
add edi, esi
mov esi, dword [ebp - 4]
add esi, 8
mov dword [ebp - 4], esi
dec ebx
jne 0x10154770
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], edi
mov eax, ebx
sub eax, ecx
cmp ecx, ebx
jge 0x101548b0
cmp eax, 8
jb 0x101548b0
cmp dword [0x101fe438], 2
jl 0x101548b0
and eax, 0x80000007
jns 0x10154809
dec eax
or eax, 0xfffffff8
inc eax
mov edx, ebx
xorps xmm3, xmm3
sub edx, eax
movdqa xmm2, xmm3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 8]
mov edi, edx
lea eax, [eax + ecx*2]
add eax, 8
sub edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
lea esi, [edx + ecx*2]
mov edi, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
movq xmm0, qword [esi]
lea esi, [esi + 0x10]
pmovsxwd xmm1, xmm0
movq xmm0, qword [eax - 8]
lea eax, [eax + 0x10]
pmovsxwd xmm0, xmm0
psubd xmm1, xmm0
add ecx, 8
pabsd xmm0, xmm1
paddd xmm3, xmm0
movq xmm0, qword [ebx + eax - 0x10]
pmovsxwd xmm1, xmm0
movq xmm0, qword [eax - 0x10]
pmovsxwd xmm0, xmm0
psubd xmm1, xmm0
pabsd xmm0, xmm1
paddd xmm2, xmm0
cmp ecx, dword [ebp - 0xc]
jl 0x10154834
mov ebx, dword [ebp + 0x10]
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 edi, eax
mov dword [ebp - 4], edi
jmp 0x101548b3
mov edx, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], esi
cmp ecx, ebx
jge 0x10154951
mov eax, ebx
sub eax, ecx
cmp eax, 2
jl 0x10154929
lea eax, [ebx - 1]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp - 0x10], edx
xor edi, edi
lea esi, [eax + 2]
lea esi, [esi + ecx*2]
movsx eax, word [esi - 2]
lea esi, [esi + 4]
movsx edx, word [ebx + ecx*2]
add ecx, 2
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [ebp - 0x10]
movsx edx, word [eax + esi - 4]
movsx eax, word [esi - 4]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 8], eax
cmp ecx, dword [ebp - 0xc]
jl 0x101548e4
mov ebx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 0x10]
cmp ecx, ebx
jge 0x10154943
mov eax, dword [ebp + 0xc]
movsx edx, word [edx + ecx*2]
movsx eax, word [eax + ecx*2]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [ebp - 8]
add eax, esi
add eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret