Function at 0x4c8ab0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov ebp, dword [esp + 0x40]
mov esi, edx
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
cmp dword [esp + 0x44], 0
mov eax, dword [ebp]
mov edi, dword [ebp + 4]
mov dword [esp], eax
je 0x4c8c6a
cmp ebx, 8
jl 0x4c8dca
mov eax, ebx
mov ebp, ebx
mov ebx, ecx
mov ecx, 0xfffffff0
not eax
cmp eax, 0xffffffef
cmovg ecx, eax
lea eax, [ecx + ebp + 8]
mov ecx, edi
lea ebp, [ebp + 8]
xor edi, edi
and eax, 0xfffffff8
lea edx, [eax + 8]
mov dword [esp + 0x14], eax
lea eax, [ebx + eax + 8]
mov dword [esp + 0x18], edx
mov edx, dword [esp]
mov dword [esp + 4], eax
nop dword [eax]
xor edx, dword [ebx + edi]
xor ecx, dword [ebx + edi + 4]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xc], ecx
lea ecx, [esp + 8]
call fcn.004c8e20
mov edx, dword [esp + 8]
add ebp, 0xfffffff8
mov eax, edx
mov byte [esi + edi], dl
mov byte [esi + edi + 1], dh
shr eax, 0x10
mov byte [esi + edi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + edi + 3], al
mov ecx, dword [esp + 0xc]
mov eax, ecx
mov byte [esi + edi + 4], cl
mov byte [esi + edi + 5], ch
shr eax, 0x10
mov byte [esi + edi + 6], al
mov eax, ecx
shr eax, 0x18
mov byte [esi + edi + 7], al
add edi, 8
cmp ebp, 0xf
jg 0x4c8b20
mov ebx, dword [esp + 0x38]
add esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 4]
add ebx, 0xfffffff8
sub ebx, dword [esp + 0x14]
test ebx, ebx
je 0x4c8dd9
mov dword [esp], edx
lea edx, [ebx - 1]
mov edi, eax
xor eax, eax
cmp edx, 6
ja case.default.0x4c8bc8
mov dword [esp + 4], ecx
mov ecx, edx
add edi, ebx
mov dword [esp + 0x10], 0
xor ebx, ebx
xor edx, edx
jmp dword [ecx*4 + 0x59ab9c]
movzx eax, byte [edi - 1]
dec edi
shl eax, 0x10
movzx ecx, byte [edi - 1]
dec edi
shl ecx, 8
or eax, ecx
movzx ecx, byte [edi - 1]
dec edi
or eax, ecx
mov dword [esp + 0x10], eax
movzx eax, byte [edi - 1]
dec edi
shl eax, 0x18
movzx edx, byte [edi - 1]
mov ebx, dword [esp + 0x10]
dec edi
shl edx, 0x10
or eax, edx
movzx ecx, byte [edi - 1]
dec edi
mov edx, ebx
shl ecx, 8
or eax, ecx
movzx ecx, byte [edi - 1]
or eax, ecx
mov ecx, dword [esp + 4]
xor eax, dword [esp]
xor edx, ecx
lea ecx, [esp + 8]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x3c]
call fcn.004c8e20
mov ecx, dword [esp + 8]
mov eax, ecx
mov byte [esi], cl
mov byte [esi + 1], ch
shr eax, 0x10
mov byte [esi + 2], al
mov eax, ecx
shr eax, 0x18
mov byte [esi + 3], al
mov edx, dword [esp + 0xc]
mov eax, edx
mov byte [esi + 4], dl
mov byte [esi + 5], dh
shr eax, 0x10
mov byte [esi + 6], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 7], al
jmp 0x4c8de6
cmp ebx, 8
jl 0x4c8d4a
mov eax, ebx
mov edx, 0xfffffff0
mov dword [esp + 0x14], ecx
mov dword [esp + 4], edi
lea ebp, [ebx + 8]
mov dword [esp + 0x10], esi
not eax
cmp eax, 0xffffffef
cmovg edx, eax
xor edi, edi
lea eax, [edx + ebx + 8]
and eax, 0xfffffff8
lea edx, [eax + 8]
mov dword [esp + 0x20], eax
lea eax, [ecx + eax + 8]
mov ecx, dword [esp]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x3c]
mov ebx, ecx
lea ecx, [esp + 8]
mov dword [esp], eax
mov eax, dword [esp + 0x14]
mov esi, dword [eax + edi]
mov dword [esp + 8], esi
mov eax, dword [eax + edi + 4]
mov dword [esp + 4], eax
mov dword [esp + 0xc], eax
call fcn.004c8f70
mov edx, dword [esp]
xor ebx, dword [esp + 8]
mov ecx, esi
mov esi, dword [esp + 0x10]
add ebp, 0xfffffff8
xor edx, dword [esp + 0xc]
mov eax, ebx
mov byte [esi + edi], bl
mov byte [esi + edi + 1], bh
shr ebx, 0x18
shr eax, 0x10
mov byte [esi + edi + 2], al
mov byte [esi + edi + 3], bl
mov eax, edx
mov byte [esi + edi + 4], dl
mov byte [esi + edi + 5], dh
shr edx, 0x18
shr eax, 0x10
mov byte [esi + edi + 6], al
mov byte [esi + edi + 7], dl
add edi, 8
cmp ebp, 0xf
jg 0x4c8cb0
mov ebx, dword [esp + 0x38]
mov dword [esp], ecx
add esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
mov edi, dword [esp + 4]
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x18]
add ebx, 0xfffffff8
sub ebx, dword [esp + 0x20]
test ebx, ebx
je 0x4c8de1
mov eax, dword [ecx]
mov dword [esp + 4], edi
mov edi, dword [esp]
mov dword [esp + 8], eax
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 4]
lea ecx, [esp + 8]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], eax
call fcn.004c8f70
lea eax, [ebx - 1]
cmp eax, 6
ja case.default.0x4c8d8f
mov edx, dword [esp + 4]
mov ecx, edi
add esi, ebx
xor ecx, dword [esp + 8]
xor edx, dword [esp + 0xc]
jmp dword [eax*4 + 0x59abb8]
mov eax, edx
shr eax, 0x10
mov byte [esi - 1], al
dec esi
mov byte [esi - 1], dh
dec esi
mov byte [esi - 1], dl
dec esi
mov eax, ecx
shr eax, 0x18
mov byte [esi - 1], al
dec esi
mov eax, ecx
shr eax, 0x10
mov byte [esi - 1], al
dec esi
mov byte [esi - 1], ch
dec esi
mov byte [esi - 1], cl
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
jmp 0x4c8de6
mov edx, dword [esp]
mov eax, ecx
mov ecx, edi
test ebx, ebx
jne 0x4c8ba1
mov eax, ecx
mov ecx, edx
mov edx, eax
jmp 0x4c8de6
mov ecx, dword [esp]
mov edx, edi
mov eax, ecx
mov byte [ebp], cl
mov byte [ebp + 1], ch
shr ecx, 0x18
shr eax, 0x10
mov byte [ebp + 2], al
mov eax, edx
mov byte [ebp + 3], cl
mov byte [ebp + 4], dl
mov byte [ebp + 5], dh
shr edx, 0x18
shr eax, 0x10
mov byte [ebp + 6], al
mov byte [ebp + 7], dl
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
xor edx, edx
jmp 0x4c8c18