Function at 0x140004740
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
test r8d, r8d
js 0x140004c9f
mov r15, rcx
movzx r10d, word [rdx + 2]
xor eax, eax
test r10w, r10w
sete al
mov ebp, 0x8a
mov ecx, 7
cmove ecx, ebp
mov esi, 4
sub esi, eax
add r8d, 1
xor r11d, r11d
mov ebx, 0xffffffff
xor r12d, r12d
nop word [rax + rax]
mov r14d, r10d
movzx r10d, word [rdx + r11*4 + 6]
add r11, 1
lea ebp, [r12 + 1]
cmp ebp, ecx
jge 0x1400047c0
cmp r14d, r10d
jne 0x1400047c0
mov r14d, ebx
jmp 0x140004c90
cmp ebp, esi
jge 0x140004880
mov r9d, r14d
mov ecx, dword [r15 + 0x1714]
not r12d
nop word cs:[rax + rax]
nop
movzx ebp, word [r15 + r9*4 + 0xaa6]
mov edi, 0x10
sub edi, ebp
movzx eax, word [r15 + r9*4 + 0xaa4]
mov ebx, eax
shl ebx, cl
or bx, word [r15 + 0x1710]
mov word [r15 + 0x1710], bx
cmp ecx, edi
jle 0x140004860
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], bl
movzx ecx, byte [r15 + 0x1711]
mov rsi, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea ebx, [rdi + 1]
mov dword [r15 + 0x28], ebx
mov byte [rsi + rdi], cl
mov esi, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, sil
shr eax, cl
mov word [r15 + 0x1710], ax
lea ecx, [rsi + rbp]
add ecx, 0xfffffff0
jmp 0x140004862
add ecx, ebp
mov dword [r15 + 0x1714], ecx
inc r12d
jne 0x1400047e0
jmp 0x140004c67
test r14d, r14d
je 0x14000489d
cmp r14d, ebx
jne 0x140004934
mov r9d, dword [r15 + 0x1714]
mov r12d, ebp
jmp 0x140004a5d
cmp ebp, 0xa
jg 0x1400049c5
movzx ebp, word [r15 + 0xaea]
mov r9d, dword [r15 + 0x1714]
mov eax, 0x10
sub eax, ebp
movzx ebx, word [r15 + 0xae8]
mov esi, ebx
mov ecx, r9d
shl esi, cl
or si, word [r15 + 0x1710]
mov word [r15 + 0x1710], si
cmp r9d, eax
jle 0x140004b5d
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea edi, [rcx + 1]
mov dword [r15 + 0x28], edi
mov byte [rax + rcx], sil
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], al
mov eax, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, al
shr ebx, cl
mov word [r15 + 0x1710], bx
lea r9d, [rax + rbp]
add r9d, 0xfffffff0
mov esi, ebx
jmp 0x140004b60
mov eax, r14d
movzx esi, word [r15 + rax*4 + 0xaa6]
mov r9d, dword [r15 + 0x1714]
mov edi, 0x10
sub edi, esi
movzx ebx, word [r15 + rax*4 + 0xaa4]
mov ebp, ebx
mov ecx, r9d
shl ebp, cl
or bp, word [r15 + 0x1710]
mov word [r15 + 0x1710], bp
cmp r9d, edi
jle 0x140004a53
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea edi, [rcx + 1]
mov dword [r15 + 0x28], edi
mov byte [rax + rcx], bpl
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea edi, [rbp + 1]
mov dword [r15 + 0x28], edi
mov byte [rcx + rbp], al
mov eax, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, al
shr ebx, cl
mov word [r15 + 0x1710], bx
lea r9d, [rsi + rax]
add r9d, 0xfffffff0
jmp 0x140004a56
movzx ebp, word [r15 + 0xaee]
mov r9d, dword [r15 + 0x1714]
mov eax, 0x10
sub eax, ebp
movzx ebx, word [r15 + 0xaec]
mov esi, ebx
mov ecx, r9d
shl esi, cl
or si, word [r15 + 0x1710]
mov word [r15 + 0x1710], si
cmp r9d, eax
jle 0x140004bd8
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea edi, [rcx + 1]
mov dword [r15 + 0x28], edi
mov byte [rax + rcx], sil
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], al
mov eax, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, al
shr ebx, cl
mov word [r15 + 0x1710], bx
lea r9d, [rax + rbp]
add r9d, 0xfffffff0
mov esi, ebx
jmp 0x140004bdb
add r9d, esi
mov dword [r15 + 0x1714], r9d
movzx ebx, word [r15 + 0xae6]
mov eax, 0x10
sub eax, ebx
movzx ebp, word [r15 + 0xae4]
mov esi, ebp
mov ecx, r9d
shl esi, cl
or si, word [r15 + 0x1710]
mov word [r15 + 0x1710], si
cmp r9d, eax
jle 0x140004add
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea edi, [rcx + 1]
mov dword [r15 + 0x28], edi
mov byte [rax + rcx], sil
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], al
mov eax, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, al
shr ebp, cl
mov word [r15 + 0x1710], bp
lea r9d, [rbx + rax]
add r9d, 0xfffffff0
mov esi, ebp
jmp 0x140004ae0
add r9d, ebx
add r12d, 0xfffd
movzx edi, r12w
mov eax, edi
mov ecx, r9d
shl eax, cl
mov dword [r15 + 0x1714], r9d
or esi, eax
mov word [r15 + 0x1710], si
cmp r9d, 0xf
jl 0x140004b54
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea ebp, [rcx + 1]
mov dword [r15 + 0x28], ebp
mov byte [rax + rcx], sil
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea ebx, [rbp + 1]
mov dword [r15 + 0x28], ebx
mov byte [rcx + rbp], al
mov r9d, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, r9b
shr edi, cl
mov word [r15 + 0x1710], di
add r9d, 0xfffffff2
jmp 0x140004c60
add r9d, 2
jmp 0x140004c60
add r9d, ebp
add r12d, 0xfffe
movzx edi, r12w
mov eax, edi
mov ecx, r9d
shl eax, cl
mov dword [r15 + 0x1714], r9d
or esi, eax
mov word [r15 + 0x1710], si
cmp r9d, 0xe
jl 0x140004c4c
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea ebp, [rcx + 1]
mov dword [r15 + 0x28], ebp
mov byte [rax + rcx], sil
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea ebx, [rbp + 1]
mov dword [r15 + 0x28], ebx
mov byte [rcx + rbp], al
mov r9d, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, r9b
shr edi, cl
mov word [r15 + 0x1710], di
add r9d, 0xfffffff3
jmp 0x140004c60
add r9d, ebp
add r12d, 0xfff6
movzx edi, r12w
mov eax, edi
mov ecx, r9d
shl eax, cl
mov dword [r15 + 0x1714], r9d
or esi, eax
mov word [r15 + 0x1710], si
cmp r9d, 0xa
jl 0x140004c52
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea ebp, [rcx + 1]
mov dword [r15 + 0x28], ebp
mov byte [rax + rcx], sil
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea ebx, [rbp + 1]
mov dword [r15 + 0x28], ebx
mov byte [rcx + rbp], al
mov r9d, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, r9b
shr edi, cl
mov word [r15 + 0x1710], di
add r9d, 0xfffffff7
jmp 0x140004c60
add r9d, 3
jmp 0x140004c60
add r9d, 7
nop word cs:[rax + rax]
mov dword [r15 + 0x1714], r9d
xor ebp, ebp
test r10w, r10w
je 0x140004c83
xor ecx, ecx
cmp r14d, r10d
sete cl
mov esi, 4
sub esi, ecx
xor ecx, 7
jmp 0x140004c90
mov ecx, 0x8a
mov esi, 3
nop dword [rax]
mov ebx, r14d
mov r12d, ebp
cmp r11, r8
jne 0x140004790
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret