Function at 0x4f3638
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
add esi, 0xffffeeee
xor edi, edi
xor ebx, ebx
mov eax, dword [ebp + 8]
mov word [eax - 0x1a8e], 2
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a7a], 0
je 0x4f392b
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a7a], 3
jb 0x4f3725
movzx eax, word [esi]
add eax, 3
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xba4]
movzx eax, byte [edx + eax - 1]
mov edx, dword [ebp + 8]
mov dx, word [edx - 0x1a8c]
shl edx, 5
xor ax, dx
and ax, 0x7fff
mov edx, dword [ebp + 8]
mov word [edx - 0x1a8c], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a8c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xbac]
mov ax, word [edx + eax*2]
mov dx, word [esi]
and dx, 0x7fff
movzx edx, dx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xba8]
mov word [ecx + edx*2], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a8c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xbac]
mov di, word [edx + eax*2]
mov edx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xbac]
mov cx, word [esi]
mov word [edx + eax*2], cx
test di, di
je 0x4f375d
movzx eax, word [esi]
movzx edx, di
sub eax, edx
cmp eax, 0x7efa
jg 0x4f375d
mov eax, dword [ebp + 8]
push eax
mov eax, edi
call fcn.004f3288
pop ecx
mov ebx, eax
mov eax, dword [ebp + 8]
cmp bx, word [eax - 0x1a7a]
jbe 0x4f375d
mov eax, dword [ebp + 8]
mov bx, word [eax - 0x1a7a]
cmp bx, 3
jb 0x4f38af
mov eax, dword [ebp + 8]
push eax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a7e]
sub eax, edx
movzx edx, bx
sub edx, 3
call fcn.004f1e94
pop ecx
mov edx, dword [ebp + 8]
sub word [edx - 0x1a7a], bx
mov edx, dword [ebp + 8]
cmp bx, word [edx - 0x1a82]
ja 0x4f3852
dec ebx
inc word [esi]
movzx edx, word [esi]
add edx, 3
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xba4]
movzx edx, byte [ecx + edx - 1]
mov ecx, dword [ebp + 8]
mov cx, word [ecx - 0x1a8c]
shl ecx, 5
xor dx, cx
and dx, 0x7fff
mov ecx, dword [ebp + 8]
mov word [ecx - 0x1a8c], dx
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a8c]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xbac]
mov dx, word [ecx + edx*2]
push edx
mov dx, word [esi]
and dx, 0x7fff
movzx edx, dx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xba8]
lea ecx, [ecx + edx*2]
pop edx
mov word [ecx], dx
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a8c]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xbac]
lea edx, [ecx + edx*2]
push edx
mov dx, word [esi]
pop ecx
mov word [ecx], dx
dec ebx
test bx, bx
jne 0x4f37a1
inc word [esi]
jmp 0x4f38de
add word [esi], bx
xor ebx, ebx
movzx edx, word [esi]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xba4]
movzx edx, byte [ecx + edx]
mov ecx, dword [ebp + 8]
mov word [ecx - 0x1a8c], dx
movzx edx, word [esi]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xba4]
movzx edx, byte [ecx + edx + 1]
mov ecx, dword [ebp + 8]
mov cx, word [ecx - 0x1a8c]
shl ecx, 5
xor dx, cx
and dx, 0x7fff
mov ecx, dword [ebp + 8]
mov word [ecx - 0x1a8c], dx
jmp 0x4f38de
mov eax, dword [ebp + 8]
push eax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xba4]
movzx edx, byte [edx + eax]
xor eax, eax
call fcn.004f1e94
pop ecx
mov edx, dword [ebp + 8]
dec word [edx - 0x1a7a]
inc word [esi]
test al, al
je 0x4f3902
mov eax, dword [ebp + 8]
push eax
xor eax, eax
call fcn.004f34d4
pop ecx
movzx eax, word [esi]
xor edx, edx
mov ecx, dword [ebp + 8]
mov dword [ecx - 0x1120], eax
mov dword [ecx - 0x111c], edx
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a7a], 0x106
jae 0x4f391a
mov eax, dword [ebp + 8]
push eax
call fcn.004f2ed4
pop ecx
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a7a], 0
jne 0x4f366b
mov eax, dword [ebp + 8]
push eax
mov eax, 1
call fcn.004f34d4
pop ecx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret