Function at 0x498ec0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6a5038
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x7ad930]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x7b8a10]
or esi, 0xffffffff
mov eax, dword [0x7b8a14]
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 0x49912f
movsx eax, byte [ebp - 0xd]
test eax, eax
je 0x49912f
cmp eax, 1
jne 0x498f51
mov eax, dword [0x7b8a14]
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 0x498ef1
mov eax, dword [0x7c7998]
mov ecx, dword [0x7c7994]
test eax, eax
cmovne ecx, eax
call fcn.0044eb40
cmp eax, 2
jne 0x499006
mov eax, dword [0x7b8a14]
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.00497330
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 0x498fb3
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.00499e30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00499150
jmp 0x498ef1
cmp eax, 3
jne 0x49903e
mov eax, dword [0x7b8a14]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x24]
push edx
push eax
call dword [ecx + 4]
mov eax, dword [ebp - 0x24]
add esp, 0xc
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
call fcn.0049a340
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, ebx
call fcn.00499f30
jmp 0x498ef1
cmp eax, 4
jne 0x4990a0
mov eax, dword [0x7b8a14]
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.00497240
mov dword [ebp - 4], 4
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x28]
mov ecx, ebx
call fcn.004975c0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x498ef1
mov ecx, dword [eax]
test ecx, ecx
jne 0x499098
mov ecx, eax
call fcn.004d6b90
jmp 0x498ef1
dec ecx
mov dword [eax], ecx
jmp 0x498ef1
cmp eax, 5
jne 0x49911a
mov eax, dword [0x7b8a14]
push 4
mov ecx, dword [eax]
lea edx, [ebp - 0x2c]
push edx
push eax
call dword [ecx + 4]
mov eax, dword [0x7b8a14]
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 [0x7b8a14]
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.00499cb0
mov esi, 0xffffffff
test eax, eax
je 0x498ef1
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 0x498ef1
mov eax, dword [0x7c78f8]
mov ecx, dword [0x7c78f4]
test eax, eax
cmovne ecx, eax
call fcn.0044eb40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret