Function at 0x10001650
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0xc]
mov edx, ecx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x14], edx
mov edi, dword [edx]
mov dword [ebp - 8], ebx
lea eax, [edi*4]
test eax, eax
je 0x1000169a
sub dword [ebp + 8], ebx
mov ecx, ebx
mov ebx, dword [ebp + 8]
nop dword [eax + eax]
mov al, byte [ebx + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
inc esi
mov edi, dword [edx]
lea eax, [edi*4]
cmp esi, eax
jb 0x10001680
mov ebx, dword [ebp - 8]
mov eax, dword [edx + 4]
inc eax
shl edi, 2
shl eax, 4
cmp edi, eax
jae 0x10001890
lea esi, [edi - 3]
add esi, ebx
mov bh, byte [esi]
mov al, byte [esi + 1]
mov ecx, dword [edx]
xor edx, edx
mov byte [ebp - 1], al
mov al, byte [esi + 2]
mov byte [ebp - 2], al
mov eax, edi
shr eax, 2
div ecx
mov bl, byte [esi - 1]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], bl
mov byte [ebp - 3], bh
mov dword [ebp - 0xc], ecx
test edx, edx
jne 0x10001790
movzx ecx, bh
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100016f6
dec ecx
or ecx, 0xfffffff0
inc ecx
mov bl, byte [eax + ecx + 0x100092e8]
movzx ecx, byte [ebp - 1]
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001713
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x100092e8]
movzx ecx, byte [ebp - 2]
mov byte [ebp - 3], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001733
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x100092e8]
movzx ecx, byte [ebp - 4]
mov byte [ebp - 1], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001753
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x100092e8]
xor edx, edx
mov esi, dword [ebp - 0xc]
mov cl, 1
mov byte [ebp - 2], al
mov eax, edi
shl esi, 2
div esi
mov esi, eax
sub esi, 1
je 0x10001786
mov dl, cl
add cl, cl
shr dl, 7
movzx eax, dl
imul eax, eax, 0x1b
xor cl, al
sub esi, 1
jne 0x10001772
mov esi, dword [ebp - 0x10]
xor bl, cl
jmp 0x1000181d
cmp ecx, 6
jbe 0x10001820
cmp edx, 4
jne 0x10001820
movzx ecx, bl
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100017b7
dec ecx
or ecx, 0xfffffff0
inc ecx
mov bl, byte [eax + ecx + 0x100092e8]
movzx ecx, bh
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100017d3
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x100092e8]
movzx ecx, byte [ebp - 1]
mov byte [ebp - 3], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x100017f3
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x100092e8]
movzx ecx, byte [ebp - 2]
mov byte [ebp - 1], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0x8000000f
jns 0x10001813
dec ecx
or ecx, 0xfffffff0
inc ecx
mov al, byte [eax + ecx + 0x100092e8]
mov byte [ebp - 2], al
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
lea eax, [ecx*4]
mov ecx, dword [ebp - 8]
sub ecx, eax
movzx eax, byte [ecx + edi]
xor al, bl
mov byte [esi + 3], al
mov ecx, dword [edx]
mov eax, dword [ebp - 8]
shl ecx, 2
sub eax, ecx
mov bh, byte [eax + edi + 1]
lea eax, [esi + 4]
xor bh, byte [ebp - 3]
mov byte [eax], bh
mov ecx, dword [edx]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
shl ecx, 2
sub eax, ecx
movzx eax, byte [eax + edi + 2]
xor al, byte [ebp - 1]
mov byte [esi + 5], al
mov ecx, dword [edx]
mov eax, dword [ebp - 8]
shl ecx, 2
sub eax, ecx
movzx eax, byte [eax + edi + 3]
add edi, 4
xor al, byte [ebp - 2]
mov byte [esi + 6], al
mov eax, dword [edx + 4]
mov esi, dword [ebp - 0x10]
inc eax
shl eax, 4
cmp edi, eax
jb 0x100016b3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8