Function at 0x4fed30
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, 0x80
push ebx
mov dword [0x81a448], eax
mov dword [0x81a454], eax
mov eax, dword [0x7ccacc]
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 [0x81a44c], 6
mov dword [0x81a450], 0x10
mov dword [0x81a444], 8
mov dword [0x7ccad0], ebx
jne 0x4fed8a
mov eax, dword [esp + 0x14]
mov dword [0x83a488], eax
jmp 0x4fedbe
mov ecx, dword [esp + 0x14]
push 0x10000
mov dword [0x7ccac0], ecx
call fcn.004f56e0
add esp, 4
cmp eax, ebx
mov dword [0x83a488], eax
jne 0x4fedb2
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [0x7ccab4], ebx
mov dword [0x7ccac4], esi
mov edx, dword [esp + 0x18]
push esi
mov dword [0x85a4a0], edx
call fcn.004fe9d0
mov eax, dword [0x7ccac8]
add esp, 4
cmp eax, ebx
je 0x4ff075
mov ebx, dword [esp + 0x14]
mov eax, dword [0x83a484]
push ebp
mov edx, dword [0x83a488]
xor ecx, ecx
mov esi, eax
mov cl, byte [eax + edx + 2]
and esi, 0x7fff
mov edx, ecx
mov ecx, dword [0x7ccab8]
and ecx, 0x3ff
and edx, 0x7fff
shl ecx, 5
xor edx, ecx
xor ecx, ecx
mov dword [0x7ccab8], edx
mov cx, word [edx*2 + 0x84a4a0]
mov word [esi*2 + 0x83a4a0], cx
mov esi, dword [0x85a4a4]
mov word [edx*2 + 0x84a4a0], ax
mov edx, edi
test ecx, ecx
mov dword [0x83a480], edx
mov edi, 2
je 0x4fee9d
cmp edx, dword [0x81a450]
jae 0x4fee9d
mov ebp, eax
sub ebp, ecx
cmp ebp, 0x7efa
ja 0x4fee9d
push ecx
call fcn.004febe0
mov edi, eax
mov eax, dword [0x7ccac8]
add esp, 4
cmp edi, eax
jbe 0x4fee76
mov edi, eax
mov eax, dword [0x83a484]
cmp edi, 3
jne 0x4fee97
mov ebp, dword [0x85a4a4]
mov edx, eax
sub edx, ebp
cmp edx, 0x1000
jbe 0x4fee97
mov edi, 2
mov edx, dword [0x83a480]
cmp edx, 3
jb 0x4fef92
cmp edi, edx
ja 0x4fef92
sub eax, esi
add edx, 0xfffffffd
dec eax
push edx
push eax
call fcn.005015f0
mov edx, dword [0x7ccac8]
mov ebx, eax
mov eax, dword [0x83a480]
mov ecx, 1
mov esi, dword [0x83a488]
sub ecx, eax
add esp, 8
add edx, ecx
sub eax, 2
mov dword [0x7ccac8], edx
mov dword [0x83a480], eax
mov eax, dword [0x83a484]
inc eax
xor edx, edx
mov dword [0x83a484], eax
mov dl, byte [esi + eax + 2]
mov ecx, edx
mov edx, dword [0x7ccab8]
and edx, 0x3ff
and ecx, 0x7fff
shl edx, 5
xor ecx, edx
mov edx, eax
and edx, 0x7fff
mov dword [0x7ccab8], ecx
mov di, word [ecx*2 + 0x84a4a0]
mov word [edx*2 + 0x83a4a0], di
mov word [ecx*2 + 0x84a4a0], ax
mov ecx, dword [0x83a480]
dec ecx
mov dword [0x83a480], ecx
jne 0x4feeed
xor ebp, ebp
inc eax
test ebx, ebx
mov dword [esp + 0x10], ebp
mov edi, 2
mov dword [0x83a484], eax
je 0x4ff013
mov edx, dword [0x85a4a8]
test edx, edx
jl 0x4fef6f
lea ecx, [edx + esi]
jmp 0x4fef71
xor ecx, ecx
lea esi, [ebx - 1]
push 0
sub eax, edx
push esi
push eax
push ecx
call fcn.00500c70
mov eax, dword [0x83a484]
add esp, 0x10
mov dword [0x85a4a8], eax
jmp 0x4ff013
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x4feff7
mov edx, dword [0x83a488]
xor ecx, ecx
mov cl, byte [eax + edx - 1]
push ecx
push 0
call fcn.005015f0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4feff0
mov ecx, dword [0x85a4a8]
test ecx, ecx
jl 0x4fefca
mov eax, dword [0x83a488]
add eax, ecx
jmp 0x4fefcc
xor eax, eax
lea edx, [ebx - 1]
push 0
push edx
mov edx, dword [0x83a484]
sub edx, ecx
push edx
push eax
call fcn.00500c70
mov eax, dword [0x83a484]
add esp, 0x10
mov dword [0x85a4a8], eax
jmp 0x4ff000
mov eax, dword [0x83a484]
jmp 0x4ff000
mov ebp, 1
mov dword [esp + 0x10], ebp
mov ecx, dword [0x7ccac8]
inc eax
dec ecx
mov dword [0x83a484], eax
mov dword [0x7ccac8], ecx
mov ecx, dword [0x7ccacc]
test ecx, ecx
je 0x4ff049
mov ecx, dword [0x7ccac8]
mov esi, 0x106
cmp ecx, esi
jae 0x4ff049
mov ecx, dword [0x7ccabc]
test ecx, ecx
jne 0x4ff049
call fcn.004feae0
mov eax, dword [0x7ccac8]
cmp eax, esi
mov eax, dword [0x83a484]
jb 0x4ff02c
mov ecx, dword [0x7ccac8]
test ecx, ecx
jne 0x4fede8
test ebp, ebp
pop ebp
je 0x4ff07e
mov edx, dword [0x83a488]
xor ecx, ecx
mov cl, byte [eax + edx - 1]
push ecx
push 0
call fcn.005015f0
add esp, 8
jmp 0x4ff079
mov ebx, dword [esp + 0x14]
mov eax, dword [0x83a484]
mov edx, dword [0x85a4a8]
test edx, edx
jl 0x4ff092
mov ecx, dword [0x83a488]
add ecx, edx
jmp 0x4ff094
xor ecx, ecx
dec ebx
push 1
sub eax, edx
push ebx
push eax
push ecx
call fcn.00500c70
mov eax, dword [0x7ccad0]
add esp, 0x10
pop edi
pop esi
pop ebx
pop ecx
ret