Function at 0x101e4bc0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
xor edx, edx
sub eax, dword [esp + 0x18]
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
lea ecx, [eax - 1]
mov dword [esp + 0xc], 0
push edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0x14], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ecx
xor esi, esi
xor ebx, ebx
test edi, edi
jle 0x101e4c26
mov eax, dword [ebp + ebx*4]
cdq
xor eax, edx
sub eax, edx
cmp eax, esi
mov edx, eax
mov eax, ebx
cmovle eax, dword [esp + 0x10]
cmovle edx, esi
inc ebx
mov dword [esp + 0x10], eax
mov esi, edx
cmp ebx, edi
jl 0x101e4bf8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 0x2c]
mov eax, esi
cmp ebx, 1
jne 0x101e4c39
sar eax, 1
and esi, ebx
add eax, esi
jmp 0x101e4c3e
sar eax, cl
inc eax
sar eax, 1
cmp eax, 0x7fff
jle 0x101e4c8c
mov ecx, dword [esp + 0x10]
mov edx, 0x27ffe
cmp eax, edx
cmovl edx, eax
inc ecx
imul ecx, edx
mov eax, 0x7fff
sub eax, edx
shl eax, 0xe
cdq
sar ecx, 2
idiv ecx
add eax, 0xffbe
push eax
push edi
push ebp
call fcn.101e4b20
mov edx, dword [esp + 0x20]
lea ecx, [ebx - 1]
inc edx
add esp, 0xc
mov dword [esp + 0x14], edx
cmp edx, 0xa
jl 0x101e4bf0
cmp edx, 0xa
jne 0x101e4d34
xor edx, edx
test edi, edi
jle 0x101e4e82
mov esi, dword [esp + 0x20]
cmp ebx, 1
jne 0x101e4ced
mov ecx, dword [ebp + edx*4]
mov eax, ecx
sar eax, 1
and ecx, 1
add eax, ecx
cmp eax, 0x7fff
jle 0x101e4cc3
mov eax, 0x7fff
jmp 0x101e4cd0
cmp eax, 0xffff8000
mov ecx, 0xffff8000
cmovl eax, ecx
movzx eax, ax
mov ecx, ebx
mov word [esi + edx*2], ax
cwde
shl eax, cl
mov dword [ebp + edx*4], eax
inc edx
cmp edx, edi
jl 0x101e4ca8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
xor edx, edx
nop
mov eax, dword [ebp + edx*4]
lea ecx, [ebx - 1]
sar eax, cl
inc eax
sar eax, 1
cmp eax, 0x7fff
jle 0x101e4d0a
mov eax, 0x7fff
jmp 0x101e4d17
cmp eax, 0xffff8000
mov ecx, 0xffff8000
cmovl eax, ecx
movzx eax, ax
mov ecx, ebx
mov word [esi + edx*2], ax
cwde
shl eax, cl
mov dword [ebp + edx*4], eax
inc edx
cmp edx, edi
jl 0x101e4cf0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
xor edx, edx
test edi, edi
jle 0x101e4e82
cmp edi, 0x10
jb 0x101e4e38
cmp ebx, 1
jne 0x101e4e61
mov ebx, dword [esp + 0x20]
lea eax, [edi*4 - 4]
add eax, ebp
lea ecx, [edi - 1]
lea ecx, [ebx + ecx*2]
cmp ebx, eax
ja 0x101e4d6f
cmp ecx, ebp
jae 0x101e4e43
movaps xmm2, xmmword [0x10298c20]
lea ecx, [ebx + 0x10]
mov esi, edi
lea eax, [ebp + 0x20]
and esi, 0xfffffff0
movups xmm1, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add edx, 0x10
movaps xmm0, xmm2
lea ecx, [ecx + 0x20]
andps xmm0, xmm1
psrad xmm1, 1
paddd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
movq qword [ecx - 0x30], xmm0
movaps xmm0, xmm2
movups xmm1, xmmword [eax - 0x50]
andps xmm0, xmm1
psrad xmm1, 1
paddd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
movq qword [ecx - 0x28], xmm0
movaps xmm0, xmm2
movups xmm1, xmmword [eax - 0x40]
andps xmm0, xmm1
psrad xmm1, 1
paddd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
movq qword [ecx - 0x20], xmm0
movaps xmm0, xmm2
movups xmm1, xmmword [eax - 0x30]
andps xmm0, xmm1
psrad xmm1, 1
paddd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
movq qword [ecx - 0x18], xmm0
cmp edx, esi
jl 0x101e4d81
mov dword [esp + 0x14], edx
cmp edx, edi
jge 0x101e4e82
jmp 0x101e4e3c
mov ebx, dword [esp + 0x20]
cmp dword [esp + 0x2c], 1
jne 0x101e4e61
mov ecx, dword [ebp + edx*4]
mov eax, ecx
sar eax, 1
and ecx, 1
add eax, ecx
mov word [ebx + edx*2], ax
inc edx
cmp edx, edi
jl 0x101e4e43
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov esi, dword [esp + 0x20]
xor edx, edx
mov ecx, dword [esp + 0x18]
nop dword [eax + eax]
mov eax, dword [ebp + edx*4]
sar eax, cl
inc eax
sar eax, 1
mov word [esi + edx*2], ax
inc edx
cmp edx, edi
jl 0x101e4e70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret