Function at 0x140076990
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rdi
push r12
push r13
push r15
sub rsp, 0x70
mov r13d, r8d
mov r15d, r8d
shr r15d, 1
or r13d, 1
xor eax, eax
mov dword [rsp + 0xb0], r15d
mov rbx, r9
mov r12, rdx
mov rdi, rcx
cmp r13d, 1
je 0x1400770ee
mov edx, dword [rdx + 4]
mov rcx, qword [rcx + 8]
mov dword [rsp + 0x48], edx
inc edx
mov qword [rsp + 0x40], rax
lea eax, [r13 + 1]
imul edx, eax
mov r8, qword [rcx]
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x4c], r13d
shl edx, 2
call qword [r8 + 8]
mov qword [rsp + 0x30], rax
mov rsi, rax
test rax, rax
jne 0x140076a1f
lea eax, [rsi - 3]
mov rsi, qword [rsp + 0x68]
add rsp, 0x70
pop r15
pop r13
pop r12
pop rdi
pop rbx
ret
mov qword [rsp + 0xb8], rbp
lea r8, [rsp + 0x40]
mov r9, rsi
mov qword [rsp + 0x60], r14
mov rdx, r12
mov rcx, rdi
call fcn.14008af10
mov edi, dword [r12 + 4]
lea edx, [r15 + 1]
mov rcx, qword [r12 + 0x18]
mov ebp, edx
mov r11, qword [rbx + 0x18]
mov r8d, r15d
mov dword [rsp + 0x28], edx
lea eax, [rdi + 1]
imul eax, edx
lea r10, [rsi + rax*4]
test r15d, r15d
je 0x140076c36
lea rdx, [rdx*4]
lea r9, [rdx + rsi]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], r9
lea r15, [r13*4]
nop dword [rax + rax]
mov edi, dword [rsp + 0x28]
dec r8d
mov esi, dword [rsi]
mov rbx, r9
sub esi, dword [r10]
mov r14d, dword [rsp + 0xb0]
imul edi, ebp
add r10, rdx
mov dword [rsp + 0x24], r8d
mov eax, dword [r10]
xor edx, edx
sub eax, dword [rbx]
dec r14d
movzx r9d, byte [r11]
add eax, esi
div edi
mov edx, 0xff
inc r11
movzx r8d, al
sub edx, r9d
movzx eax, byte [rcx]
add r10, 4
imul eax, edx
add rbx, 4
imul r8d, r9d
add edi, ebp
add eax, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test r14d, r14d
jg 0x140076ab2
mov edi, dword [r12 + 4]
mov r8d, ebp
sub edi, r13d
imul r8d, r13d
sub rbx, r15
sub r10, r15
inc edi
xor edx, edx
mov eax, 0x100000
div r8d
mov esi, eax
nop dword [rax]
nop word [rax + rax]
movzx r9d, byte [r11]
mov edx, 0xff
mov eax, dword [r15 + r10]
sub edx, r9d
sub eax, dword [r15 + rbx]
mov r12, rbx
sub eax, dword [r10]
mov r14, r10
add eax, dword [rbx]
inc r11
imul eax, esi
add r10, 4
add rbx, 4
dec edi
shr eax, 0x14
movzx r8d, al
movzx eax, byte [rcx]
imul eax, edx
imul r8d, r9d
add r8d, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test edi, edi
jg 0x140076b30
mov r14d, dword [r14 + r15]
lea eax, [r13 - 1]
sub r14d, dword [r12 + r15]
mov edi, ebp
mov esi, dword [rsp + 0xb0]
imul edi, eax
mov eax, dword [rbx]
lea rbx, [rbx + 4]
sub eax, dword [r10]
lea r10, [r10 + 4]
movzx r9d, byte [r11]
add eax, r14d
xor edx, edx
dec esi
div edi
mov edx, 0xff
inc r11
movzx r8d, al
sub edx, r9d
movzx eax, byte [rcx]
sub edi, ebp
imul eax, edx
imul r8d, r9d
add eax, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test esi, esi
jg 0x140076ba1
mov r8d, dword [rsp + 0x24]
mov edx, r13d
mov r12, qword [rsp + 0xa8]
sub edx, r8d
mov rsi, qword [rsp + 0x30]
inc ebp
mov r9, qword [rsp + 0x38]
mov edi, dword [r12 + 4]
lea eax, [rdi + 1]
imul edx, eax
lea r10, [rsi + rdx*4]
mov rdx, qword [rsp + 0x40]
test r8d, r8d
jg 0x140076a90
mov r15d, dword [rsp + 0xb0]
mov edx, dword [rsp + 0x28]
lea eax, [rdi + 1]
mov r9d, edx
imul eax, r13d
lea r14, [r13*4]
mov ebp, edx
shl r9, 2
xor edx, edx
imul ebp, r13d
mov r8d, r13d
mov qword [rsp + 0x40], r9
imul r8d, r13d
xor r12d, r12d
mov dword [rsp + 0x20], r12d
mov r10, rsi
mov dword [rsp + 0x38], ebp
lea rbx, [rsi + rax*4]
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax + 8]
sub eax, r13d
inc eax
mov dword [rsp + 0x24], eax
mov eax, 0x200000
div r8d
inc eax
shr eax, 1
mov dword [rsp + 0x50], eax
lea eax, [r13 - 1]
imul eax, r13d
mov dword [rsp + 0x54], eax
jmp 0x140076cb5
mov r9, qword [rsp + 0x40]
mov esi, r15d
mov dword [rsp + 0x58], r12d
mov r15d, dword [r10]
add r10, r9
sub r15d, dword [rbx]
add rbx, r9
cmp dword [rsp + 0xb0], 0
jbe 0x140076d2c
mov eax, dword [rbx]
xor edx, edx
sub eax, dword [r10]
dec esi
movzx r9d, byte [r11]
add eax, r15d
div ebp
mov edx, 0xff
inc r11
movzx r8d, al
sub edx, r9d
movzx eax, byte [rcx]
add rbx, 4
imul eax, edx
add r10, 4
imul r8d, r9d
add ebp, r13d
add eax, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test esi, esi
jg 0x140076cd3
mov rax, qword [rsp + 0xa8]
mov edi, dword [rax + 4]
mov r12d, dword [rsp + 0x50]
sub rbx, r14
sub r10, r14
sub edi, r13d
inc edi
nop dword [rax]
movzx r9d, byte [r11]
mov edx, 0xff
mov eax, dword [r14 + rbx]
sub edx, r9d
sub eax, dword [r14 + r10]
mov rsi, r10
sub eax, dword [rbx]
mov rbp, rbx
add eax, dword [r10]
inc r11
imul eax, r12d
add r10, 4
add rbx, 4
dec edi
shr eax, 0x14
movzx r8d, al
movzx eax, byte [rcx]
imul eax, edx
imul r8d, r9d
add r8d, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test edi, edi
jg 0x140076d40
mov r15d, dword [rsp + 0xb0]
mov edi, r15d
mov ebp, dword [r14 + rbp]
sub ebp, dword [r14 + rsi]
mov esi, dword [rsp + 0x54]
mov r12d, dword [rsp + 0x20]
test r15d, r15d
je 0x140076e0d
nop dword [rax + rax]
mov eax, dword [r10]
xor edx, edx
sub eax, dword [rbx]
dec edi
movzx r9d, byte [r11]
add eax, ebp
div esi
mov edx, 0xff
inc r11
movzx r8d, al
sub edx, r9d
movzx eax, byte [rcx]
sub esi, r13d
imul eax, edx
add r10, 4
imul r8d, r9d
add rbx, 4
add eax, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test edi, edi
jg 0x140076dc0
mov rsi, qword [rsp + 0xa8]
mov edi, dword [rsi + 4]
mov edx, edi
sub edx, r15d
dec edx
shl rdx, 2
sub r10, rdx
sub rbx, rdx
mov edx, dword [rsp + 0x24]
cmp edx, 1
jle 0x140076e81
mov eax, edi
xor r9d, r9d
imul eax, r15d
mov r8d, edi
add rcx, rax
test edi, edi
je 0x140076e77
nop word [rax + rax]
movzx eax, byte [rcx]
lea r10, [r10 + 4]
mov edx, dword [rbx]
lea rbx, [rbx + 4]
add r9d, eax
inc rcx
add edx, r9d
mov dword [r10 - 4], edx
sub r8d, 1
jne 0x140076e50
mov edi, dword [rsi + 4]
mov edx, dword [rsp + 0x24]
lea eax, [r15 + 1]
imul eax, edi
sub rcx, rax
inc r12d
lea r9d, [rdi + 1]
mov dword [rsp + 0x20], r12d
mov eax, r9d
cmp r12d, r13d
jbe 0x140076eab
mov r10, qword [rsp + 0x30]
xor r12d, r12d
mov dword [rsp + 0x20], r12d
mov r8, r10
imul eax, r13d
jmp 0x140076ec0
mov r8, qword [rsp + 0x30]
imul eax, r12d
lea r10, [r8 + rax*4]
mov eax, r9d
imul eax, dword [rsp + 0x58]
mov ebp, dword [rsp + 0x38]
lea rbx, [r8 + rax*4]
dec edx
mov dword [rsp + 0x24], edx
test edx, edx
jg 0x140076cb0
xor edx, edx
lea eax, [r13 - 1]
add eax, r12d
lea r8d, [r13 + 1]
div r8d
lea esi, [r13 - 1]
imul edx, r9d
mov eax, edx
mov rdx, qword [rsp + 0x30]
lea rbx, [rdx + rax*4]
mov eax, r15d
test r15d, r15d
je 0x1400770c2
nop word [rax + rax]
mov edi, dword [rsp + 0x28]
mov ebp, r15d
mov r15d, dword [r10]
dec eax
sub r15d, dword [rbx]
add rbx, qword [rsp + 0x40]
imul edi, esi
add r10, qword [rsp + 0x40]
mov dword [rsp + 0x38], eax
mov eax, dword [rbx]
xor edx, edx
sub eax, dword [r10]
add rbx, 4
movzx r9d, byte [r11]
add eax, r15d
div edi
mov edx, 0xff
inc r11
movzx r8d, al
sub edx, r9d
movzx eax, byte [rcx]
add edi, esi
imul eax, edx
add r10, 4
imul r8d, r9d
dec ebp
add eax, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test ebp, ebp
jg 0x140076f30
mov rax, qword [rsp + 0xa8]
mov r8d, esi
imul r8d, r13d
sub rbx, r14
sub r10, r14
xor edx, edx
mov edi, dword [rax + 4]
mov eax, 0x100000
sub edi, r13d
inc edi
div r8d
mov ebp, eax
nop word [rax + rax]
movzx r9d, byte [r11]
mov edx, 0xff
mov eax, dword [r14 + rbx]
sub edx, r9d
sub eax, dword [r14 + r10]
mov r12, r10
sub eax, dword [rbx]
mov r15, rbx
add eax, dword [r10]
inc r11
imul eax, ebp
add rbx, 4
add r10, 4
dec edi
shr eax, 0x14
movzx r8d, al
movzx eax, byte [rcx]
imul eax, edx
imul r8d, r9d
add r8d, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test edi, edi
jg 0x140076fb0
mov r15d, dword [r15 + r14]
lea edi, [r13 - 1]
sub r15d, dword [r12 + r14]
mov ebp, dword [rsp + 0xb0]
imul edi, esi
nop
mov eax, dword [r10]
lea r10, [r10 + 4]
sub eax, dword [rbx]
lea rbx, [rbx + 4]
movzx r9d, byte [r11]
add eax, r15d
xor edx, edx
dec ebp
div edi
mov edx, 0xff
inc r11
movzx r8d, al
sub edx, r9d
movzx eax, byte [rcx]
sub edi, esi
imul eax, edx
imul r8d, r9d
add eax, 0x7f
add eax, r8d
imul edx, eax, 0x101
sar edx, 0x10
mov byte [rcx], dl
inc rcx
test ebp, ebp
jg 0x140077020
mov rax, qword [rsp + 0xa8]
xor r12d, r12d
mov r15d, dword [rsp + 0xb0]
mov r8d, dword [rax + 4]
mov edx, r8d
mov eax, dword [rsp + 0x20]
sub edx, r15d
neg rdx
inc eax
cmp eax, r13d
cmovbe r12d, eax
lea rbx, [rbx + rdx*4]
mov rdx, qword [rsp + 0x30]
lea eax, [r8 + 1]
imul eax, r12d
dec esi
mov dword [rsp + 0x20], r12d
lea r10, [rdx + rax*4]
mov eax, dword [rsp + 0x38]
test eax, eax
jg 0x140076f10
mov rcx, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rcx + 8]
mov r8, qword [rcx]
call qword [r8 + 0x10]
mov r14, qword [rsp + 0x60]
xor eax, eax
mov rbp, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0x68]
add rsp, 0x70
pop r15
pop r13
pop r12
pop rdi
pop rbx
ret