Function at 0x4b0780
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
add esi, 0xffffef02
xor edi, edi
xor ebx, ebx
mov eax, dword [ebp + 8]
mov word [eax - 0x1a6e], 2
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a5a], 0
je 0x4b0a6e
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a5a], 3
jb 0x4b0872
movzx eax, word [esi]
add eax, 3
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb64]
movzx eax, byte [edx + eax - 1]
mov edx, dword [ebp + 8]
mov dx, word [edx - 0x1a6c]
shl edx, 5
xor ax, dx
and ax, 0x7fff
mov edx, dword [ebp + 8]
mov word [edx - 0x1a6c], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a6c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb6c]
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 - 0x410]
mov ecx, dword [ecx + 0xb68]
mov word [ecx + edx*2], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a6c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb6c]
mov di, word [edx + eax*2]
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a6c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb6c]
mov cx, word [esi]
mov word [edx + eax*2], cx
test di, di
je 0x4b08aa
movzx eax, word [esi]
movzx edx, di
sub eax, edx
cmp eax, 0x7efa
jg 0x4b08aa
mov eax, dword [ebp + 8]
push eax
mov eax, edi
call fcn.004b0370
pop ecx
mov ebx, eax
mov eax, dword [ebp + 8]
cmp bx, word [eax - 0x1a5a]
jbe 0x4b08aa
mov eax, dword [ebp + 8]
mov bx, word [eax - 0x1a5a]
cmp bx, 3
jb 0x4b09f5
mov eax, dword [ebp + 8]
push eax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a5e]
sub eax, edx
movzx edx, bx
sub edx, 3
call fcn.004aeefc
pop ecx
mov byte [ebp - 1], al
mov eax, dword [ebp + 8]
sub word [eax - 0x1a5a], bx
mov eax, dword [ebp + 8]
cmp bx, word [eax - 0x1a62]
ja 0x4b0999
dec ebx
inc word [esi]
movzx eax, word [esi]
add eax, 3
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb64]
movzx eax, byte [edx + eax - 1]
mov edx, dword [ebp + 8]
mov dx, word [edx - 0x1a6c]
shl edx, 5
xor ax, dx
and ax, 0x7fff
mov edx, dword [ebp + 8]
mov word [edx - 0x1a6c], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a6c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb6c]
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 - 0x410]
mov ecx, dword [ecx + 0xb68]
mov word [ecx + edx*2], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a6c]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb6c]
mov cx, word [esi]
mov word [edx + eax*2], cx
dec ebx
test bx, bx
jne 0x4b08f1
inc word [esi]
jmp 0x4b0a27
add word [esi], bx
xor ebx, ebx
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb64]
movzx eax, byte [edx + eax]
mov edx, dword [ebp + 8]
mov word [edx - 0x1a6c], ax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb64]
movzx eax, byte [edx + eax + 1]
mov edx, dword [ebp + 8]
mov dx, word [edx - 0x1a6c]
shl edx, 5
xor ax, dx
and ax, 0x7fff
mov edx, dword [ebp + 8]
mov word [edx - 0x1a6c], ax
jmp 0x4b0a27
mov eax, dword [ebp + 8]
push eax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x410]
mov edx, dword [edx + 0xb64]
movzx edx, byte [edx + eax]
xor eax, eax
call fcn.004aeefc
pop ecx
mov byte [ebp - 1], al
mov eax, dword [ebp + 8]
dec word [eax - 0x1a5a]
inc word [esi]
cmp byte [ebp - 1], 0
je 0x4b0a45
mov eax, dword [ebp + 8]
push eax
xor eax, eax
call fcn.004b0644
pop ecx
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov dword [edx - 0x1104], eax
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a5a], 0x106
jae 0x4b0a5d
mov eax, dword [ebp + 8]
push eax
call fcn.004affc8
pop ecx
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a5a], 0
jne 0x4b07b1
mov eax, dword [ebp + 8]
push eax
mov eax, 1
call fcn.004b0644
pop ecx
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret