Function at 0x4be8a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
mov eax, 0x56d500
push ebx
push esi
push edi
call fcn.00535f7c
mov dword [ebp - 0x20], 1
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.00543c10
inc dword [ebp - 0x20]
mov dl, 1
mov word [ebp - 0x2c], 8
mov word [ebp - 0x2c], 0x14
push 0
mov eax, dword [0x51f14c]
mov ecx, dword [ebp + 0xc]
call fcn.005222dc
mov word [ebp - 0x2c], 8
mov esi, eax
jmp 0x4be924
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.00535c7c
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 0x4be96e
mov dl, byte [eax]
xor byte [ebp - 0x3d], dl
inc dword [ebp - 0x48]
inc eax
cmp ebx, dword [ebp - 0x48]
jg 0x4be960
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 4]
test al, al
je 0x4be9c7
cmp al, byte [ebp - 0x3d]
je 0x4be9c7
mov ebx, esi
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x4be9a4
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.00543cd4
pop eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x4beb1d
mov eax, esi
call fcn.005220d4
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 0x4bea2c
mov ebx, esi
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x4bea09
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.00543cd4
pop eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
jmp 0x4beb1d
push eax
call fcn.00535344
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 0x4bea69
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.004bfd54
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 0x4bead4
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 0x4beab6
inc dword [ebp - 0x48]
add dword [ebp - 0x50], 0x20
add esi, 0x1f
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x4c]
jl 0x4beaaf
xor edx, edx
mov dword [ebp - 0x48], edx
mov ecx, dword [ebp + 8]
lea eax, [ecx + 8]
jmp 0x4beaf5
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 0x4beae1
mov al, 1
mov edx, 2
push eax
lea eax, [ebp + 0xc]
dec dword [ebp - 0x20]
call fcn.00543cd4
pop eax
mov edx, dword [ebp - 0x3c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret