Function at 0x18003bcf0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2f0]
sub rsp, 0x3f0
mov rax, qword [0x1800460c8]
xor rax, rsp
mov qword [rbp + 0x2e0], rax
cmp byte [reloc.WS2_32.dll_closesocket], 3
mov r13, rcx
mov dword [rsp + 0x60], edx
jne 0x18003bd40
movsx rax, byte [0x18004603a]
mov dword [rax], 3
jmp 0x18003bd62
movzx eax, word [0x180046038]
movsx edx, byte [reloc.WS2_32.dll_closesocket]
movzx ecx, al
xor cl, 0x36
cmp cl, dl
je 0x18003bd69
movsx rax, byte [0x18004603a]
mov dword [rax], edx
movzx eax, word [0x180046038]
movsx r8d, byte [0x18004603d]
cmp r8b, 5
jne 0x18003bd86
movsx ecx, al
movsx rax, byte [0x18004603a]
mov dword [rax], ecx
jmp 0x18003bdb1
movsx ecx, byte [0x18004603c]
mov edx, r8d
xor edx, ecx
add ecx, 0x20
cmp edx, ecx
je 0x18003bdb9
movsx edx, byte [0x18004603a]
movsx rcx, al
movsx rax, byte [reloc.WS2_32.dll_closesocket]
xor rcx, rax
mov dword [rcx], edx
movzx r8d, byte [0x18004603d]
cmp byte [0x18004c224], 0
je 0x18003bdcb
cmp byte [0x18004c225], 0
jne 0x18003bdd6
movsx rax, byte [0x18004603c]
mov byte [rax], r8b
movzx r11d, byte [0x18004bec8]
movzx r10d, byte [0x18004beca]
movzx r9d, byte [0x18004becb]
lea ecx, [r10 + r11]
cmp r9d, ecx
je 0x18003be19
mov ecx, r10d
and rcx, r9
mov word [rcx], r11w
movzx r9d, byte [0x18004becb]
movzx r10d, byte [0x18004beca]
movzx r11d, byte [0x18004bec8]
movzx r8d, r9b
movzx ecx, r10b
mov eax, r8d
sub eax, ecx
movzx ecx, r11b
cdq
idiv ecx
movzx edx, byte [0x18004bec9]
add eax, r8d
cmp edx, eax
je 0x18003be60
movzx ecx, r11b
movzx eax, r10b
and rcx, rax
mov byte [rcx], dl
movzx r9d, byte [0x18004becb]
movzx r10d, byte [0x18004beca]
movzx r11d, byte [0x18004bec8]
movsx eax, byte [reloc.WS2_32.dll_closesocket]
movzx ecx, r9b
cdq
idiv ecx
movsx ecx, byte [0x180046041]
cmp eax, ecx
je 0x18003be97
movzx ecx, r10b
movzx eax, r9b
and rcx, rax
mov byte [rcx], r11b
movzx r9d, byte [0x18004becb]
movzx r10d, byte [0x18004beca]
movzx r8d, byte [0x18004becc]
movsx eax, byte [reloc.WS2_32.dll_closesocket]
mov r11d, r8d
movzx ecx, r9b
cdq
idiv ecx
mov ecx, r8d
lea r9, [0x180000000]
imul eax, r8d
mov edx, r8d
shl edx, cl
cmp edx, eax
jne 0x18003bed3
test r8b, 0xf6
jne 0x18003bf00
cmp r8b, 9
je 0x18003bf00
mov edx, r11d
imul edx, r11d
lea r8d, [rdx + 1]
shl r8b, cl
mov ecx, edx
imul ecx, r11d
shl edx, cl
movsxd rax, edx
mov byte [rax + r9 + 0x46044], r8b
movsx rax, r8b
mov byte [rax + r9 + 0x4bec8], r10b
xor r14d, r14d
mov r15d, r14d
nop word [rax + rax]
cmp byte [r15 + r9 + 0x4b5d8], r14b
jne 0x18003c165
mov rax, qword [0x180046048]
inc byte [rax + 6]
mov rsi, qword [0x180046048]
movsx edi, byte [rsi + 6]
movsx r8d, byte [rsi + 3]
movsx r10d, byte [rsi + 2]
movsx ecx, byte [rsi + 9]
movsx r9d, byte [rsi + 1]
movsx ebx, byte [rsi + 8]
lea eax, [rdi + r10]
imul eax, ecx
cdqe
movsx rdx, byte [rax + rsi]
mov eax, r9d
imul eax, ecx
movzx r11d, byte [rdx + rsi]
cdqe
movsx rcx, byte [rax + rsi]
mov eax, r8d
imul eax, ebx
add r11b, byte [rcx + rsi]
lea ecx, [rdi + r8]
cdqe
movsx edx, byte [rax + rsi]
movsx eax, byte [rsi + 7]
imul edx, ecx
imul edx, r9d
movsxd rcx, edx
movsx rdx, byte [rcx + rsi]
movsx r8d, byte [rdx + rsi]
cdq
idiv r10d
movsxd rcx, eax
mov eax, edi
movsx edx, byte [rcx + rsi]
imul r8d, edx
cdq
idiv ebx
mov ecx, eax
mov eax, r8d
cdq
idiv ecx
movsxd rcx, eax
mov byte [rcx + rsi], r11b
mov rdx, qword [0x180046048]
movsx eax, byte [rdx + 2]
movsx ecx, byte [rdx + 6]
add ecx, eax
movsx eax, byte [rdx + 9]
imul eax, ecx
cdqe
movsx rcx, byte [rax + rdx]
inc byte [rcx + rdx]
mov r8, qword [0x180046048]
movsx eax, byte [r8 + 5]
movsx ecx, byte [r8 + 6]
movsx edx, byte [r8 + 7]
imul edx, eax
movzx eax, byte [r8 + 1]
imul edx, ecx
imul edx, ecx
movsxd rcx, edx
mov byte [rcx + r8], al
mov rax, qword [0x180046048]
inc byte [rax + 1]
mov rdi, qword [0x180046048]
movsx r9d, byte [rdi + 3]
movsx ebx, byte [rdi + 1]
mov eax, r9d
movsx r8d, byte [rdi + 4]
cdq
idiv r8d
mov r10d, ebx
mov r11d, eax
movsx eax, byte [rdi]
imul eax, ebx
cdq
idiv r11d
movsxd rcx, eax
movsx rdx, byte [rcx + rdi]
add bl, byte [rdx + rdi]
movsx ecx, byte [rdi + 9]
mov eax, r8d
cdq
idiv ecx
mov ecx, eax
movsx eax, byte [rdi + 2]
imul eax, r9d
cdq
idiv ecx
movsxd rcx, eax
movsx rax, byte [rcx + rdi]
movsx eax, byte [rax + rdi]
imul eax, r10d
cdq
idiv r11d
movsxd rcx, eax
mov byte [rcx + rdi], bl
mov r9, qword [0x180046048]
movsx ecx, byte [r9 + 4]
movsx eax, byte [r9 + 3]
cdq
idiv ecx
movsx ecx, byte [r9]
mov r8d, eax
movsx eax, byte [r9 + 1]
imul eax, ecx
cdq
idiv r8d
movsxd rcx, eax
movsx rax, byte [rcx + r9]
inc byte [rax + r9]
mov rsi, qword [0x180046048]
movsx edi, byte [rsi + 6]
movsx ecx, byte [rsi + 9]
movsx r8d, byte [rsi + 3]
movsx r10d, byte [rsi + 2]
movsx r9d, byte [rsi + 1]
movsx ebx, byte [rsi + 8]
lea eax, [rdi + r10]
imul eax, ecx
cdqe
movsx rdx, byte [rax + rsi]
mov eax, r9d
imul eax, ecx
movzx r11d, byte [rdx + rsi]
cdqe
movsx rcx, byte [rax + rsi]
mov eax, r8d
imul eax, ebx
add r11b, byte [rcx + rsi]
lea ecx, [r8 + rdi]
cdqe
movsx edx, byte [rax + rsi]
movsx eax, byte [rsi + 7]
imul edx, ecx
imul edx, r9d
movsxd rcx, edx
movsx rdx, byte [rcx + rsi]
movsx r8d, byte [rdx + rsi]
cdq
idiv r10d
movsxd rcx, eax
mov eax, edi
movsx edx, byte [rcx + rsi]
imul r8d, edx
cdq
idiv ebx
mov ecx, eax
mov eax, r8d
cdq
idiv ecx
movsxd rcx, eax
mov byte [rcx + rsi], r11b
mov rdx, qword [0x180046048]
movsx eax, byte [rdx + 2]
movsx ecx, byte [rdx + 6]
add ecx, eax
movsx eax, byte [rdx + 9]
imul eax, ecx
cdqe
movsx rcx, byte [rax + rdx]
inc byte [rcx + rdx]
lea r9, [0x180000000]
inc r15
cmp r15, 3
jb 0x18003bf10
movzx r8d, byte [0x180046044]
movzx edx, byte [reloc.WS2_32.dll_socket]
cmp r8b, 8
je 0x18003c18c
cmp dl, 0x17
jne 0x18003c1a2
movzx ecx, byte [0x18004688d]
movzx eax, byte [0x180046cdb]
shl al, cl
mov byte [0x180046279], al
test r8b, r8b
jne 0x18003c1ac
cmp dl, 6
je 0x18003c1be
movzx ecx, byte [0x180046050]
movzx eax, cl
shl al, cl
mov byte [0x1800460be], al
cmp byte [0x180046040], r14b
jne 0x18003c1da
movsx rax, byte [0x18004603d]
movsx ecx, byte [0x18004603c]
mov dword [rax], ecx
jmp 0x18003c207
movsx r8, byte [0x18004603d]
movzx ecx, byte [0x180046041]
mov edx, r8d
movsx eax, byte [0x180046038]
sar edx, cl
sub eax, 4
cmp edx, eax
je 0x18003c207
movsx rax, byte [0x18004603e]
mov qword [rax], r8
mov rax, qword [0x18004b5e0]
lea rcx, [rbp + 0xc0]
xor edx, edx
mov qword [rsp + 0x38], rax
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
mov ebx, 8
mov edx, 0x1f
mov ecx, ebx
call fcn.18003fc70
test eax, eax
mov r12d, eax
mov rdi, r14
cmove r12d, ebx
movsxd rbx, r12d
test r12d, r12d
je 0x18003c26e
nop dword [rax]
mov edx, 0xff
mov ecx, 1
call fcn.18003fc70
mov byte [rbp + rdi + 0xc0], al
inc rdi
cmp rdi, rbx
jb 0x18003c250
mov rax, qword [0x18004b5f0]
mov qword [rsp + 0x58], r14
test rax, rax
je 0x18003c28c
movsx rcx, byte [0x18004b601]
xor rcx, rax
jmp 0x18003c28f
mov rcx, r14
mov r15, 0xffffffffffffffff
lea rsi, [0x18004b600]
mov rax, r15
inc rax
cmp byte [rsi + rax], r14b
jne 0x18003c2a0
movsx r8, byte [0x18004b602]
lea rdx, [0x180042ca4]
xor r8, qword [0x18004b5f8]
add rax, rcx
add r8, rax
lea rcx, [rsp + 0x40]
add r8, rbx
call fcn.180039f90
mov rcx, qword [0x18004b5f8]
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x68], xmm0
movsd xmm1, qword [rax + 0x10]
xorps xmm0, xmm0
xor eax, eax
movsd qword [rsp + 0x78], xmm1
xorps xmm1, xmm1
mov dword [rbp + 0x40], eax
mov dword [rbp + 0xb0], eax
movsx rax, byte [0x18004b602]
mov r8, rax
xor r8, rcx
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
movups xmmword [rbp + 0x30], xmm0
movups xmmword [rbp + 0x50], xmm1
movups xmmword [rbp + 0x60], xmm1
movups xmmword [rbp + 0x70], xmm1
movups xmmword [rbp + 0x80], xmm1
movups xmmword [rbp + 0x90], xmm1
movups xmmword [rbp + 0xa0], xmm1
je 0x18003c37e
mov rax, r15
nop dword [rax]
inc rax
cmp byte [rsi + rax], r14b
jne 0x18003c350
mov r9, rsi
mov dword [rsp + 0x20], eax
lea rdx, [rbp - 0x20]
lea rcx, [0x18004bae0]
call fcn.18003f3e0
mov rcx, qword [0x18004b5f8]
movzx eax, byte [0x18004b602]
movsx r8, al
lea rdx, [rbp - 0x20]
xor r8, rcx
lea rcx, [rsp + 0x68]
call fcn.180039f40
mov rax, qword [0x18004b5f0]
test rax, rax
je 0x18003c3d5
movsx rdi, byte [0x18004b601]
xor rdi, rax
je 0x18003c3d8
mov rax, r15
nop
inc rax
cmp byte [rsi + rax], r14b
jne 0x18003c3b0
mov r9, rsi
mov dword [rsp + 0x20], eax
mov r8, rdi
lea rdx, [rbp + 0x50]
lea rcx, [0x18004b6e0]
call fcn.18003f3e0
jmp 0x18003c3d8
mov rdi, r14
mov r8, rdi
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x68]
call fcn.180039f40
mov r8, r15
nop dword [rax]
inc r8
cmp byte [rsi + r8], r14b
jne 0x18003c3f0
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.180039f40
mov r8, rbx
lea rdx, [rbp + 0xc0]
lea rcx, [rsp + 0x68]
call fcn.180039f40
movzx eax, byte [0x18004b600]
cmp byte [0x18004af94], al
jne 0x18003c4b2
movzx edx, byte [0x18004af92]
lea r8, [0x180000000]
movzx eax, byte [rbp - 0x20]
cmp dl, al
je 0x18003c472
movsx rax, byte [0x18004af91]
movsx rcx, byte [rax + rsi]
movsx rax, byte [0x18004603e]
xor rcx, rax
movsx rax, byte [rcx + r8 + 0x4603c]
mov qword [rcx], rax
movzx eax, byte [rbp - 0x20]
movzx edx, byte [0x18004af92]
movsx ecx, byte [0x18004af91]
cmp cl, al
jne 0x18003c4b2
movsx eax, dl
add eax, ecx
cdqe
movsx rcx, byte [rax + r8 + 0x4af90]
movsx rax, byte [rcx + r8 + 0x4af90]
movsx rcx, byte [rax + rsi]
movsx rax, byte [0x18004603e]
xor rcx, rax
movsx rax, byte [rcx + r8 + 0x4603c]
mov qword [rcx], rax
movsxd rax, dword [0x18004c104]
lea r9, [0x18004c120]
mov r8, rbx
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0xc0]
lea rcx, [rbp + 0xc0]
call fcn.18003f210
mov edx, 2
lea rcx, [rsp + 0x68]
call fcn.18003a160
xor edx, edx
lea rcx, [rsp + 0x58]
call fcn.18003b5a0
mov byte [rsp + 0x30], al
call fcn.18003b3f0
mov r9, qword [rsp + 0x58]
mov edi, r14d
movsxd rsi, dword [rsp + 0x60]
test r9, r9
je 0x18003c80a
mov rcx, qword [r9]
mov rax, rcx
mov qword [rsp + 0x60], rcx
shr rax, 0x20
mov rdx, rcx
and al, 0xf8
shr rdx, 8
cmp al, 0xc0
jne 0x18003c643
movzx eax, dl
xor al, 8
cmp al, 0xde
jne 0x18003c5e7
mov rax, rcx
shr rax, 0x18
xor al, cl
cmp al, 0x57
jne 0x18003c559
mov edi, 1
jmp 0x18003c682
test dl, dl
je 0x18003c682
movzx ecx, byte [rsp + 0x64]
movzx eax, byte [rsp + 0x62]
nop dword [rax + rax]
test rsi, rsi
je 0x18003c682
movzx eax, al
mov r8d, eax
shr r8, cl
movzx eax, byte [rsp + rax + 0x60]
movzx ecx, byte [rsp + rax + 0x60]
movzx eax, byte [rsp + r8 + 0x60]
movzx edx, byte [rsp + rcx + 0x60]
mov byte [rsp + rdx + 0x60], al
movzx eax, byte [rsp + 0x62]
movzx ecx, byte [rsp + rax + 0x60]
movzx eax, byte [rsp + rcx + 0x60]
inc byte [rsp + rax + 0x60]
movzx eax, byte [rsp + 0x62]
movzx ecx, byte [rsp + rax + 0x60]
inc byte [rsp + rcx + 0x60]
movzx eax, byte [rsp + 0x62]
inc byte [rsp + rax + 0x60]
movzx eax, byte [rsp + 0x62]
movzx ecx, byte [rsp + 0x64]
inc al
inc cl
mov byte [rsp + 0x62], al
mov byte [rsp + 0x64], cl
cmp byte [rsp + 0x61], dil
jne 0x18003c570
jmp 0x18003c682
test cl, cl
je 0x18003c682
movzx r8d, byte [rsp + 0x62]
movzx ecx, byte [rsp + 0x61]
nop word [rax + rax]
test rsi, rsi
je 0x18003c682
movzx eax, cl
movzx edx, r8b
xor rdx, rax
movzx eax, r8b
shl eax, cl
movsxd rcx, eax
movzx eax, byte [rsp + rdx + 0x60]
mov byte [rsp + rcx + 0x60], al
movzx ecx, byte [rsp + 0x61]
movzx r8d, byte [rsp + 0x62]
inc cl
inc r8b
mov byte [rsp + 0x61], cl
mov byte [rsp + 0x62], r8b
cmp byte [rsp + 0x60], dil
jne 0x18003c600
jmp 0x18003c682
test dl, dl
je 0x18003c682
movzx edx, byte [rsp + 0x63]
movzx ecx, byte [rsp + 0x61]
test rsi, rsi
je 0x18003c682
movzx eax, dl
shl eax, cl
movzx ecx, dl
cdqe
movzx eax, byte [rsp + rax + 0x60]
mov byte [rsp + rcx + 0x60], al
movzx edx, byte [rsp + 0x63]
movzx ecx, byte [rsp + 0x61]
inc dl
add cl, 1
mov byte [rsp + 0x63], dl
mov byte [rsp + 0x61], cl
jne 0x18003c651
test r13, r13
je 0x18003c69f
lea rcx, [r9 + 0x20]
sub r13, rcx
nop
movzx eax, byte [rcx]
mov byte [rcx + r13], al
lea rcx, [rcx + 1]
test al, al
jne 0x18003c690
xor cl, cl
mov rax, r14
mov qword [rsp + 0x60], rax
cmp edi, 1
jne 0x18003c7cc
lea r13, [r9 + 0x20]
inc r15
cmp byte [r15 + r13], al
jne 0x18003c6b6
movsxd rdi, dword [r15 + r13 + 1]
lea rcx, [rbp + 0x1d0]
xorps xmm0, xmm0
mov dword [rbp - 0x30], eax
xor edx, edx
mov byte [rbp - 0x2c], al
mov r8d, 0x104
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
call sub.VCRUNTIME140.dll_memset
mov r9d, dword [0x18004c104]
lea r8, [rbp - 0x80]
lea rdx, [0x18004c120]
lea rcx, [0x18004c000]
call fcn.18003f270
movsxd rax, dword [0x18004c104]
lea rcx, [r13 + 5]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x60]
lea rax, [rbp - 0x80]
mov rdx, rdi
add rcx, r15
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x1d0]
call fcn.18003e1a0
movsxd rax, dword [0x18004c104]
lea r9, [0x18004c120]
xorps xmm0, xmm0
mov qword [rsp + 0x20], rax
xorps xmm1, xmm1
movdqa xmmword [rbp - 0x80], xmm0
mov r8, rbx
movdqa xmmword [rbp - 0x70], xmm1
lea rdx, [rbp + 0x1d0]
movdqa xmmword [rbp - 0x60], xmm0
lea rcx, [rbp + 0x1d0]
movdqa xmmword [rbp - 0x50], xmm1
movdqa xmmword [rbp - 0x40], xmm0
mov dword [rbp - 0x30], r14d
mov byte [rbp - 0x2c], r14b
call fcn.18003f210
mov rcx, r14
test r12d, r12d
je 0x18003c7c2
mov byte [rsp + 0x30], 1
movzx eax, byte [rbp + rcx + 0xc0]
cmp byte [rbp + rcx + 0x1d0], al
jne 0x18003c7c0
inc rcx
cmp rcx, rbx
jb 0x18003c7a0
movzx ecx, byte [rsp + 0x30]
jmp 0x18003c7c2
xor cl, cl
mov r9, qword [rsp + 0x58]
mov rax, qword [rsp + 0x60]
test r12d, r12d
je 0x18003c7e0
test rax, rax
jne 0x18003c7e3
nop word [rax + rax]
movzx ecx, al
movzx edi, cl
mov rcx, r9
call fcn.180041a82
mov r9, qword [rsp + 0x58]
cmp edi, 1
jne 0x18003c817
mov rax, qword [rsp + 0x38]
cmp rax, qword [0x18004b5e0]
cmove edi, r14d
jmp 0x18003c817
cmp byte [rsp + 0x30], dil
mov eax, 2
cmove edi, eax
test r12d, r12d
cmovne r12d, edi
test rbx, rbx
jne 0x18003c86a
mov rdx, rsi
shl rdx, 5
nop word [rax + rax]
test rsi, rsi
je 0x18003c86a
movups xmm0, xmmword [r14 + r9 - 0x20]
sub r14, 0x20
lea rax, [rdx + r14]
mov rcx, qword [rax + r9 + 0x18]
shl rcx, 5
movups xmmword [rcx + r9], xmm0
movups xmm1, xmmword [r14 + r9 + 0x10]
movups xmmword [rcx + r9 + 0x10], xmm1
sub rbx, 1
jne 0x18003c86a
mov r9, qword [rsp + 0x58]
jmp 0x18003c830
mov eax, r12d
mov rcx, qword [rbp + 0x2e0]
xor rcx, rsp
call fcn.1800412a0
mov rbx, qword [rsp + 0x440]
add rsp, 0x3f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret