Function at 0x4bae50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xc
call fcn.005e28b0
cmp dword [ebp + 0x1c], 0
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [eax]
push edi
mov edi, ecx
je 0x4baf61
test esi, esi
je 0x4bae9f
test ebx, ebx
je 0x4bae9f
movzx eax, byte [esi + edi]
mov edx, dword [ebp + 8]
movzx ecx, byte [edx]
xor eax, ecx
mov ecx, dword [ebp + 0xc]
mov byte [esi + edi], al
mov byte [ecx], al
inc ecx
inc edx
inc esi
dec ebx
and esi, 0xf
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], edx
jne 0x4bae78
cmp ebx, 0x10
jb 0x4baf1a
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov eax, ecx
sub eax, edi
mov dword [ebp + 0x1c], eax
mov eax, edx
sub eax, edi
mov dword [ebp - 4], eax
mov eax, ebx
shr eax, 4
mov dword [ebp - 8], eax
shl eax, 4
add ecx, eax
add edx, eax
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], edx
lea ecx, [ecx]
mov edx, dword [ebp + 0x14]
push edx
push edi
push edi
call dword [ebp + 0x20]
add esp, 0xc
cmp esi, 0x10
jae 0x4baf06
mov ecx, 0xf
sub ecx, esi
shr ecx, 2
lea eax, [esi + edi]
inc ecx
nop
mov edx, dword [ebp - 4]
mov edx, dword [edx + eax]
xor dword [eax], edx
mov edx, dword [eax]
mov esi, dword [ebp + 0x1c]
mov dword [esi + eax], edx
add eax, 4
dec ecx
jne 0x4baef0
mov eax, 0x10
add dword [ebp + 0x1c], eax
add dword [ebp - 4], eax
sub ebx, eax
xor esi, esi
dec dword [ebp - 8]
jne 0x4baed0
test ebx, ebx
je 0x4baf55
mov eax, dword [ebp + 0x14]
push eax
push edi
push edi
call dword [ebp + 0x20]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
sub ecx, edi
add esp, 0xc
lea eax, [esi + edi]
sub edx, edi
mov dword [ebp + 0x1c], ecx
add esi, ebx
lea esp, [esp]
movzx edi, byte [eax]
movzx ecx, byte [eax + edx]
xor ecx, edi
mov edi, dword [ebp + 0x1c]
mov byte [eax], cl
mov byte [eax + edi], cl
inc eax
dec ebx
jne 0x4baf40
mov ecx, dword [ebp + 0x18]
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x4baf89
test ebx, ebx
je 0x4baf89
mov edx, dword [ebp + 8]
mov al, byte [edx]
mov dl, byte [esi + edi]
mov ecx, dword [ebp + 0xc]
inc dword [ebp + 8]
xor dl, al
mov byte [ecx], dl
mov byte [esi + edi], al
inc ecx
inc esi
dec ebx
and esi, 0xf
mov dword [ebp + 0xc], ecx
jne 0x4baf65
cmp ebx, 0x10
jb 0x4bb00a
mov eax, dword [ebp + 0xc]
sub eax, edi
mov dword [ebp + 0x1c], eax
mov eax, ebx
shr eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
push eax
push edi
push edi
call dword [ebp + 0x20]
mov eax, 0x10
add esp, 0xc
cmp esi, eax
jae 0x4baff8
mov edx, dword [ebp + 8]
sub edx, dword [ebp + 0xc]
mov ecx, 0xf
sub ecx, esi
shr ecx, 2
lea eax, [esi + edi]
mov dword [ebp - 4], edx
inc ecx
jmp 0x4bafd3
mov edx, dword [ebp - 4]
mov esi, dword [ebp + 0x1c]
add esi, eax
mov edx, dword [esi + edx]
mov esi, dword [eax]
xor esi, edx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0x1c]
mov dword [edx + eax], esi
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
add eax, 4
dec ecx
jne 0x4bafd0
mov eax, 0x10
add dword [ebp + 0xc], eax
add dword [ebp + 0x1c], eax
add dword [ebp + 8], eax
sub ebx, eax
xor esi, esi
dec dword [ebp - 8]
jne 0x4bafa2
test ebx, ebx
je 0x4bb049
mov eax, dword [ebp + 0x14]
push eax
push edi
push edi
call dword [ebp + 0x20]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
sub ecx, edx
sub edx, edi
add esp, 0xc
lea eax, [esi + edi]
mov dword [ebp - 4], ecx
mov dword [ebp + 0x1c], edx
add esi, ebx
jmp 0x4bb037
mov edx, dword [ebp + 0x1c]
mov ecx, dword [ebp - 4]
lea edi, [eax + edx]
mov dl, byte [eax]
mov cl, byte [edi + ecx]
xor dl, cl
mov byte [edi], dl
mov byte [eax], cl
inc eax
dec ebx
jne 0x4bb031
mov eax, dword [ebp + 0x18]
pop edi
mov dword [eax], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret