Function at 0x497500
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov rcx, qword gs:[0x28]
mov rcx, qword [rcx]
lea rax, [rsp - 0xb0]
nop dword [rax + rax]
cmp rax, qword [rcx + 0x10]
jbe 0x497ac6
sub rsp, 0x130
mov qword [rsp + 0x128], rbp
lea rbp, [rsp + 0x128]
mov rdx, qword [rsp + 0x138]
movzx ebx, byte [rdx + 0x17]
and ebx, 0x1f
cmp rbx, 0x14
jne 0x497a75
cmp qword [rdx + 0x40], 0
nop
je 0x497a5d
mov rbx, qword [rsp + 0x140]
movzx esi, byte [rbx + 0x17]
and esi, 0x1f
cmp rsi, 0x14
jne 0x49763f
xor eax, eax
xor ecx, ecx
jmp 0x4972c4
mov rsi, qword [rsp + 0x40]
lea rax, [rsi + 1]
mov rsi, qword [rsp + 0x140]
mov rbx, rsi
mov rcx, rdx
mov rdx, qword [rsp + 0x138]
cmp qword [rbx + 0x40], rax
jle 0x497627
mov rsi, qword [rdx + 0x38]
mov rdi, qword [rdx + 0x40]
cmp rdi, rcx
jbe 0x497aba
mov qword [rsp + 0x40], rax
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0x50], rcx
mov eax, dword [rsi + rcx*8]
mov qword [rsp], rdx
mov dword [rsp + 8], eax
nop dword [rax]
call fcn.00467b20
mov rax, qword [rsp + 0x140]
mov rcx, qword [rax + 0x38]
mov rdx, qword [rax + 0x40]
mov rbx, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x40]
nop
cmp rsi, rdx
jae 0x497aaf
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0x90], rcx
mov edx, dword [rcx + rsi*8]
mov qword [rsp], rax
mov dword [rsp + 8], edx
call fcn.00467b20
mov rax, qword [rsp + 0x10]
xorps xmm0, xmm0
movups xmmword [rsp + 0x118], xmm0
test rax, rax
je 0x49737a
lea rdx, [rax + 3]
mov qword [rsp + 0x118], rdx
movzx edx, word [rax + 1]
rol dx, 8
mov qword [rsp + 0x120], rdx
movups xmmword [rsp + 0xd8], xmm0
mov rdx, qword [rsp + 0x98]
test rdx, rdx
je 0x4973ab
lea rbx, [rdx + 3]
mov qword [rsp + 0xd8], rbx
movzx ebx, word [rdx + 1]
rol bx, 8
mov qword [rsp + 0xe0], rbx
mov qword [rsp + 0x88], rax
mov rbx, qword [rsp + 0x120]
mov rsi, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0x118]
cmp qword [rsp + 0xe0], rbx
je 0x49756d
xor ecx, ecx
nop dword [rax + rax]
test cl, cl
je 0x49755b
movzx ebx, byte [rdx]
test bl, 1
je 0x497422
mov rdx, qword [rsp + 0x50]
inc rdx
mov rbx, qword [rsp + 0x138]
cmp qword [rbx + 0x40], rdx
jg 0x4972a5
mov byte [rsp + 0x148], 1
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov qword [rsp], rdx
call fcn.00492700
mov rax, qword [rsp + 0x10]
mov rcx, qword [rsp + 8]
test rax, rax
jne 0x497553
mov rax, qword [rsp + 0x138]
mov rcx, qword [rax + 0x30]
xorps xmm0, xmm0
movups xmmword [rsp + 0xe8], xmm0
test rcx, rcx
je 0x497476
lea rdx, [rcx + 3]
mov qword [rsp + 0xe8], rdx
movzx ecx, word [rcx + 1]
rol cx, 8
mov qword [rsp + 0xf0], rcx
mov rcx, qword [rsp + 0xe8]
mov rdx, qword [rsp + 0xf0]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x30], rdx
mov rax, qword [rsp + 0x88]
mov qword [rsp], rax
nop dword [rax]
call fcn.00492700
mov rax, qword [rsp + 0x10]
mov rcx, qword [rsp + 8]
test rax, rax
jne 0x497549
mov rdx, qword [rsp + 0x140]
mov rbx, qword [rdx + 0x30]
xorps xmm0, xmm0
movups xmmword [rsp + 0xb8], xmm0
test rbx, rbx
je 0x4974f0
lea rsi, [rbx + 3]
mov qword [rsp + 0xb8], rsi
movzx ebx, word [rbx + 1]
rol bx, 8
mov qword [rsp + 0xc0], rbx
mov rcx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0xc0]
mov rbx, qword [rsp + 0x30]
cmp rbx, rax
je 0x49751c
mov rbx, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x50]
jmp 0x4972a5
mov rax, qword [rsp + 0x70]
mov qword [rsp], rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rbx
call fcn.004029e0
cmp byte [rsp + 0x18], 0
jne 0x4973f0
mov rdx, qword [rsp + 0x140]
jmp 0x49750a
mov rdx, qword [rsp + 0x140]
jmp 0x497500
mov rdx, rax
jmp 0x497486
mov rbx, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x50]
jmp 0x4972a5
mov qword [rsp], rdi
mov qword [rsp + 8], rsi
mov qword [rsp + 0x10], rbx
nop dword [rax + rax]
call fcn.004029e0
cmp byte [rsp + 0x18], 0
jne 0x4975a6
mov rax, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x98]
xorps xmm0, xmm0
xor ecx, ecx
jmp 0x4973e0
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x90]
mov ecx, dword [rcx + rax*8 + 4]
mov rdx, qword [rsp + 0x140]
mov qword [rsp], rdx
mov dword [rsp + 8], ecx
call fcn.00467b80
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0xa0]
mov ecx, dword [rcx + rax*8 + 4]
mov rdx, qword [rsp + 0x10]
mov qword [rsp + 0x80], rdx
mov rbx, qword [rsp + 0x138]
mov qword [rsp], rbx
mov dword [rsp + 8], ecx
call fcn.00467b80
mov rax, qword [rsp + 0x80]
cmp qword [rsp + 0x10], rax
sete cl
mov rax, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x98]
xorps xmm0, xmm0
jmp 0x4973e0
mov byte [rsp + 0x148], 0
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov qword [rsp], rbx
call fcn.00492c40
mov rax, qword [rsp + 8]
test rax, rax
je 0x497a45
movzx edx, word [rax + 4]
nop word [rax + rax]
test dx, dx
jne 0x497a28
xor ecx, ecx
xor edx, edx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x78], rax
mov rbx, qword [rsp + 0x138]
xor esi, esi
xor edi, edi
jmp 0x4976a5
mov r8, qword [rsp + 0x48]
lea rsi, [r8 + 1]
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x28]
mov rdi, rdx
mov rdx, qword [rsp + 0x60]
movzx r8d, word [rax + 4]
cmp r8, rsi
jle 0x497a10
mov r8, qword [rbx + 0x38]
mov r9, qword [rbx + 0x40]
nop dword [rax + rax]
cmp r9, rdi
jbe 0x497a95
mov qword [rsp + 0xa0], r8
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x58], rdi
mov eax, dword [r8 + rdi*8]
mov qword [rsp], rbx
mov dword [rsp + 8], eax
call fcn.00467b20
mov rax, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x48]
nop dword [rax + rax]
cmp rcx, rdx
jbe 0x497a8d
mov qword [rsp + 0x98], rax
shl rdx, 4
mov rcx, qword [rsp + 0x60]
mov ebx, dword [rcx + rdx]
mov edx, dword [rcx + rdx + 4]
mov dword [rsp + 0x24], edx
nop
mov rsi, qword [rsp + 0x140]
mov qword [rsp], rsi
mov dword [rsp + 8], ebx
call fcn.00467b20
mov rax, qword [rsp + 0x10]
xorps xmm0, xmm0
movups xmmword [rsp + 0xc8], xmm0
test rax, rax
je 0x49776c
lea rdx, [rax + 3]
mov qword [rsp + 0xc8], rdx
movzx edx, word [rax + 1]
rol dx, 8
mov qword [rsp + 0xd0], rdx
movups xmmword [rsp + 0x108], xmm0
mov rdx, qword [rsp + 0x98]
nop dword [rax]
test rdx, rdx
je 0x4977a1
lea rbx, [rdx + 3]
mov qword [rsp + 0x108], rbx
movzx ebx, word [rdx + 1]
rol bx, 8
mov qword [rsp + 0x110], rbx
mov qword [rsp + 0x88], rax
mov rbx, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xc8]
mov rdi, qword [rsp + 0x108]
cmp qword [rsp + 0x110], rbx
je 0x497967
xor ecx, ecx
test cl, cl
je 0x497955
movzx ebx, byte [rdx]
nop dword [rax]
test bl, 1
je 0x497817
mov rdx, qword [rsp + 0x58]
inc rdx
mov rbx, qword [rsp + 0x138]
cmp qword [rbx + 0x40], rdx
jg 0x49768a
mov byte [rsp + 0x148], 1
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov qword [rsp], rdx
nop dword [rax + rax]
call fcn.00492700
mov rax, qword [rsp + 0x10]
mov rcx, qword [rsp + 8]
test rax, rax
jne 0x49794d
mov rax, qword [rsp + 0x138]
mov rcx, qword [rax + 0x30]
xorps xmm0, xmm0
movups xmmword [rsp + 0xa8], xmm0
test rcx, rcx
je 0x497870
lea rdx, [rcx + 3]
mov qword [rsp + 0xa8], rdx
movzx ecx, word [rcx + 1]
rol cx, 8
mov qword [rsp + 0xb0], rcx
mov rcx, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0xb0]
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x38], rdx
mov rax, qword [rsp + 0x88]
mov qword [rsp], rax
call fcn.00492700
mov rax, qword [rsp + 0x10]
mov rcx, qword [rsp + 8]
test rax, rax
je 0x4978eb
mov rdx, qword [rsp + 0x38]
cmp rax, rdx
je 0x4978c6
mov rbx, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x58]
jmp 0x49768a
mov rax, qword [rsp + 0x68]
mov qword [rsp], rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
call fcn.004029e0
cmp byte [rsp + 0x18], 0
jne 0x4977e5
jmp 0x4978b4
mov rax, qword [rsp + 0x78]
mov ecx, dword [rax]
mov rdx, qword [rsp + 0x140]
mov qword [rsp], rdx
mov dword [rsp + 8], ecx
call fcn.00467b20
mov rax, qword [rsp + 0x10]
xorps xmm0, xmm0
movups xmmword [rsp + 0xf8], xmm0
test rax, rax
je 0x497938
lea rdx, [rax + 3]
mov qword [rsp + 0xf8], rdx
movzx edx, word [rax + 1]
rol dx, 8
mov qword [rsp + 0x100], rdx
mov rcx, qword [rsp + 0xf8]
mov rax, qword [rsp + 0x100]
jmp 0x4978aa
mov rdx, rax
jmp 0x497880
mov rbx, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x58]
jmp 0x49768a
mov qword [rsp], rsi
mov qword [rsp + 8], rdi
mov qword [rsp + 0x10], rbx
call fcn.004029e0
cmp byte [rsp + 0x18], 0
nop
jne 0x49799c
mov rax, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x98]
xorps xmm0, xmm0
xor ecx, ecx
jmp 0x4977d1
mov rax, qword [rsp + 0x140]
mov qword [rsp], rax
mov ecx, dword [rsp + 0x24]
mov dword [rsp + 8], ecx
call fcn.00467b80
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xa0]
mov ecx, dword [rcx + rax*8 + 4]
mov rdx, qword [rsp + 0x10]
mov qword [rsp + 0x80], rdx
mov rbx, qword [rsp + 0x138]
mov qword [rsp], rbx
mov dword [rsp + 8], ecx
call fcn.00467b80
mov rax, qword [rsp + 0x80]
cmp qword [rsp + 0x10], rax
sete cl
mov rax, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x98]
xorps xmm0, xmm0
jmp 0x4977d1
mov byte [rsp + 0x148], 0
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov esi, dword [rax + 8]
add rsi, rax
cmp rdx, 0x10000
ja 0x497aa5
mov ecx, edx
mov rdx, rsi
nop dword [rax]
jmp 0x49766d
mov byte [rsp + 0x148], 0
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov byte [rsp + 0x148], 1
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov byte [rsp + 0x148], 0
mov rbp, qword [rsp + 0x128]
add rsp, 0x130
ret
mov rax, rdx
call fcn.0046caa0
mov rax, rdi
mov rcx, r9
nop dword [rax + rax]
call fcn.0046caa0
mov ebx, 0x10000
call fcn.0046cba0
mov rax, rsi
mov rcx, rdx
call fcn.0046caa0
mov rax, rcx
mov rcx, rdi
call fcn.0046caa0
nop
call fcn.0046a8c0
jmp fcn.00497220