Function at 0x4be4a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
mov eax, 0x5871d4
push ebx
push esi
push edi
call fcn.0054c16c
mov word [ebp - 0x24], 8
push 0x14
push 0x30
mov edx, dword [ebp + 0xc]
push edx
call fcn.0054bd38
add esp, 0xc
lea ecx, [ebp - 0x50]
push 0x14
push 0
push ecx
call fcn.0054bd38
add esp, 0xc
lea eax, [ebp - 0x64]
push 0x14
push 0
push eax
call fcn.0054bd38
add esp, 0xc
mov dl, 1
mov eax, dword [0x5348a0]
call fcn.004087f0
mov dword [ebp - 0x38], eax
xor edx, edx
mov dword [ebp - 0x3c], edx
mov ecx, dword [ebp - 0x3c]
push ecx
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040cee8
add esp, 8
mov eax, dword [ebp - 0x38]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, 2
jge 0x4be54f
mov dword [ebp - 0x3c], 1
mov ecx, dword [ebp - 0x3c]
push ecx
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040cee8
add esp, 8
mov eax, dword [ebp - 0x38]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, 2
jge 0x4be54f
xor eax, eax
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x4be74b
mov word [ebp - 0x24], 0x14
xor ecx, ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 4]
inc dword [ebp - 0x18]
xor edx, edx
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp dword [ebp - 4], 0
je 0x4be575
mov eax, dword [ebp - 4]
jmp 0x4be57a
mov eax, 0x580059
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
lea esi, [ebp - 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, 2
and ecx, 3
lea eax, [ebp - 4]
rep movsb byte es:[edi], byte [esi]
dec dword [ebp - 0x18]
call fcn.0055a088
mov word [ebp - 0x24], 0x20
xor ecx, ecx
mov dword [ebp - 8], ecx
lea ecx, [ebp - 8]
inc dword [ebp - 0x18]
mov edx, 1
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp dword [ebp - 8], 0
je 0x4be5d5
mov eax, dword [ebp - 8]
jmp 0x4be5da
mov eax, 0x58005a
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
lea esi, [ebp - 0x64]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, 2
and ecx, 3
lea eax, [ebp - 8]
rep movsb byte es:[edi], byte [esi]
dec dword [ebp - 0x18]
call fcn.0055a088
lea ecx, [ebp - 0x50]
push ecx
call fcn.0054be6c
pop ecx
mov edx, eax
cmp edx, 0x14
jle 0x4be622
mov edx, 0x14
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov esi, ecx
lea ecx, [ebp - 0x50]
cmp edx, eax
jle 0x4be63b
mov bl, byte [ecx]
mov byte [esi], bl
inc eax
inc esi
inc ecx
cmp edx, eax
jg 0x4be630
lea eax, [ebp - 0x64]
push eax
call fcn.0054be6c
pop ecx
mov edx, eax
cmp edx, 0x14
jle 0x4be651
mov edx, 0x14
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov esi, ecx
lea ecx, [ebp - 0x64]
cmp edx, eax
jle 0x4be66a
mov bl, byte [ecx]
xor byte [esi], bl
inc eax
inc esi
inc ecx
cmp edx, eax
jg 0x4be65f
cmp dword [ebp - 0x3c], 0
jne 0x4be68e
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x10], 0x17
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x11], 0x16
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 0x12], 0x15
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x13], 0x14
jmp 0x4be6b0
cmp dword [ebp - 0x3c], 1
jne 0x4be6b0
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x10], 0x16
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 0x11], 0x17
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x12], 0x14
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x13], 0x15
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x4be6d8
mov eax, dword [ebx]
mov dword [ebp - 0xc], eax
mov word [ebp - 0x24], 0x38
mov edx, 3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x24], 0x2c
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x14], 0
push 0x14
mov eax, dword [ebp + 0xc]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.0040d5f4
mov word [ebp - 0x24], 0
add esp, 0xc
jmp 0x4be719
mov edx, dword [ebp + 8]
cmp dword [edx + 0x2a14], 1
jne 0x4be73c
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2a14], 2
mov eax, dword [ebp + 8]
push eax
call fcn.004a6ab0
pop ecx
mov eax, 1
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret