Function at 0x4e85a0
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, 0x80
push ebx
mov dword [0x7b277c], eax
mov dword [0x7b2788], eax
mov eax, dword [0x765500]
xor ebx, ebx
push esi
mov esi, dword [esp + 0x18]
push edi
cmp eax, ebx
mov dword [esp + 0xc], ebx
mov edi, 2
mov dword [0x7b2780], 6
mov dword [0x7b2784], 0x10
mov dword [0x7b2778], 8
mov dword [0x765504], ebx
jne 0x4e85fa
mov eax, dword [esp + 0x14]
mov dword [0x7d27c8], eax
jmp 0x4e862e
mov ecx, dword [esp + 0x14]
push 0x10000
mov dword [0x7654f4], ecx
call fcn.004df760
add esp, 4
cmp eax, ebx
mov dword [0x7d27c8], eax
jne 0x4e8622
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [0x7654e8], ebx
mov dword [0x7654f8], esi
mov edx, dword [esp + 0x18]
push esi
mov dword [0x7f27e0], edx
call fcn.004e8240
mov eax, dword [0x7654fc]
add esp, 4
cmp eax, ebx
je 0x4e88e5
mov ebx, dword [esp + 0x14]
mov eax, dword [0x7d27c4]
push ebp
mov edx, dword [0x7d27c8]
xor ecx, ecx
mov esi, eax
mov cl, byte [eax + edx + 2]
and esi, 0x7fff
mov edx, ecx
mov ecx, dword [0x7654ec]
and ecx, 0x3ff
and edx, 0x7fff
shl ecx, 5
xor edx, ecx
xor ecx, ecx
mov dword [0x7654ec], edx
mov cx, word [edx*2 + 0x7e27e0]
mov word [esi*2 + 0x7d27e0], cx
mov esi, dword [0x7f27e4]
mov word [edx*2 + 0x7e27e0], ax
mov edx, edi
test ecx, ecx
mov dword [0x7d27c0], edx
mov edi, 2
je 0x4e870d
cmp edx, dword [0x7b2784]
jae 0x4e870d
mov ebp, eax
sub ebp, ecx
cmp ebp, 0x7efa
ja 0x4e870d
push ecx
call fcn.004e8450
mov edi, eax
mov eax, dword [0x7654fc]
add esp, 4
cmp edi, eax
jbe 0x4e86e6
mov edi, eax
mov eax, dword [0x7d27c4]
cmp edi, 3
jne 0x4e8707
mov ebp, dword [0x7f27e4]
mov edx, eax
sub edx, ebp
cmp edx, 0x1000
jbe 0x4e8707
mov edi, 2
mov edx, dword [0x7d27c0]
cmp edx, 3
jb 0x4e8802
cmp edi, edx
ja 0x4e8802
sub eax, esi
add edx, 0xfffffffd
dec eax
push edx
push eax
call fcn.004eae60
mov edx, dword [0x7654fc]
mov ebx, eax
mov eax, dword [0x7d27c0]
mov ecx, 1
mov esi, dword [0x7d27c8]
sub ecx, eax
add esp, 8
add edx, ecx
sub eax, 2
mov dword [0x7654fc], edx
mov dword [0x7d27c0], eax
mov eax, dword [0x7d27c4]
inc eax
xor edx, edx
mov dword [0x7d27c4], eax
mov dl, byte [esi + eax + 2]
mov ecx, edx
mov edx, dword [0x7654ec]
and edx, 0x3ff
and ecx, 0x7fff
shl edx, 5
xor ecx, edx
mov edx, eax
and edx, 0x7fff
mov dword [0x7654ec], ecx
mov di, word [ecx*2 + 0x7e27e0]
mov word [edx*2 + 0x7d27e0], di
mov word [ecx*2 + 0x7e27e0], ax
mov ecx, dword [0x7d27c0]
dec ecx
mov dword [0x7d27c0], ecx
jne 0x4e875d
xor ebp, ebp
inc eax
test ebx, ebx
mov dword [esp + 0x10], ebp
mov edi, 2
mov dword [0x7d27c4], eax
je 0x4e8883
mov edx, dword [0x7f27e8]
test edx, edx
jl 0x4e87df
lea ecx, [edx + esi]
jmp 0x4e87e1
xor ecx, ecx
lea esi, [ebx - 1]
push 0
sub eax, edx
push esi
push eax
push ecx
call fcn.004ea4e0
mov eax, dword [0x7d27c4]
add esp, 0x10
mov dword [0x7f27e8], eax
jmp 0x4e8883
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x4e8867
mov edx, dword [0x7d27c8]
xor ecx, ecx
mov cl, byte [eax + edx - 1]
push ecx
push 0
call fcn.004eae60
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4e8860
mov ecx, dword [0x7f27e8]
test ecx, ecx
jl 0x4e883a
mov eax, dword [0x7d27c8]
add eax, ecx
jmp 0x4e883c
xor eax, eax
lea edx, [ebx - 1]
push 0
push edx
mov edx, dword [0x7d27c4]
sub edx, ecx
push edx
push eax
call fcn.004ea4e0
mov eax, dword [0x7d27c4]
add esp, 0x10
mov dword [0x7f27e8], eax
jmp 0x4e8870
mov eax, dword [0x7d27c4]
jmp 0x4e8870
mov ebp, 1
mov dword [esp + 0x10], ebp
mov ecx, dword [0x7654fc]
inc eax
dec ecx
mov dword [0x7d27c4], eax
mov dword [0x7654fc], ecx
mov ecx, dword [0x765500]
test ecx, ecx
je 0x4e88b9
mov ecx, dword [0x7654fc]
mov esi, 0x106
cmp ecx, esi
jae 0x4e88b9
mov ecx, dword [0x7654f0]
test ecx, ecx
jne 0x4e88b9
call fcn.004e8350
mov eax, dword [0x7654fc]
cmp eax, esi
mov eax, dword [0x7d27c4]
jb 0x4e889c
mov ecx, dword [0x7654fc]
test ecx, ecx
jne 0x4e8658
test ebp, ebp
pop ebp
je 0x4e88ee
mov edx, dword [0x7d27c8]
xor ecx, ecx
mov cl, byte [eax + edx - 1]
push ecx
push 0
call fcn.004eae60
add esp, 8
jmp 0x4e88e9
mov ebx, dword [esp + 0x14]
mov eax, dword [0x7d27c4]
mov edx, dword [0x7f27e8]
test edx, edx
jl 0x4e8902
mov ecx, dword [0x7d27c8]
add ecx, edx
jmp 0x4e8904
xor ecx, ecx
dec ebx
push 1
sub eax, edx
push ebx
push eax
push ecx
call fcn.004ea4e0
mov eax, dword [0x765504]
add esp, 0x10
pop edi
pop esi
pop ebx
pop ecx
ret