Function at 0x4e0450
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x20]
xor eax, eax
push ebp
push 0x4e07c8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x29], 0
xor ecx, ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [0x4fa774]
call fcn.004faa00
test al, al
je 0x4e079f
xor ecx, ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [0x4fa774]
call fcn.004faa1c
test eax, eax
jns 0x4e04c1
add eax, 7
sar eax, 3
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x24]
jne 0x4e079f
lea eax, [ebp - 0x40]
call fcn.004c3f3c
lea eax, [ebp - 0x40]
mov ecx, ebx
mov edx, edi
call fcn.004c6700
mov eax, dword [ebp - 0x40]
call fcn.004c3bd4
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x40]
call fcn.004c3fa0
cmp dword [ebp - 0x34], 0
je 0x4e079f
dec dword [ebp - 0x34]
mov dword [ebp - 0x38], ebx
mov eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
push ebx
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x38]
push eax
mov ecx, edi
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
call fcn.004dfef0
test al, al
je 0x4e079f
mov eax, dword [ebp - 0x30]
add eax, esi
add eax, 2
cmp eax, dword [ebp - 0x38]
jg 0x4e079f
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x38]
cmp byte [eax + edx - 1], 0xbc
jne 0x4e079f
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
dec eax
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov eax, dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x30]
dec ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004030c8
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
mov edx, dword [ebp - 4]
lea eax, [edx + eax - 1]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x30]
call fcn.004030c8
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x30]
dec ecx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x30]
call fcn.004deff8
mov eax, dword [ebp - 0x38]
add eax, eax
add eax, eax
add eax, eax
sub eax, dword [ebp - 0x34]
test eax, eax
jle 0x4e061d
mov edx, 1
mov ecx, 8
sub ecx, edx
mov ebx, 1
shl ebx, cl
mov ecx, dword [ebp - 8]
movzx ecx, byte [ecx]
and ebx, ecx
jne 0x4e079f
inc edx
dec eax
jne 0x4e05fd
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, 2
test eax, eax
jl 0x4e063e
inc eax
xor edx, edx
mov ecx, dword [ebp - 0xc]
movzx ecx, byte [ecx + edx]
mov ebx, dword [ebp - 8]
xor byte [ebx + edx], cl
inc edx
dec eax
jne 0x4e062d
mov eax, dword [ebp - 0x38]
add eax, eax
add eax, eax
add eax, eax
sub eax, dword [ebp - 0x34]
test eax, eax
jle 0x4e0669
mov edx, 1
mov ecx, 8
sub ecx, edx
mov bl, 1
shl bl, cl
not bl
mov ecx, dword [ebp - 8]
and byte [ecx], bl
inc edx
dec eax
jne 0x4e0653
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, esi
sub eax, 3
test eax, eax
jl 0x4e068c
inc eax
xor edx, edx
mov ecx, dword [ebp - 8]
cmp byte [ecx + edx], 0
jne 0x4e079f
inc edx
dec eax
jne 0x4e067b
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, esi
mov edx, dword [ebp - 8]
cmp byte [edx + eax - 2], 1
jne 0x4e079f
push esi
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov ebx, dword [ebp - 0x30]
add ebx, 8
mov eax, ebx
add eax, esi
push eax
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, dword [0x4c5894]
call fcn.004060ec
add esp, 4
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x30]
sub eax, esi
mov edx, dword [ebp - 8]
lea eax, [edx + eax - 1]
mov edx, dword [ebp - 0x14]
mov ecx, esi
call fcn.004030c8
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov edx, 8
call fcn.004035fc
mov eax, dword [ebp - 0x18]
lea edx, [eax + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x30]
call fcn.004030c8
test esi, esi
jle 0x4e0727
mov eax, dword [ebp - 0x18]
lea edx, [eax + ebx]
mov eax, dword [ebp - 0x14]
mov ecx, esi
call fcn.004030c8
push 0
mov ecx, dword [ebp - 0x28]
mov dl, 1
mov eax, dword [0x4fa774]
call fcn.004fa8a0
mov dword [ebp - 0x3c], eax
xor eax, eax
push ebp
push 0x4e077b
push dword fs:[eax]
mov dword fs:[eax], esp
lea ecx, [esi + 8]
add ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x3c]
call fcn.004faaf0
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x3c]
call fcn.004faaf8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e0782
mov eax, dword [ebp - 0x3c]
call fcn.00403cdc
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e07cf
lea eax, [ebp - 0x1c]
call fcn.00404c40
lea eax, [ebp - 0x18]
mov edx, dword [0x4c5894]
mov ecx, 6
call fcn.00405824
ret