Function at 0x180212f60
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.180212170
mov rdx, qword [rsi]
test eax, eax
jne 0x180212fb0
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.180211820
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 0x180212ff0
cmp dword [rsi + 0x4850], eax
je 0x180212fe9
cmp dword [rsi + 0x484c], 0
jne 0x180212ff0
cmp dword [rsi + 0x4848], 0
jne 0x180212ff0
mov qword [rsp + 0x30], r14
jmp 0x180212ff9
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 0x180213117
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 0x180213177
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 0x1802130ca
cmp r9d, r14d
jne 0x1802130b8
lea rax, [0x1802124f0]
jmp 0x1802130f9
mov r8d, r14d
cmp r9d, 2
jne 0x1802130de
lea rax, [0x180212500]
jmp 0x1802130f9
cmp r8d, 2
jne 0x1802130f2
cmp r9d, r14d
jne 0x1802130de
lea rax, [0x180212740]
jmp 0x1802130f9
cmp r8d, 2
jne 0x1802130f2
cmp r9d, r8d
jne 0x1802130f2
mov rax, qword [rsi + 0x4880]
jmp 0x1802130f9
lea rax, [0x180212ad0]
mov qword [rbx - 0x18], rax
inc rbp
add rbx, 0x30
add rdi, 0x60
cmp rbp, r12
jl 0x180213040
mov rdx, qword [rsi]
mov rcx, rdx
mov r8d, dword [rdx]
mov r9d, dword [rdx + 4]
test r8d, r8d
js 0x180213182
je 0x180213133
mov eax, 0x7fffffff
cdq
idiv r8d
cmp eax, 4
jl 0x180213182
lea r10d, [r8*4]
mov rdx, rcx
test r10d, r10d
js 0x18021317f
test r9d, r9d
js 0x18021317f
je 0x180213158
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r10d, eax
jg 0x180213182
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 0x180213184
mov rax, qword [rsi]
mov edx, dword [rax + 8]
jmp 0x180213194
mov rcx, rdx
xor ebp, ebp
mov qword [rsp + 0x170], rbp
test rbp, rbp
jne 0x1802131c9
mov edx, dword [rcx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.180211820
mov edx, dword [0x1806d4c38]
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 0x180213551
xor edx, edx
mov dword [rsp + 0x190], edx
cmp dword [rcx + 4], edx
jbe 0x18021350a
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 0x1802132ca
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 0x180213247
mov r8, qword [rbx - 0x1c]
jmp 0x18021324b
mov r8, qword [rbx - 0x14]
jl 0x180213253
mov rdx, qword [rbx - 0x14]
jmp 0x180213257
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 0x18021329c
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 0x18021329c
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 0x180213230
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 0x180213345
cmp qword [rsp + 0x30], 0
je 0x180213320
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x1802134d7
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 0x1802132f0
jmp 0x1802134d0
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 0x1802134d0
cmp eax, 4
jne 0x180213495
mov eax, dword [rsi + 0x484c]
test eax, eax
jne 0x1802133dc
xor r10d, r10d
cmp dword [rcx], r10d
jbe 0x1802134d7
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 0x180213370
jmp 0x1802134d0
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 0x180213490
call r10
mov rax, qword [rsi]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1802134d0
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 0x180213420
jmp 0x1802134d0
call r10
jmp 0x1802134d0
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x1802134d7
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 0x1802134b0
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 0x180213200
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.180211820
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 0x18021354e
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