Function at 0x10186b00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, ecx
push esi
push edi
xor ebx, ebx
lea edi, [ebp + 4]
mov ecx, edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.100f6330
cdq
and edx, 3
add eax, edx
mov esi, eax
add ebp, 0x20
sar esi, 2
mov ecx, ebp
mov dword [esp + 0x14], esi
call fcn.100f6330
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ecx, edi
mov dword [esp + 0x20], eax
call fcn.1008bea0
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.1008bea0
xor ebp, ebp
test esi, esi
mov dword [esp + 0x24], eax
jle 0x10186bd0
mov edi, dword [esp + 0x40]
jmp 0x10186b70
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
movzx esi, byte [eax + ecx]
add eax, 1
cdq
idiv edi
shl esi, 8
add ebp, 1
movzx ecx, byte [edx + ecx]
lea eax, [edx + 1]
cdq
idiv edi
mov eax, dword [esp + 0x3c]
or ecx, esi
shl ecx, 8
movzx esi, byte [edx + eax]
lea eax, [edx + 1]
cdq
idiv edi
or esi, ecx
mov ecx, dword [esp + 0x3c]
shl esi, 8
movzx ecx, byte [edx + ecx]
lea eax, [edx + 1]
cdq
idiv edi
mov eax, dword [esp + 0x18]
or ecx, esi
xor dword [eax + ebp*4 - 4], ecx
cmp ebp, dword [esp + 0x14]
mov dword [esp + 0x10], edx
jl 0x10186b70
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x34]
xor ebp, ebp
test esi, esi
mov esi, dword [esp + 0x38]
jle 0x10186c92
movzx edx, byte [ebx + edi]
mov dword [esp + 0x3c], edx
lea eax, [ebx + 1]
cdq
idiv esi
mov eax, dword [esp + 0x3c]
shl eax, 8
push 0
movzx ecx, byte [edx + edi]
or ecx, eax
lea eax, [edx + 1]
cdq
idiv esi
shl ecx, 8
movzx ebx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ebx, ecx
shl ebx, 8
movzx ecx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ecx, ebx
xor dword [esp + 0x2c], ecx
movzx ebx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
shl ebx, 8
movzx ecx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ecx, ebx
shl ecx, 8
movzx ebx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ebx, ecx
shl ebx, 8
movzx ecx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ecx, ebx
xor dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
mov ebx, edx
call fcn.101868d0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [eax + ebp*4], ecx
mov dword [eax + ebp*4 + 4], edx
add ebp, 2
cmp ebp, dword [esp + 0x14]
jl 0x10186be2
xor ebp, ebp
cmp dword [esp + 0x20], ebp
jle 0x10186d50
mov edi, edi
movzx eax, byte [ebx + edi]
mov dword [esp + 0x3c], eax
lea eax, [ebx + 1]
cdq
idiv esi
mov eax, dword [esp + 0x3c]
shl eax, 8
push 0
movzx ecx, byte [edx + edi]
or ecx, eax
lea eax, [edx + 1]
cdq
idiv esi
shl ecx, 8
movzx ebx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ebx, ecx
shl ebx, 8
movzx ecx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ecx, ebx
xor dword [esp + 0x2c], ecx
movzx ebx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
shl ebx, 8
movzx ecx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ecx, ebx
shl ecx, 8
movzx ebx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ebx, ecx
shl ebx, 8
movzx ecx, byte [edx + edi]
lea eax, [edx + 1]
cdq
idiv esi
or ecx, ebx
xor dword [esp + 0x30], ecx
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x24]
mov ebx, edx
call fcn.101868d0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [eax + ebp*4], edx
mov dword [eax + ebp*4 + 4], ecx
add ebp, 2
cmp ebp, dword [esp + 0x20]
jl 0x10186ca0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x10