Function at 0x1801db9f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rsi
push r15
sub rsp, 0x158
mov rax, qword [rcx]
mov r15, r9
mov rsi, rcx
mov dword [rax + 8], 0
call fcn.1801dac00
mov rdx, qword [rsi]
test eax, eax
jne 0x1801dba40
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.1801da2b0
xor eax, eax
add rsp, 0x158
pop r15
pop rsi
ret
movsxd rax, dword [rdx + 8]
mov qword [rsp + 0x138], r12
mov qword [rsp + 0x128], r14
mov r14d, 1
cmp eax, 3
jne 0x1801dba80
cmp dword [rsi + 0x4850], eax
je 0x1801dba79
cmp dword [rsi + 0x484c], 0
jne 0x1801dba80
cmp dword [rsi + 0x4848], 0
jne 0x1801dba80
mov qword [rsp + 0x30], r14
jmp 0x1801dba89
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x150], rbx
xorps xmm0, xmm0
mov qword [rsp + 0x148], rbp
xorps xmm1, xmm1
mov qword [rsp + 0x140], rdi
mov r12, rax
mov rcx, rdx
movdqu xmmword [rsp + 0x38], xmm0
movdqu xmmword [rsp + 0x48], xmm1
test eax, eax
jle 0x1801dbba7
xor ebp, ebp
lea rbx, [rsp + 0x78]
lea rdi, [rsi + 0x46a4]
nop
mov rax, qword [rsi]
mov ecx, dword [rax]
add ecx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x44], rax
test rax, rax
je 0x1801dbc07
mov eax, dword [rsi + 0x4688]
cdq
mov dword [rbx + 0x10], 0
idiv dword [rdi]
mov r8d, eax
mov dword [rbx], eax
mov eax, dword [rsi + 0x468c]
cdq
idiv dword [rdi + 4]
xor edx, edx
mov ecx, eax
mov dword [rbx + 4], eax
sar ecx, 1
mov r9d, eax
mov dword [rbx + 0xc], ecx
mov rcx, qword [rsi]
mov eax, dword [rcx]
mov rcx, qword [rdi + 0x2c]
dec eax
add eax, r8d
mov qword [rbx - 8], rcx
div r8d
mov qword [rbx - 0x10], rcx
mov dword [rbx + 8], eax
cmp r8d, r14d
jne 0x1801dbb5a
cmp r9d, r14d
jne 0x1801dbb48
lea rax, [0x1801daf80]
jmp 0x1801dbb89
mov r8d, r14d
cmp r9d, 2
jne 0x1801dbb6e
lea rax, [0x1801daf90]
jmp 0x1801dbb89
cmp r8d, 2
jne 0x1801dbb82
cmp r9d, r14d
jne 0x1801dbb6e
lea rax, [0x1801db1d0]
jmp 0x1801dbb89
cmp r8d, 2
jne 0x1801dbb82
cmp r9d, r8d
jne 0x1801dbb82
mov rax, qword [rsi + 0x4880]
jmp 0x1801dbb89
lea rax, [0x1801db560]
mov qword [rbx - 0x18], rax
inc rbp
add rbx, 0x30
add rdi, 0x60
cmp rbp, r12
jl 0x1801dbad0
mov rdx, qword [rsi]
mov rcx, rdx
mov r8d, dword [rdx]
mov r9d, dword [rdx + 4]
test r8d, r8d
js 0x1801dbc12
je 0x1801dbbc3
mov eax, 0x7fffffff
cdq
idiv r8d
cmp eax, 4
jl 0x1801dbc12
lea r10d, [r8*4]
mov rdx, rcx
test r10d, r10d
js 0x1801dbc0f
test r9d, r9d
js 0x1801dbc0f
je 0x1801dbbe8
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r10d, eax
jg 0x1801dbc12
imul r8d, r9d
lea eax, [r8*4]
inc eax
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, qword [rsi]
mov rbp, rax
jmp 0x1801dbc14
mov rax, qword [rsi]
mov edx, dword [rax + 8]
jmp 0x1801dbc24
mov rcx, rdx
xor ebp, ebp
mov qword [rsp + 0x170], rbp
test rbp, rbp
jne 0x1801dbc59
mov edx, dword [rcx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.1801da2b0
mov edx, dword [0x18067c038]
mov rax, qword gs:[0x58]
mov ecx, reloc.WS2_32.dll_recv
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
mov qword [rcx + rax], rdx
xor eax, eax
jmp 0x1801dbfe1
xor edx, edx
mov dword [rsp + 0x190], edx
cmp dword [rcx + 4], edx
jbe 0x1801dbf9a
mov r15, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov r14, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
mov qword [rsp + 0x130], r13
nop word [rax + rax]
mov r13d, dword [rcx]
imul r13d, edx
shl r13d, 2
add r13, rbp
xor ebp, ebp
test r12, r12
jle 0x1801dbd5a
lea rdi, [rsi + 0x46c0]
lea rbx, [rsp + 0x84]
nop dword [rax + rax]
mov r15d, dword [rbx - 8]
mov eax, r15d
mov r14d, dword [rbx]
sar eax, 1
cmp r14d, eax
jl 0x1801dbcd7
mov r8, qword [rbx - 0x1c]
jmp 0x1801dbcdb
mov r8, qword [rbx - 0x14]
jl 0x1801dbce3
mov rdx, qword [rbx - 0x14]
jmp 0x1801dbce7
mov rdx, qword [rbx - 0x1c]
mov eax, dword [rbx - 0xc]
mov r9d, dword [rbx - 4]
mov rcx, qword [rdi + 0x28]
mov dword [rsp + 0x20], eax
call qword [rbx - 0x24]
mov qword [rsp + rbp*8 + 0x38], rax
lea eax, [r14 + 1]
mov dword [rbx], eax
cmp eax, r15d
jl 0x1801dbd2c
inc dword [rbx + 4]
mov eax, dword [rbx + 4]
mov rcx, qword [rbx - 0x14]
mov dword [rbx], 0
mov qword [rbx - 0x1c], rcx
cmp eax, dword [rdi]
jge 0x1801dbd2c
movsxd rax, dword [rdi + 4]
add rax, rcx
mov qword [rbx - 0x14], rax
inc rbp
add rbx, 0x30
add rdi, 0x60
cmp rbp, r12
jl 0x1801dbcc0
mov rcx, qword [rsi]
mov r15, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov r14, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x190]
mov eax, dword [rcx + 8]
cmp eax, 3
jne 0x1801dbdd5
cmp qword [rsp + 0x30], 0
je 0x1801dbdb0
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x1801dbf67
lea rdx, [r13 + 2]
nop word [rax + rax]
movzx eax, byte [r8 + rbx]
mov byte [rdx - 2], al
lea rdx, [rdx + 4]
movzx eax, byte [r8 + r14]
mov byte [rdx - 5], al
movzx eax, byte [r8 + rdi]
inc r8d
mov byte [rdx - 4], al
mov byte [rdx - 3], 0xff
mov rax, qword [rsi]
cmp r8d, dword [rax]
jb 0x1801dbd80
jmp 0x1801dbf60
mov eax, dword [rcx]
mov r9, rdi
mov rcx, r13
mov dword [rsp + 0x28], 4
mov r8, r14
mov dword [rsp + 0x20], eax
mov rdx, rbx
call qword [rsi + 0x4878]
jmp 0x1801dbf60
cmp eax, 4
jne 0x1801dbf25
mov eax, dword [rsi + 0x484c]
test eax, eax
jne 0x1801dbe6c
xor r10d, r10d
cmp dword [rcx], r10d
jbe 0x1801dbf67
lea r9, [r13 + 2]
nop dword [rax]
movzx r8d, byte [r10 + r15]
lea r9, [r9 + 4]
movzx ecx, byte [r10 + rbx]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 6], al
movzx ecx, byte [r10 + r14]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 5], al
movzx ecx, byte [r10 + rdi]
inc r10d
mov byte [r9 - 3], 0xff
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 4], al
mov rax, qword [rsi]
cmp r10d, dword [rax]
jb 0x1801dbe00
jmp 0x1801dbf60
mov edx, dword [rcx]
mov r9, rdi
mov r10, qword [rsi + 0x4878]
mov r8, r14
mov dword [rsp + 0x28], 4
mov rcx, r13
mov dword [rsp + 0x20], edx
mov rdx, rbx
cmp eax, 2
jne 0x1801dbf20
call r10
mov rax, qword [rsi]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1801dbf60
lea r8, [r13 + 2]
nop dword [rax]
movzx edx, byte [r9 + r15]
inc r9d
movzx eax, byte [r8 - 2]
lea r8, [r8 + 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 6], al
movzx eax, byte [r8 - 5]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 5], al
movzx eax, byte [r8 - 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 4], al
mov rax, qword [rsi]
cmp r9d, dword [rax]
jb 0x1801dbeb0
jmp 0x1801dbf60
call r10
jmp 0x1801dbf60
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x1801dbf67
lea rdx, [r13 + 1]
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8 + rbx]
inc r8d
mov byte [rdx + 1], cl
mov byte [rdx], cl
mov byte [rdx - 1], cl
mov byte [rdx + 2], 0xff
lea rdx, [rdx + 4]
mov rax, qword [rsi]
cmp r8d, dword [rax]
jb 0x1801dbf40
mov edx, dword [rsp + 0x190]
mov rcx, qword [rsi]
inc edx
mov rbp, qword [rsp + 0x170]
mov dword [rsp + 0x190], edx
cmp edx, dword [rcx + 4]
jb 0x1801dbc90
mov r15, qword [rsp + 0x188]
mov r14d, 1
mov r13, qword [rsp + 0x130]
mov edx, dword [rcx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.1801da2b0
mov rax, qword [rsi]
mov ecx, dword [rax]
mov rax, qword [rsp + 0x178]
mov dword [rax], ecx
mov rax, qword [rsi]
mov ecx, dword [rax + 4]
mov rax, qword [rsp + 0x180]
mov dword [rax], ecx
test r15, r15
je 0x1801dbfde
mov rax, qword [rsi]
mov ecx, 3
cmp dword [rax + 8], ecx
cmovge r14d, ecx
mov dword [r15], r14d
mov rax, rbp
mov rbp, qword [rsp + 0x148]
mov rdi, qword [rsp + 0x140]
mov rbx, qword [rsp + 0x150]
mov r12, qword [rsp + 0x138]
mov r14, qword [rsp + 0x128]
add rsp, 0x158
pop r15
pop rsi
ret