Function at 0x795740
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
sub rsp, 0xd8
mov rbp, rsp
mov qword [rbp + 0x28], rbp
mov qword [rbp + 0xf0], rcx
mov qword [rbp + 0xf8], rdx
mov qword [rbp + 0x100], r8
mov qword [rbp + 0x108], r9
mov rax, qword [rbp + 0x110]
mov qword [rbp + 0x110], rax
mov rax, qword [rbp + 0xf0]
mov rcx, qword [rbp + 0xf0]
movzx ecx, word [rcx + 0xe]
mov eax, dword [rax + 4]
imul eax, ecx
mov ecx, eax
call fcn.007951b0
mov dword [rbp + 0x9c], eax
mov eax, dword [rbp + 0x9c]
add eax, 0x19800
mov dword [rbp + 0x7c], eax
movsxd rcx, dword [rbp + 0x7c]
call fcn.004092a0
mov qword [rbp + 0xc0], rax
nop
mov rax, qword [rbp + 0xf0]
mov rcx, qword [rbp + 0xf0]
mov eax, dword [rax + 4]
imul eax, dword [rcx + 8]
add eax, eax
movsxd rcx, eax
call fcn.004092a0
mov qword [rbp + 0xc8], rax
nop
mov rax, qword [rbp + 0xc0]
mov qword [rbp + 0x58], rax
mov rax, qword [rbp + 0xc0]
lea rax, [rax + 0x10000]
mov qword [rbp + 0x60], rax
mov rax, qword [rbp + 0xc0]
lea rax, [rax + 0x11800]
mov qword [rbp + 0xa8], rax
mov dword [rbp + 0x90], 0
movsxd rax, dword [rbp + 0x90]
mov rcx, qword [rbp + 0x58]
mov rdx, rax
add rdx, rdx
mov r8d, dword [rbp + 0x90]
shr r8d, 8
mov byte [rcx + rdx*8], r8b
mov rcx, qword [rbp + 0x58]
mov rdx, rax
add rdx, rdx
mov r8d, dword [rbp + 0x90]
shr r8d, 4
and r8b, 0xf
mov byte [rcx + rdx*8 + 1], r8b
mov rcx, qword [rbp + 0x58]
mov rdx, rax
add rdx, rdx
movzx r8, byte [rbp + 0x90]
and r8b, 0xf
mov byte [rcx + rdx*8 + 2], r8b
mov rcx, qword [rbp + 0x58]
add rax, rax
mov dword [rcx + rax*8 + 4], 0
add dword [rbp + 0x90], 1
cmp dword [rbp + 0x90], 0x1000
jne 0x795821
nop
mov rax, qword [rbp + 0xc8]
mov qword [rbp + 0x68], rax
xor eax, eax
mov rcx, qword [rbp + 0xf0]
mov ebx, dword [rcx + 8]
sub ebx, 1
mov dword [rbp + 0x90], eax
cmp dword [rbp + 0x90], ebx
jg 0x7959d8
sub ebx, eax
add ebx, 1
mov rax, qword [rbp + 0xf8]
mov rcx, qword [rbp + 0xf0]
mov ecx, dword [rcx + 8]
sub ecx, dword [rbp + 0x90]
sub ecx, 1
imul ecx, dword [rbp + 0x9c]
movsxd rcx, ecx
lea rcx, [rax + rcx]
mov rdx, qword [rbp + 0xa8]
movsxd r8, dword [rbp + 0x9c]
call fcn.00409ac0
mov rax, qword [rbp + 0xa8]
mov qword [rbp + 0xb0], rax
xor eax, eax
mov rcx, qword [rbp + 0xf0]
mov ecx, dword [rcx + 4]
sub ecx, 1
mov dword [rbp + 0x8c], eax
cmp dword [rbp + 0x8c], ecx
jg 0x7959c5
sub ecx, eax
add ecx, 1
mov rax, qword [rbp + 0xb0]
movzx rax, byte [rax + 2]
and al, 0xf0
movzx ax, al
shl eax, 4
mov rdx, qword [rbp + 0xb0]
movzx rdx, byte [rdx + 1]
and dl, 0xf0
movzx dx, dl
add ax, dx
mov rdx, qword [rbp + 0xb0]
movzx rdx, byte [rdx]
and dl, 0xf0
movzx rdx, dl
shr edx, 4
add ax, dx
mov word [rbp + 0x8a], ax
mov rax, qword [rbp + 0x58]
movzx rdx, word [rbp + 0x8a]
add rdx, rdx
lea rax, [rax + rdx*8 + 4]
add dword [rax], 1
add qword [rbp + 0xb0], 3
mov rax, qword [rbp + 0x68]
movzx rdx, word [rbp + 0x8a]
mov word [rax], dx
add qword [rbp + 0x68], 2
sub ecx, 1
test ecx, ecx
jne 0x79593d
nop
add dword [rbp + 0x90], 1
sub ebx, 1
test ebx, ebx
jne 0x7958ce
nop
mov dword [rbp + 0x90], 0
movsxd rax, dword [rbp + 0x90]
mov rcx, qword [rbp + 0x60]
mov rdx, rax
lea rdx, [rdx + rdx*2]
mov qword [rcx + rdx*8 + 0x10], 0
mov rcx, qword [rbp + 0x60]
mov rdx, rax
lea rdx, [rdx + rdx*2]
mov dword [rcx + rdx*8 + 0xc], 0
mov rcx, qword [rbp + 0x60]
lea rax, [rax + rax*2]
mov dword [rcx + rax*8 + 8], 0
mov dword [rbp + 0x8c], 0
movsxd rax, dword [rbp + 0x90]
movsxd rcx, dword [rbp + 0x8c]
mov rdx, qword [rbp + 0x60]
mov r8, rax
lea r8, [r8 + r8*2]
lea rdx, [rdx + r8*8]
mov byte [rdx + rcx], 0
mov rdx, qword [rbp + 0x60]
lea rax, [rax + rax*2]
lea rdx, [rdx + rax*8 + 3]
mov byte [rdx + rcx], 0xff
add dword [rbp + 0x8c], 1
cmp dword [rbp + 0x8c], 3
jne 0x795a2b
nop
add dword [rbp + 0x90], 1
cmp dword [rbp + 0x90], 0x100
jne 0x7959e3
nop
mov dword [rbp + 0x90], 0
cmp dword [rbp + 0x90], 0x1000
jge 0x795ac4
mov rax, qword [rbp + 0x58]
movsxd rcx, dword [rbp + 0x90]
add rcx, rcx
cmp dword [rax + rcx*8 + 4], 0
jg 0x795ac4
add dword [rbp + 0x90], 1
cmp dword [rbp + 0x90], 0x1000
jl 0x795a9c
nop
mov rax, qword [rbp + 0x58]
movsxd rcx, dword [rbp + 0x90]
add rcx, rcx
lea rax, [rax + rcx*8]
mov qword [rbp + 0x50], rax
mov rax, qword [rbp + 0x60]
mov rcx, qword [rbp + 0x58]
movsxd rdx, dword [rbp + 0x90]
add rdx, rdx
lea rcx, [rcx + rdx*8]
mov qword [rax + 0x10], rcx
mov dword [rbp + 0x80], 1
add dword [rbp + 0x90], 1
cmp dword [rbp + 0x90], 0x1000
jge 0x795b69
movsxd rax, dword [rbp + 0x90]
mov rcx, qword [rbp + 0x58]
mov rdx, rax
add rdx, rdx
cmp dword [rcx + rdx*8 + 4], 0
jle 0x795b56
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rbp + 0x58]
mov r8, rax
add r8, r8
lea rdx, [rdx + r8*8]
mov qword [rcx + 8], rdx
mov rcx, qword [rbp + 0x58]
add rax, rax
lea rax, [rcx + rax*8]
mov qword [rbp + 0x50], rax
add dword [rbp + 0x80], 1
add dword [rbp + 0x90], 1
cmp dword [rbp + 0x90], 0x1000
jl 0x795b12
nop
mov rax, qword [rbp + 0x50]
mov qword [rax + 8], 0
mov rax, qword [rbp + 0x60]
mov ecx, dword [rbp + 0x80]
mov dword [rax + 8], ecx
mov rax, qword [rbp + 0x60]
mov rcx, qword [rbp + 0xf0]
mov rdx, qword [rbp + 0xf0]
mov ecx, dword [rcx + 4]
imul ecx, dword [rdx + 8]
mov dword [rax + 0xc], ecx
mov dword [rbp + 0x84], 1
mov rcx, qword [rbp + 0x60]
mov rax, qword [rbp + 0x108]
mov edx, dword [rax]
lea r8, [rbp + 0x84]
mov rax, qword [rbp + 0xc0]
movsxd r9, dword [rbp + 0x9c]
lea r9, [rax + r9 + 0x11800]
call fcn.00795380
mov rax, qword [rbp + 0x108]
mov ecx, dword [rbp + 0x84]
cmp ecx, dword [rax]
jge 0x795c42
mov eax, dword [rbp + 0x84]
mov rcx, qword [rbp + 0x108]
mov ebx, dword [rcx]
sub ebx, 1
mov dword [rbp + 0x90], eax
cmp dword [rbp + 0x90], ebx
jg 0x795c41
sub ebx, eax
add ebx, 1
mov rax, qword [rbp + 0x110]
movsxd rcx, dword [rbp + 0x90]
lea rax, [rax + rcx*4]
mov qword [rbp + 0x38], rax
mov rcx, qword [rbp + 0x38]
mov edx, 4
xor r8, r8
call fcn.0040cff0
add qword [rbp + 0x38], 4
sub ebx, 1
test ebx, ebx
jne 0x795c24
nop
xor eax, eax
mov ebx, dword [rbp + 0x84]
sub ebx, 1
mov dword [rbp + 0x90], eax
cmp dword [rbp + 0x90], ebx
jg 0x795da4
sub ebx, eax
add ebx, 1
mov rax, qword [rbp + 0x110]
mov qword [rbp + 0x38], rax
movsxd rax, dword [rbp + 0x90]
mov rcx, qword [rbp + 0x60]
mov rdx, rax
lea rdx, [rdx + rdx*2]
mov ecx, dword [rcx + rdx*8 + 8]
mov dword [rbp + 0x8c], ecx
cmp dword [rbp + 0x8c], 0
jle 0x795d8d
mov rcx, qword [rbp + 0x60]
lea rax, [rax + rax*2]
mov rax, qword [rcx + rax*8 + 0x10]
mov qword [rbp + 0x50], rax
mov dword [rbp + 0x78], 0
mov dword [rbp + 0x74], 0
mov dword [rbp + 0x70], 0
cmp qword [rbp + 0x50], 0
je 0x795d0a
mov rax, qword [rbp + 0x50]
movzx rcx, byte [rbp + 0x90]
mov byte [rax + 3], cl
mov rax, qword [rbp + 0x50]
movzx rax, byte [rax]
add dword [rbp + 0x78], eax
mov rax, qword [rbp + 0x50]
movzx rax, byte [rax + 1]
add dword [rbp + 0x74], eax
mov rax, qword [rbp + 0x50]
movzx rax, byte [rax + 2]
add dword [rbp + 0x70], eax
mov rax, qword [rbp + 0x50]
mov rax, qword [rax + 8]
mov qword [rbp + 0x50], rax
cmp qword [rbp + 0x50], 0
jne 0x795cc5
nop
mov rax, qword [rbp + 0x38]
mov qword [rbp + 0x40], rax
mov rcx, qword [rbp + 0x40]
mov eax, dword [rbp + 0x78]
shl eax, 4
or eax, 0xf
cdq
idiv dword [rbp + 0x8c]
mov byte [rcx + 2], al
mov rcx, qword [rbp + 0x40]
mov eax, dword [rbp + 0x74]
shl eax, 4
or eax, 0xf
cdq
idiv dword [rbp + 0x8c]
mov byte [rcx + 1], al
mov rcx, qword [rbp + 0x40]
mov eax, dword [rbp + 0x70]
shl eax, 4
or eax, 0xf
cdq
idiv dword [rbp + 0x8c]
mov byte [rcx], al
mov rax, qword [rbp + 0x40]
mov byte [rax + 3], 0
mov rax, qword [rbp + 0x40]
cmp byte [rax + 2], 0x10
ja 0x795d8d
mov rax, qword [rbp + 0x40]
cmp byte [rax + 1], 0x10
ja 0x795d8d
mov rax, qword [rbp + 0x40]
cmp byte [rax], 0x10
ja 0x795d8d
mov rcx, qword [rbp + 0x38]
mov edx, 4
xor r8, r8
call fcn.0040cff0
add dword [rbp + 0x90], 1
add qword [rbp + 0x38], 4
sub ebx, 1
test ebx, ebx
jne 0x795c6f
nop
mov rax, qword [rbp + 0xf0]
mov eax, dword [rax + 4]
add eax, eax
mov dword [rbp + 0x98], eax
mov rax, qword [rbp + 0xf0]
mov ecx, dword [rax + 4]
shl ecx, 3
call fcn.007951b0
mov dword [rbp + 0x94], eax
mov rcx, qword [rbp + 0x100]
mov rax, qword [rbp + 0xf0]
mov edx, dword [rbp + 0x94]
imul edx, dword [rax + 8]
movsxd rdx, edx
xor r8, r8
call fcn.0040cff0
xor eax, eax
mov rcx, qword [rbp + 0xf0]
mov ecx, dword [rcx + 8]
sub ecx, 1
mov dword [rbp + 0x90], eax
cmp dword [rbp + 0x90], ecx
jg 0x795ed7
sub ecx, eax
add ecx, 1
mov rax, qword [rbp + 0xc8]
mov rdx, qword [rbp + 0xf0]
mov edx, dword [rdx + 8]
sub edx, dword [rbp + 0x90]
sub edx, 1
imul edx, dword [rbp + 0x98]
movsxd rdx, edx
lea rax, [rax + rdx]
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0x100]
mov edx, dword [rbp + 0x90]
imul edx, dword [rbp + 0x94]
movsxd rdx, edx
lea rax, [rax + rdx]
mov qword [rbp + 0xa0], rax
xor eax, eax
mov rdx, qword [rbp + 0xf0]
mov edx, dword [rdx + 4]
sub edx, 1
mov dword [rbp + 0x8c], eax
cmp dword [rbp + 0x8c], edx
jg 0x795ec4
sub edx, eax
add edx, 1
mov rax, qword [rbp + 0xa0]
mov r8, qword [rbp + 0x58]
mov r9, qword [rbp + 0xa8]
movzx r9, word [r9]
add r9, r9
movzx r8, byte [r8 + r9*8 + 3]
mov byte [rax], r8b
add qword [rbp + 0xa8], 2
add qword [rbp + 0xa0], 1
sub edx, 1
test edx, edx
jne 0x795e8b
nop
add dword [rbp + 0x90], 1
sub ecx, 1
test ecx, ecx
jne 0x795e18
nop
nop
mov rcx, qword [rbp + 0xc8]
call fcn.00409300
nop
mov rcx, qword [rbp + 0xc0]
call fcn.00409300
mov rax, qword [rbp + 0x108]
mov ecx, dword [rbp + 0x84]
mov dword [rax], ecx
mov dword [rbp + 0xbc], 0
mov eax, dword [rbp + 0xbc]
lea rsp, [rbp + 0xd8]
pop rbx
pop rbp
ret