Function at 0x10001620
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0xc]
xor edx, edx
push esi
mov esi, ecx
mov dword [ebp - 0xc], ebx
push edi
mov dword [ebp - 0x14], esi
mov edi, dword [esi]
lea eax, [edi*4]
test eax, eax
je 0x10001667
sub dword [ebp + 8], ebx
mov ecx, ebx
mov ebx, dword [ebp + 8]
nop dword [eax + eax]
mov al, byte [ebx + ecx]
inc edx
mov byte [ecx], al
inc ecx
mov edi, dword [esi]
lea eax, [edi*4]
cmp edx, eax
jb 0x10001650
mov ebx, dword [ebp - 0xc]
mov eax, dword [esi + 4]
inc eax
shl edi, 2
shl eax, 4
cmp edi, eax
jae 0x10001865
add ebx, 0xfffffffd
add ebx, edi
mov al, byte [ebx]
mov ch, al
mov cl, byte [ebx - 1]
mov al, byte [ebx + 1]
xor edx, edx
mov byte [ebp - 2], al
mov al, byte [ebx + 2]
mov byte [ebp - 3], al
mov eax, edi
shr eax, 2
div dword [esi]
mov byte [ebp - 1], cl
mov byte [ebp - 5], cl
mov byte [ebp - 4], ch
test edx, edx
jne 0x10001761
movzx ecx, ch
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100016c0
dec ecx
or ecx, 0xfffffff0
inc ecx
mov cl, byte [eax + ecx + 0x1002c058]
mov byte [ebp - 1], cl
movzx ecx, byte [ebp - 2]
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100016e0
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
movzx ecx, byte [ebp - 3]
mov byte [ebp - 4], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001700
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
movzx ecx, byte [ebp - 5]
mov byte [ebp - 2], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001720
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
xor edx, edx
mov byte [ebp - 3], al
mov cl, 1
mov eax, dword [esi]
lea esi, [eax*4]
mov eax, edi
div esi
mov esi, eax
sub esi, 1
je 0x10001756
mov dl, cl
add cl, cl
shr dl, 7
movzx eax, dl
imul eax, eax, 0x1b
xor cl, al
sub esi, 1
jne 0x10001742
xor byte [ebp - 1], cl
mov esi, dword [ebp - 0x14]
jmp 0x100017f2
cmp dword [esi], 6
jbe 0x100017f2
cmp edx, 4
jne 0x100017f2
movzx ecx, cl
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001788
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
movzx ecx, byte [ebp - 4]
mov byte [ebp - 1], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100017a8
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
movzx ecx, byte [ebp - 2]
mov byte [ebp - 4], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100017c8
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
movzx ecx, byte [ebp - 3]
mov byte [ebp - 2], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100017e8
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x1002c058]
mov byte [ebp - 3], al
mov ecx, dword [esi]
lea eax, [ecx*4]
mov ecx, dword [ebp - 0xc]
sub ecx, eax
movzx eax, byte [ecx + edi]
xor al, byte [ebp - 1]
mov byte [ebx + 3], al
mov ecx, dword [esi]
mov eax, dword [ebp - 0xc]
shl ecx, 2
sub eax, ecx
mov al, byte [eax + edi + 1]
xor al, byte [ebp - 4]
mov byte [ebx + 4], al
mov ecx, dword [esi]
mov byte [ebp - 5], al
mov eax, dword [ebp - 0xc]
shl ecx, 2
sub eax, ecx
movzx eax, byte [eax + edi + 2]
xor al, byte [ebp - 2]
mov byte [ebx + 5], al
mov ecx, dword [esi]
mov eax, dword [ebp - 0xc]
shl ecx, 2
sub eax, ecx
mov cl, byte [ebp - 3]
movzx eax, byte [eax + edi + 3]
add edi, 4
xor al, cl
mov byte [ebx + 6], al
add ebx, 4
mov eax, dword [esi + 4]
inc eax
shl eax, 4
cmp edi, eax
mov al, byte [ebp - 5]
jb 0x10001680
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8