Function at 0x4a0f70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6a6090
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x76f950]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x77ae44]
or esi, 0xffffffff
mov eax, dword [0x77ae48]
push 1
mov ecx, dword [eax]
lea edx, [ebp - 0xd]
push edx
push eax
call dword [ecx + 4]
add esp, 0xc
cmp eax, 1
jne 0x4a121e
movsx eax, byte [ebp - 0xd]
test eax, eax
je 0x4a121e
cmp eax, 1
jne 0x4a1001
mov eax, dword [0x77ae48]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [ecx + 4]
add esp, 0xc
cmp dword [ebp - 0x1c], 0x204001c
je 0x4a0fa1
mov eax, dword [0x789dd8]
mov ecx, dword [0x789dd4]
test eax, eax
cmovne ecx, eax
call fcn.00452890
cmp eax, 2
jne 0x4a1105
mov eax, dword [0x77ae48]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x20]
push edx
push eax
call dword [ecx + 4]
add esp, 0xc
mov dword [ebp - 0x44], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x40], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0x3c], 0
mov byte [ebp - 4], 2
mov dword [ebp - 0x38], 1
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x44]
call fcn.0049f360
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x14]
xor eax, eax
movsx ecx, byte [edx]
add eax, ecx
imul eax, eax, 0x401
mov ecx, eax
shr ecx, 6
xor eax, ecx
inc edx
lea ecx, [ebp - 0x10]
cmp edx, ecx
jb 0x4a1063
lea eax, [eax + eax*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
imul ecx, ecx, 0x8001
test ecx, ecx
lea eax, [ebp - 0x44]
push eax
cmove ecx, esi
push ecx
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call fcn.004a1e70
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x4a10c0
mov eax, dword [ecx]
test eax, eax
jne 0x4a10bd
call fcn.004df580
jmp 0x4a10c0
dec eax
mov dword [ecx], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x4a10db
mov eax, dword [ecx]
test eax, eax
jne 0x4a10d8
call fcn.004df580
jmp 0x4a10db
dec eax
mov dword [ecx], eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x4a0fa1
mov eax, dword [ecx]
test eax, eax
jne 0x4a10fd
call fcn.004df580
jmp 0x4a0fa1
dec eax
mov dword [ecx], eax
jmp 0x4a0fa1
cmp eax, 3
jne 0x4a112d
mov eax, dword [0x77ae48]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x24]
push edx
push eax
call dword [ecx + 4]
add esp, 0xc
mov ecx, ebx
push dword [ebp - 0x24]
call fcn.0049f780
jmp 0x4a0fa1
cmp eax, 4
jne 0x4a118f
mov eax, dword [0x77ae48]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x28]
push edx
push eax
call dword [ecx + 4]
add esp, 0xc
lea ecx, [ebp - 0x18]
call fcn.0049f160
mov dword [ebp - 4], 7
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
mov ecx, ebx
call fcn.0049f650
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4a0fa1
mov ecx, dword [eax]
test ecx, ecx
jne 0x4a1187
mov ecx, eax
call fcn.004df580
jmp 0x4a0fa1
dec ecx
mov dword [eax], ecx
jmp 0x4a0fa1
cmp eax, 5
jne 0x4a1209
mov eax, dword [0x77ae48]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x2c]
push edx
push eax
call dword [ecx + 4]
mov eax, dword [0x77ae48]
mov esi, dword [ebp - 0x2c]
mov ecx, dword [eax]
add esp, 0xc
lea edx, [ebp - 0x30]
push 4
push edx
push eax
call dword [ecx + 4]
mov eax, dword [0x77ae48]
mov edi, dword [ebp - 0x30]
mov ecx, dword [eax]
add esp, 0xc
lea edx, [ebp - 0x34]
push 4
push edx
push eax
call dword [ecx + 4]
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
mov dword [ebp - 0x14], esi
call fcn.004a1cf0
mov esi, 0xffffffff
test eax, eax
je 0x4a0fa1
mov ecx, dword [ebp - 0x34]
mov edx, edi
not edx
and edx, dword [eax + 0xc]
and ecx, edi
or edx, ecx
mov dword [eax + 0xc], edx
or esi, esi
jmp 0x4a0fa1
mov eax, dword [0x789d38]
mov ecx, dword [0x789d34]
test eax, eax
cmovne ecx, eax
call fcn.00452890
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret