Function at 0x5ba250
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, ecx
push esi
push edi
cmp dword [ebp], 0
je 0x5ba26e
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x20
ret 0xc
mov eax, dword [ebp + 8]
test eax, eax
je 0x5ba284
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x20
ret 0xc
mov esi, dword [esp + 0x34]
test esi, esi
je 0x5ba593
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x5ba593
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
mov eax, dword [ebp + 4]
sar ebx, 7
sub eax, 0
mov dword [esp + 0x38], ebx
je 0x5ba55e
dec eax
je 0x5ba4b1
dec eax
je 0x5ba2ce
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x20
ret 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x14], ecx
test ebx, ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
jle 0x5ba584
mov dword [esp + 0x34], ebx
xor edi, edi
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
lea edx, [esp + 0x20]
lea eax, [esp + 0x20]
mov dword [esp + 0x2c], ecx
push edx
push eax
mov ecx, ebp
call fcn.005bac30
mov eax, edi
mov ecx, dword [esp + 0x3c]
cdq
and edx, 7
mov ebx, edi
add eax, edx
mov dl, byte [esp + 0x20]
sar eax, 3
and ebx, 7
and dl, 0x80
lea esi, [eax + ecx]
mov cl, bl
shr dl, cl
mov al, byte [esi]
mov cl, byte [esp + 0x11]
shr cl, 7
xor al, dl
mov dl, byte [esp + 0x10]
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x11]
mov byte [esp + 0x10], cl
mov cl, byte [esp + 0x12]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x12]
mov byte [esp + 0x11], cl
mov cl, byte [esp + 0x13]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x13]
mov byte [esp + 0x12], cl
mov cl, byte [esp + 0x14]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x14]
mov byte [esp + 0x13], cl
mov cl, byte [esp + 0x15]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x15]
mov byte [esp + 0x14], cl
mov cl, byte [esp + 0x16]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x16]
mov byte [esp + 0x15], cl
mov cl, byte [esp + 0x17]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x17]
mov byte [esp + 0x16], cl
mov cl, byte [esp + 0x18]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x18]
mov byte [esp + 0x17], cl
mov cl, byte [esp + 0x19]
mov byte [esi], al
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x19]
mov byte [esp + 0x18], cl
mov cl, byte [esp + 0x1a]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1a]
mov byte [esp + 0x19], cl
mov cl, byte [esp + 0x1b]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1b]
mov byte [esp + 0x1a], cl
mov cl, byte [esp + 0x1c]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1c]
mov byte [esp + 0x1b], cl
mov cl, byte [esp + 0x1d]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1d]
mov byte [esp + 0x1c], cl
mov cl, byte [esp + 0x1e]
shr cl, 7
shl dl, 1
or cl, dl
mov dl, byte [esp + 0x1e]
mov byte [esp + 0x1d], cl
mov cl, byte [esp + 0x1f]
shr cl, 7
shl dl, 1
or cl, dl
mov byte [esp + 0x1e], cl
mov cl, 7
sub cl, bl
shr al, cl
mov cl, byte [esp + 0x1f]
shl cl, 1
and al, 1
or al, cl
inc edi
cmp edi, 0x80
mov byte [esp + 0x1f], al
jl 0x5ba2f8
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x34], eax
jne 0x5ba2f6
mov ebx, dword [esp + 0x38]
pop edi
mov eax, ebx
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret 0xc
mov edx, dword [ebp + 0xc]
mov edi, dword [esi]
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 0x10]
xor edx, edi
mov edi, dword [ebp + 0x18]
xor eax, ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x14]
xor edx, edi
mov edi, dword [esp + 0x3c]
xor ecx, eax
lea eax, [esp + 0x20]
mov dword [esp + 0x28], ecx
push edi
push eax
mov ecx, ebp
mov dword [esp + 0x34], edx
call fcn.005bac30
lea eax, [ebx - 1]
add esi, 0x10
test eax, eax
jle 0x5ba584
mov dword [esp + 0x3c], eax
mov ecx, dword [esi]
mov edx, dword [edi]
mov eax, dword [edi + 4]
xor ecx, edx
mov edx, dword [esi + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [edi + 8]
xor edx, eax
mov eax, dword [esi + 8]
mov dword [esp + 0x24], edx
xor eax, ecx
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0xc]
xor ecx, eax
add edi, 0x10
lea edx, [esp + 0x20]
mov dword [esp + 0x2c], ecx
push edi
push edx
mov ecx, ebp
call fcn.005bac30
mov eax, dword [esp + 0x3c]
add esi, 0x10
dec eax
mov dword [esp + 0x3c], eax
jne 0x5ba503
pop edi
mov eax, ebx
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x20
ret 0xc
test ebx, ebx
jle 0x5ba584
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x34], ebx
push edi
push esi
mov ecx, ebp
call fcn.005bac30
mov eax, dword [esp + 0x34]
add esi, 0x10
add edi, 0x10
dec eax
mov dword [esp + 0x34], eax
jne 0x5ba56a
pop edi
mov eax, ebx
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x20
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 0xc