Function at 0x4ab470
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [ecx + 0x10], 0
mov dword [ebp - 8], ecx
je 0x4ab633
mov eax, dword [ecx + 4]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov edx, dword [eax + 0x1c]
mov esi, dword [ebp + 0xc]
movsx ebx, word [ebx]
imul edx, esi
push edi
mov dword [ebp - 0xc], ebx
add edx, dword [eax + 0x10]
mov eax, dword [ebp + 8]
lea edi, [edx + eax*2]
mov edx, dword [ebp + 8]
movzx eax, word [ecx + 8]
xor edx, esi
movzx ecx, word [ecx + 0xa]
and edx, 1
mov dword [ebp + 0xc], edi
test ebx, ebx
jle 0x4ab630
mov edi, dword [ebp - 8]
test edx, edx
cmove ecx, eax
movzx esi, cx
mov ecx, dword [ebp - 8]
movzx eax, word [edi + 0xa]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 8], esi
movzx ecx, word [ecx + 8]
cmove ecx, eax
movzx ecx, cx
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 0x10]
movzx edx, byte [eax]
test edx, edx
je 0x4ab5de
cmp edx, 0xff
jne 0x4ab639
mov eax, dword [ebp - 8]
mov al, byte [eax + 0x10]
cmp al, 0x10
jne 0x4ab51b
push ebx
push ecx
mov edx, esi
mov ecx, edi
call fcn.004ac8a0
add esp, 8
jmp 0x4ab5de
mov edx, dword [ebp + 0xc]
mov esi, ebx
movzx eax, al
mov edi, 0x10
sar esi, 1
sub edi, eax
sub esi, 1
js 0x4ab5a4
mov ebx, dword [ebp + 8]
movzx eax, word [edx]
mov ecx, eax
and eax, 0xf0f
and ecx, 0xf0f0
shl ecx, 0xc
or ecx, eax
imul ecx, edi
shr ecx, 4
mov eax, ecx
shr eax, 0xc
xor eax, ecx
shr ecx, 0xc
and eax, 0xf0f
xor eax, ecx
add eax, ebx
mov word [edx], ax
movzx eax, word [edx + 2]
mov ecx, eax
and eax, 0xf0f
and ecx, 0xf0f0
shl ecx, 0xc
or ecx, eax
imul ecx, edi
shr ecx, 4
mov eax, ecx
shr eax, 0xc
xor eax, ecx
shr ecx, 0xc
and eax, 0xf0f
xor eax, ecx
add eax, dword [ebp - 4]
mov word [edx + 2], ax
add edx, 4
sub esi, 1
jns 0x4ab534
mov ebx, dword [ebp - 0xc]
test bl, 1
je 0x4ab5db
movzx eax, word [edx]
mov ecx, eax
and eax, 0xf0f
and ecx, 0xf0f0
shl ecx, 0xc
or ecx, eax
imul ecx, edi
shr ecx, 4
mov eax, ecx
shr eax, 0xc
xor eax, ecx
shr ecx, 0xc
and eax, 0xf0f
xor eax, ecx
add eax, dword [ebp + 8]
mov word [edx], ax
mov edi, dword [ebp + 0xc]
add dword [ebp + 0x10], ebx
lea eax, [ebx + ebx]
add dword [ebp + 0x14], eax
add edi, eax
mov eax, dword [ebp + 8]
mov esi, ebx
mov ebx, dword [ebp + 0x14]
and esi, 1
movzx ecx, ax
mov eax, dword [ebp - 4]
movzx eax, ax
movsx ebx, word [ebx]
cmove ecx, eax
mov eax, dword [ebp - 4]
test esi, esi
movzx edx, cx
movzx ecx, ax
mov eax, dword [ebp + 8]
movzx eax, ax
cmove ecx, eax
mov dword [ebp + 0xc], edi
movzx esi, cx
mov ecx, edx
mov dword [ebp - 0xc], ebx
mov dword [ebp + 8], esi
mov dword [ebp - 4], ecx
test ebx, ebx
jg 0x4ab4e4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
movzx eax, si
mov ecx, eax
and eax, 0xf0f
and ecx, 0xf0f0
shl ecx, 0xc
or ecx, eax
lea eax, [edx + 1]
shr eax, 4
imul ecx, eax
shr ecx, 4
mov eax, ecx
shr eax, 0xc
xor eax, ecx
shr ecx, 0xc
and eax, 0xf0f
xor eax, ecx
mov ecx, 0xf
movzx eax, ax
mov dword [ebp + 0xc], eax
and eax, 0xf
sub ecx, eax
mov eax, ebx
mov ebx, dword [ebp + 0xc]
mov esi, ecx
shr esi, 3
add esi, ecx
movzx ecx, word [edi + eax*2 - 2]
dec eax
mov edx, ecx
and ecx, 0xf0f
and edx, 0xf0f0
shl edx, 0xc
or edx, ecx
imul edx, esi
shr edx, 4
mov ecx, edx
shr ecx, 0xc
xor ecx, edx
shr edx, 0xc
and ecx, 0xf0f
xor ecx, edx
add ecx, ebx
mov word [edi + eax*2], cx
test eax, eax
jg 0x4ab687
mov ebx, dword [ebp - 0xc]
jmp 0x4ab5de