Function at 0x498a50
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x498db3
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, esi
call fcn.0042c8dc
test al, al
jne 0x498a99
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + 8]
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 9]
mov eax, esi
call fcn.00499178
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 8], 0x10
jne 0x498ab1
mov eax, dword [esi + 0x68]
sar eax, 1
jns 0x498aac
adc eax, 0
mov dword [ebp - 0xc], eax
jmp 0x498ab7
mov eax, dword [esi + 0x68]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x498ac7
mov edx, eax
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edx, dword [ebp - 4]
mov edx, dword [edx]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, esi
call fcn.0042c7f0
mov eax, dword [eax + 0x14]
mov edx, dword [esi + 0x78]
call fcn.00427970
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [ebp - 0x40]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ecx, eax
xor edx, edx
xor eax, eax
call fcn.0041a930
lea eax, [ebp - 0x40]
push eax
mov eax, esi
call fcn.0042c7f0
pop edx
call fcn.00427fd4
mov eax, dword [esi + 0x74]
cmp eax, 0x1fffffff
je 0x498b3d
mov edx, eax
mov eax, esi
call fcn.0042d9e8
mov dl, 1
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edi, eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 8]
imul edi, eax
add edi, 7
test edi, edi
jns 0x498b5a
add edi, 7
sar edi, 3
imul edi, dword [ebp - 0xc]
inc edi
mov eax, edi
call fcn.00408644
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.00408644
mov dword [ebp - 0x14], eax
mov bl, 1
mov eax, dword [ebp - 4]
cmp byte [eax + 0xc], 1
jne 0x498cc1
mov dword [ebp - 0x18], 7
mov eax, 0x49e6b8
mov dword [ebp - 0x24], eax
mov eax, 0x49e6f0
mov dword [ebp - 0x28], eax
mov eax, 0x49e69c
mov dword [ebp - 0x2c], eax
mov edi, 0x49e70c
mov eax, 0x49e6d4
mov dword [ebp - 0x30], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [ebp - 0x24]
cmp eax, dword [edx]
jle 0x498ca2
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [ebp - 0x28]
add eax, dword [edx]
dec eax
mov edx, dword [ebp - 0x24]
sub eax, dword [edx]
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx]
cdq
idiv ecx
mov edx, dword [ebp - 4]
movzx edx, byte [edx + 8]
imul edx, eax
add edx, 7
test edx, edx
jns 0x498bf1
add edx, 7
sar edx, 3
imul edx, dword [ebp - 0xc]
inc edx
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x498c92
xor eax, eax
mov al, bl
mov edx, dword [ebp + eax*4 - 0x14]
mov ecx, dword [ebp - 0x1c]
mov eax, esi
call fcn.00499000
mov edx, ebx
xor dl, 1
and edx, 0x7f
mov edx, dword [ebp + edx*4 - 0x14]
inc edx
push edx
xor eax, eax
mov al, bl
mov eax, dword [ebp + eax*4 - 0x14]
inc eax
push eax
mov edx, dword [esi + 0x68]
push edx
mov edx, dword [ebp - 0x1c]
dec edx
push edx
xor edx, edx
mov dl, bl
mov edx, dword [ebp + edx*4 - 0x14]
inc edx
mov ecx, eax
xor eax, eax
mov al, bl
mov eax, dword [ebp + eax*4 - 0x14]
mov dl, byte [eax]
mov eax, esi
call fcn.004982bc
mov edx, dword [ebp - 8]
mov eax, esi
call fcn.0042c960
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
mov al, byte [edi]
push eax
xor eax, eax
mov al, bl
mov eax, dword [ebp + eax*4 - 0x14]
inc eax
mov dword [ebp - 0x44], eax
lea edx, [ebp - 0x44]
mov eax, dword [esi + 0x40]
xor ecx, ecx
call fcn.0048fe98
xor bl, 1
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
add dword [ebp - 8], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
cmp eax, dword [ebp - 8]
jg 0x498c09
add dword [ebp - 0x30], 4
inc edi
add dword [ebp - 0x2c], 4
add dword [ebp - 0x28], 4
add dword [ebp - 0x24], 4
dec dword [ebp - 0x18]
jne 0x498bb1
jmp 0x498d7c
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x498d7c
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], 0
xor eax, eax
mov al, bl
mov edx, dword [ebp + eax*4 - 0x14]
mov ecx, edi
mov eax, esi
call fcn.00499000
mov edx, ebx
xor dl, 1
and edx, 0x7f
mov edx, dword [ebp + edx*4 - 0x14]
inc edx
push edx
xor eax, eax
mov al, bl
mov eax, dword [ebp + eax*4 - 0x14]
inc eax
push eax
mov edx, dword [esi + 0x68]
push edx
mov edx, edi
dec edx
push edx
xor edx, edx
mov dl, bl
mov edx, dword [ebp + edx*4 - 0x14]
inc edx
mov ecx, eax
xor eax, eax
mov al, bl
mov eax, dword [ebp + eax*4 - 0x14]
mov dl, byte [eax]
mov eax, esi
call fcn.004982bc
mov edx, dword [ebp - 8]
mov eax, esi
call fcn.0042c960
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
push 0xff
xor eax, eax
mov al, bl
mov eax, dword [ebp + eax*4 - 0x14]
inc eax
mov dword [ebp - 0x44], eax
lea edx, [ebp - 0x44]
mov eax, dword [esi + 0x40]
xor ecx, ecx
call fcn.0048fe98
xor bl, 1
inc dword [ebp - 8]
dec dword [ebp - 0x20]
jne 0x498cdc
jmp 0x498d7c
mov eax, esi
call fcn.00498f34
mov eax, esi
call fcn.00498214
mov dword [esi + 0x64], eax
mov edx, dword [0x498dc4]
mov eax, esi
call fcn.004981f8
test al, al
jne 0x498d6b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x498dba
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x498da6
call fcn.004027a4
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x498db2
call fcn.004027a4
ret