Function at 0x4ba5a8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
mov eax, 0x588310
push ebx
push esi
push edi
call fcn.0054e578
mov dword [ebp - 0x20], 1
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.0055c248
inc dword [ebp - 0x20]
mov dl, 1
mov word [ebp - 0x2c], 8
mov word [ebp - 0x2c], 0x14
push 0
mov eax, dword [0x535b6c]
mov ecx, dword [ebp + 0xc]
call fcn.00538cfc
mov word [ebp - 0x2c], 8
mov esi, eax
jmp 0x4ba62c
mov eax, esi
mov edx, dword [ebp + 8]
add edx, 4
mov ecx, 1
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, esi
mov ecx, 4
mov edx, dword [ebp + 8]
mov ebx, dword [eax]
call dword [ebx + 4]
mov eax, dword [ebp + 0x10]
push eax
call fcn.0054e278
mov ebx, eax
xor eax, eax
pop ecx
mov dword [ebp - 0x48], eax
mov edx, dword [ebp + 0x10]
cmp ebx, dword [ebp - 0x48]
mov eax, edx
jle 0x4ba676
mov dl, byte [eax]
xor byte [ebp - 0x3d], dl
inc dword [ebp - 0x48]
inc eax
cmp ebx, dword [ebp - 0x48]
jg 0x4ba668
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 4]
test al, al
je 0x4ba6cf
cmp al, byte [ebp - 0x3d]
je 0x4ba6cf
mov ebx, esi
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x4ba6ac
mov eax, dword [ebx]
mov dword [ebp - 4], eax
mov word [ebp - 0x2c], 0x2c
mov edx, 3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x2c], 0x20
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp + 0xc]
dec dword [ebp - 0x20]
call fcn.0055c51c
pop eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x4ba825
mov eax, esi
call fcn.00538af4
mov edx, dword [ebp + 8]
mov ebx, eax
dec ebx
mov eax, ebx
mov ecx, dword [edx]
shl ecx, 5
lea ecx, [ecx + ecx*4]
cmp ecx, eax
jbe 0x4ba734
mov ebx, esi
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x4ba711
mov eax, dword [ebx]
mov dword [ebp - 0xc], eax
mov word [ebp - 0x2c], 0x44
mov edx, 3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x2c], 0x38
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp + 0xc]
dec dword [ebp - 0x20]
call fcn.0055c51c
pop eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x4ba825
push eax
call fcn.0054d784
pop ecx
mov dword [ebp - 0x44], eax
mov eax, esi
mov edx, dword [ebp - 0x44]
mov ecx, ebx
mov edi, dword [eax]
call dword [edi + 4]
mov edi, esi
mov dword [ebp - 0x18], edi
test edi, edi
je 0x4ba771
mov eax, dword [edi]
mov dword [ebp - 0x14], eax
mov word [ebp - 0x2c], 0x5c
mov edx, 3
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x2c], 0x50
push ebx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004bc2a0
mov edx, dword [ebp + 8]
mov ecx, 0x1f
add esp, 0xc
mov eax, dword [edx]
shl eax, 5
xor edx, edx
lea eax, [eax + eax*4]
add eax, 0x1e
div ecx
mov dword [ebp - 0x4c], eax
xor eax, eax
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x44]
lea ecx, [edx + 1]
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x44]
mov esi, eax
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x4c]
jge 0x4ba7dc
xor ecx, ecx
mov edx, esi
mov eax, dword [ebp - 0x50]
mov bl, byte [eax]
mov byte [edx], bl
inc ecx
inc edx
inc eax
cmp ecx, 0x1f
jl 0x4ba7be
inc dword [ebp - 0x48]
add dword [ebp - 0x50], 0x20
add esi, 0x1f
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x4c]
jl 0x4ba7b7
xor edx, edx
mov dword [ebp - 0x48], edx
mov ecx, dword [ebp + 8]
lea eax, [ecx + 8]
jmp 0x4ba7fd
mov edx, dword [ebp - 0x48]
shl edx, 5
lea edx, [edx + edx*4]
add edx, dword [ebp - 0x44]
mov dword [eax], edx
inc dword [ebp - 0x48]
add eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
cmp edx, dword [ebp - 0x48]
jg 0x4ba7e9
mov al, 1
mov edx, 2
push eax
lea eax, [ebp + 0xc]
dec dword [ebp - 0x20]
call fcn.0055c51c
pop eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret