Function at 0x18000d550
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov rbx, rcx
mov rbp, qword [rsp + 0xe0]
test rbp, rbp
je 0x18000d1c7
mov dword [rbp], 0
xor edi, edi
test rbx, rbx
je 0x18000d502
test rdx, rdx
je 0x18000d240
mov rsi, qword [rbx + 0x68]
test rsi, rsi
je 0x18000d240
test byte [rsi + 0x61], 8
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x24], r9d
mov qword [rsp + 0x30], r8
jne 0x18000d230
cmp dword [rbx + 0x14], 1
jne 0x18000d230
test r8, r8
jne 0x18000d230
mov eax, r9d
and eax, 0x300
jne 0x18000d230
cmp qword [rsi + 0x48], 0
je 0x18000d515
mov rcx, rbx
mov r8, rbp
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x18000d550
mov rcx, rdx
call fcn.180085750
cmp rax, 0xffff
jbe 0x18000d24c
mov dword [rbx + 0x1c], 0x18
jmp 0x18000d502
mov r15, rax
mov r10, qword [rsp + 0x30]
test r10, r10
je 0x18000d287
mov rcx, r10
call fcn.180085750
mov r10, qword [rsp + 0x30]
mov r8, rax
cmp rax, 0xffff
mov rcx, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x24]
jbe 0x18000d294
mov dword [rbx + 0x1c], 0x18
jmp 0x18000d500
xor r8d, r8d
mov rcx, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x24]
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x58], rbx
mov eax, dword [rbx + 0x10]
mov qword [rsp + 0x70], rax
test rax, rax
je 0x18000d4f4
mov rax, qword [rsi]
mov rdx, qword [rsi + 0x20]
mov qword [rsp + 0x68], rdx
lea rdx, [rax + 0x2e]
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x40], rax
add rax, 0x2d
mov qword [rsp + 0x60], rax
xor r12d, r12d
mov qword [rsp + 0x48], r8
jmp 0x18000d30f
mov rcx, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x24]
or r11d, 4
cmp r11d, 4
jne 0x18000d4ed
nop word cs:[rax + rax]
nop
add r12, 1
cmp r12, qword [rsp + 0x70]
jae 0x18000d4f4
mov rax, qword [rsp + 0x68]
mov esi, dword [rax + r12*4]
mov rax, qword [rsp + 0x40]
movzx r13d, word [rax + rsi + 0x1c]
cmp r15, r13
ja 0x18000d300
mov rax, qword [rsp + 0x40]
lea r14, [rax + rsi]
add r14, 0x2e
test r8, r8
je 0x18000d3e0
mov rax, qword [rsp + 0x40]
add rax, rsi
movzx edx, word [rax + 0x20]
cmp r8, rdx
jne 0x18000d300
movzx r11d, word [rax + 0x1e]
test r9d, 0x100
jne 0x18000d3a7
test dx, dx
je 0x18000d3e0
add r11, rsi
add r11, r13
add r11, qword [rsp + 0x50]
xor eax, eax
nop
movsx edx, byte [r10 + rax]
lea edi, [rdx - 0x41]
lea ebx, [rdx + 0x20]
cmp dil, 0x1a
cmovae ebx, edx
movsx edx, byte [r11 + rax]
lea edi, [rdx - 0x41]
lea ebp, [rdx + 0x20]
cmp dil, 0x1a
cmovae ebp, edx
cmp ebx, ebp
jne 0x18000d300
add rax, 1
cmp r8, rax
jne 0x18000d370
jmp 0x18000d3e0
lea rdx, [r14 + r13]
add rdx, r11
mov rcx, r10
call fcn.180072bc0
mov r8, qword [rsp + 0x48]
mov r10, qword [rsp + 0x30]
mov r9d, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x28]
mov r11d, 4
test eax, eax
jne 0x18000d2e6
nop dword [rax + rax]
test r9d, 0x200
je 0x18000d44e
test r13w, r13w
je 0x18000d44e
add rsi, qword [rsp + 0x60]
mov rax, r13
movabs rbp, 0x200000000801
jmp 0x18000d41e
add rax, 0xffffffffffffffff
lea rdx, [rax + 1]
cmp rdx, 1
jle 0x18000d438
movzx edx, byte [rsi + rax]
add dl, 0xd1
cmp dl, 0x2d
ja 0x18000d410
movzx edx, dl
bt rbp, rdx
jae 0x18000d410
add eax, 0xffffffff
jmp 0x18000d43d
mov eax, 0xffffffff
cdqe
add r14, rax
add r14, 1
not eax
add eax, r13d
mov r13d, eax
mov eax, r13d
cmp r15, rax
jne 0x18000d300
test r9d, 0x100
jne 0x18000d4a6
mov r11d, 1
test r13d, r13d
je 0x18000d4c4
xor eax, eax
movsx edx, byte [rcx + rax]
lea ebp, [rdx - 0x41]
lea ebx, [rdx + 0x20]
cmp bpl, 0x1a
cmovae ebx, edx
movsx edx, byte [r14 + rax]
lea ebp, [rdx - 0x41]
lea edi, [rdx + 0x20]
cmp bpl, 0x1a
cmovae edi, edx
cmp ebx, edi
jne 0x18000d300
add rax, 1
cmp r15, rax
jne 0x18000d470
jmp 0x18000d4c4
mov rdx, r14
mov r8, r15
call fcn.180072bc0
mov r8, qword [rsp + 0x48]
mov r10, qword [rsp + 0x30]
xor r11d, r11d
test eax, eax
sete r11b
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x18000d2dc
test r11d, r11d
mov rcx, qword [rsp + 0x28]
mov r9d, dword [rsp + 0x24]
je 0x18000d2e6
mov rax, qword [rsp + 0x38]
mov dword [rax], r12d
mov edi, 1
jmp 0x18000d502
mov rax, qword [rsp + 0x58]
mov dword [rax + 0x1c], 0x1c
xor edi, edi
mov eax, edi
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rdx
mov r14, rdx
call fcn.180085750
cmp rax, 0x10000
jae 0x18000d240
mov r15, rax
xor r8d, r8d
mov rcx, r14
mov r9d, dword [rsp + 0x24]
mov r10, qword [rsp + 0x30]
jmp 0x18000d294
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rsi, r8
mov rbx, rcx
mov rdi, qword [rcx + 0x68]
mov rax, qword [rdi + 0x40]
mov qword [rsp + 0x40], rax
mov r12d, dword [rcx + 0x10]
mov qword [rsp + 0x38], rdx
mov rcx, rdx
call fcn.180085750
test rsi, rsi
je 0x18000d58f
mov dword [rsi], 0
test r12d, r12d
je 0x18000d686
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rsi
add r12, 0xffffffffffffffff
mov r10, qword [rdi]
mov r8, qword [rdi + 0x20]
xor r13d, r13d
mov rdi, r12
sub rdi, r13
sar rdi, 1
add rdi, r13
mov ecx, edi
mov rdx, qword [rsp + 0x40]
mov r9d, dword [rdx + rcx*4]
mov ecx, dword [r8 + r9*4]
lea rdx, [r10 + rcx]
movzx esi, word [r10 + rcx + 0x1c]
add rcx, r10
add rcx, 0x2e
mov r11d, esi
sub r11d, eax
cmovae esi, eax
add rdx, rsi
add rdx, 0x2e
test esi, esi
je 0x18000d650
mov rbp, qword [rsp + 0x38]
nop word cs:[rax + rax]
nop
movzx esi, byte [rcx]
lea ebx, [rsi - 0x41]
lea r14d, [rsi + 0x20]
cmp bl, 0x1a
cmovae r14d, esi
movzx esi, byte [rbp]
lea ebx, [rsi - 0x41]
lea r15d, [rsi + 0x20]
cmp bl, 0x1a
cmovae r15d, esi
mov ebx, r15d
xor bl, r14b
jne 0x18000d638
add rcx, 1
add rbp, 1
cmp rcx, rdx
jb 0x18000d600
movzx ebp, r14b
movzx esi, r15b
jmp 0x18000d654
xor ebp, ebp
xor esi, esi
sub ebp, esi
cmp rcx, rdx
cmove ebp, r11d
test ebp, ebp
je 0x18000d691
lea rcx, [rdi + 1]
add rdi, 0xffffffffffffffff
test ebp, ebp
cmovns r12, rdi
cmovs r13, rcx
cmp r12, r13
jge 0x18000d5b0
mov rbx, qword [rsp + 0x28]
test rbx, rbx
je 0x18000d68d
mov dword [rbx + 0x1c], 0x1c
xor eax, eax
jmp 0x18000d6a3
mov eax, 1
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x18000d6a3
mov dword [rcx], r9d
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret