Function at 0x1402f4770
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 [0x140367bb8]
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 0x1402f47c0
movsx rax, byte [0x140367b4a]
mov dword [rax], 3
jmp 0x1402f47e2
movzx eax, word [0x140367b48]
movsx edx, byte [reloc.WS2_32.dll_closesocket]
movzx ecx, al
xor cl, 0x36
cmp cl, dl
je 0x1402f47e9
movsx rax, byte [0x140367b4a]
mov dword [rax], edx
movzx eax, word [0x140367b48]
movsx r8d, byte [0x140367b4d]
cmp r8b, 5
jne 0x1402f4806
movsx ecx, al
movsx rax, byte [0x140367b4a]
mov dword [rax], ecx
jmp 0x1402f4831
movsx ecx, byte [0x140367b4c]
mov edx, r8d
xor edx, ecx
add ecx, 0x20
cmp edx, ecx
je 0x1402f4839
movsx edx, byte [0x140367b4a]
movsx rcx, al
movsx rax, byte [reloc.WS2_32.dll_closesocket]
xor rcx, rax
mov dword [rcx], edx
movzx r8d, byte [0x140367b4d]
cmp byte [0x14038ad4e], 0
je 0x1402f484b
cmp byte [0x14038ad4f], 0
jne 0x1402f4856
movsx rax, byte [0x140367b4c]
mov byte [rax], r8b
movzx r11d, byte [0x140385ab8]
movzx r10d, byte [0x140385aba]
movzx r9d, byte [0x140385abb]
lea ecx, [r10 + r11]
cmp r9d, ecx
je 0x1402f4899
mov ecx, r10d
and rcx, r9
mov word [rcx], r11w
movzx r9d, byte [0x140385abb]
movzx r10d, byte [0x140385aba]
movzx r11d, byte [0x140385ab8]
movzx r8d, r9b
movzx ecx, r10b
mov eax, r8d
sub eax, ecx
movzx ecx, r11b
cdq
idiv ecx
movzx edx, byte [0x140385ab9]
add eax, r8d
cmp edx, eax
je 0x1402f48e0
movzx ecx, r11b
movzx eax, r10b
and rcx, rax
mov byte [rcx], dl
movzx r9d, byte [0x140385abb]
movzx r10d, byte [0x140385aba]
movzx r11d, byte [0x140385ab8]
movsx eax, byte [reloc.WS2_32.dll_closesocket]
movzx ecx, r9b
cdq
idiv ecx
movsx ecx, byte [0x140367b51]
cmp eax, ecx
je 0x1402f4917
movzx ecx, r10b
movzx eax, r9b
and rcx, rax
mov byte [rcx], r11b
movzx r9d, byte [0x140385abb]
movzx r10d, byte [0x140385aba]
movzx r8d, byte [0x140385abc]
movsx eax, byte [reloc.WS2_32.dll_closesocket]
mov r11d, r8d
movzx ecx, r9b
cdq
idiv ecx
mov ecx, r8d
lea r9, [0x140000000]
imul eax, r8d
mov edx, r8d
shl edx, cl
cmp edx, eax
jne 0x1402f4953
test r8b, 0xf6
jne 0x1402f4980
cmp r8b, 9
je 0x1402f4980
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 + 0x367b54], r8b
movsx rax, r8b
mov byte [rax + r9 + 0x385ab8], r10b
xor r14d, r14d
mov r15d, r14d
nop word [rax + rax]
cmp byte [r15 + r9 + 0x38b648], r14b
jne 0x1402f4be5
mov rax, qword [str.p___]
inc byte [rax + 6]
mov rsi, qword [str.p___]
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 [str.p___]
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 [str.p___]
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 [str.p___]
inc byte [rax + 1]
mov rdi, qword [str.p___]
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 [str.p___]
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 [str.p___]
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 [str.p___]
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, [0x140000000]
inc r15
cmp r15, 3
jb 0x1402f4990
movzx r8d, byte [0x140367b54]
movzx edx, byte [reloc.WS2_32.dll_socket]
cmp r8b, 8
je 0x1402f4c0c
cmp dl, 0x17
jne 0x1402f4c22
movzx ecx, byte [0x14036839d]
movzx eax, byte [0x1403687eb]
shl al, cl
mov byte [0x140367d89], al
test r8b, r8b
jne 0x1402f4c2c
cmp dl, 6
je 0x1402f4c3e
movzx ecx, byte [0x140367b60]
movzx eax, cl
shl al, cl
mov byte [0x140367bce], al
cmp byte [0x140367b50], r14b
jne 0x1402f4c5a
movsx rax, byte [0x140367b4d]
movsx ecx, byte [0x140367b4c]
mov dword [rax], ecx
jmp 0x1402f4c87
movsx r8, byte [0x140367b4d]
movzx ecx, byte [0x140367b51]
mov edx, r8d
movsx eax, byte [0x140367b48]
sar edx, cl
sub eax, 4
cmp edx, eax
je 0x1402f4c87
movsx rax, byte [0x140367b4e]
mov qword [rax], r8
mov rax, qword [0x14038b640]
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.1402fa080
test eax, eax
mov r12d, eax
mov rdi, r14
cmove r12d, ebx
movsxd rbx, r12d
test r12d, r12d
je 0x1402f4cee
nop dword [rax]
mov edx, 0xff
mov ecx, 1
call fcn.1402fa080
mov byte [rbp + rdi + 0xc0], al
inc rdi
cmp rdi, rbx
jb 0x1402f4cd0
mov rax, qword [0x140386390]
mov qword [rsp + 0x58], r14
test rax, rax
je 0x1402f4d0c
movsx rcx, byte [0x1403862c1]
xor rcx, rax
jmp 0x1402f4d0f
mov rcx, r14
mov r15, 0xffffffffffffffff
lea rsi, [0x1403862c0]
mov rax, r15
inc rax
cmp byte [rsi + rax], r14b
jne 0x1402f4d20
movsx r8, byte [0x1403862c2]
lea rdx, [0x14031139c]
xor r8, qword [0x140386388]
add rax, rcx
add r8, rax
lea rcx, [rsp + 0x40]
add r8, rbx
call fcn.1402f5d70
mov rcx, qword [0x140386388]
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 [0x1403862c2]
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 0x1402f4dfe
mov rax, r15
nop dword [rax]
inc rax
cmp byte [rsi + rax], r14b
jne 0x1402f4dd0
mov r9, rsi
mov dword [rsp + 0x20], eax
lea rdx, [rbp - 0x20]
lea rcx, [0x140385ac0]
call fcn.1402f9bc0
mov rcx, qword [0x140386388]
movzx eax, byte [0x1403862c2]
movsx r8, al
lea rdx, [rbp - 0x20]
xor r8, rcx
lea rcx, [rsp + 0x68]
call fcn.1402f5f40
mov rax, qword [0x140386390]
test rax, rax
je 0x1402f4e55
movsx rdi, byte [0x1403862c1]
xor rdi, rax
je 0x1402f4e58
mov rax, r15
nop
inc rax
cmp byte [rsi + rax], r14b
jne 0x1402f4e30
mov r9, rsi
mov dword [rsp + 0x20], eax
mov r8, rdi
lea rdx, [rbp + 0x50]
lea rcx, [0x140385ec0]
call fcn.1402f9bc0
jmp 0x1402f4e58
mov rdi, r14
mov r8, rdi
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x68]
call fcn.1402f5f40
mov r8, r15
nop dword [rax]
inc r8
cmp byte [rsi + r8], r14b
jne 0x1402f4e70
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.1402f5f40
mov r8, rbx
lea rdx, [rbp + 0xc0]
lea rcx, [rsp + 0x68]
call fcn.1402f5f40
movzx eax, byte [0x1403862c0]
cmp byte [0x140385a5c], al
jne 0x1402f4f32
movzx edx, byte [0x140385a5a]
lea r8, [0x140000000]
movzx eax, byte [rbp - 0x20]
cmp dl, al
je 0x1402f4ef2
movsx rax, byte [0x140385a59]
movsx rcx, byte [rax + rsi]
movsx rax, byte [0x140367b4e]
xor rcx, rax
movsx rax, byte [rcx + r8 + 0x367b4c]
mov qword [rcx], rax
movzx eax, byte [rbp - 0x20]
movzx edx, byte [0x140385a5a]
movsx ecx, byte [0x140385a59]
cmp cl, al
jne 0x1402f4f32
movsx eax, dl
add eax, ecx
cdqe
movsx rcx, byte [rax + r8 + 0x385a58]
movsx rax, byte [rcx + r8 + 0x385a58]
movsx rcx, byte [rax + rsi]
movsx rax, byte [0x140367b4e]
xor rcx, rax
movsx rax, byte [rcx + r8 + 0x367b4c]
mov qword [rcx], rax
movsxd rax, dword [0x14038ae64]
lea r9, [0x14038ad60]
mov r8, rbx
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0xc0]
lea rcx, [rbp + 0xc0]
call fcn.1402f99f0
mov edx, 2
lea rcx, [rsp + 0x68]
call fcn.1402f5f90
xor edx, edx
lea rcx, [rsp + 0x58]
call fcn.1402f62a0
mov byte [rsp + 0x30], al
call fcn.1402f6260
mov r9, qword [rsp + 0x58]
mov edi, r14d
movsxd rsi, dword [rsp + 0x60]
test r9, r9
je 0x1402f528a
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 0x1402f50c3
movzx eax, dl
xor al, 8
cmp al, 0xde
jne 0x1402f5067
mov rax, rcx
shr rax, 0x18
xor al, cl
cmp al, 0x57
jne 0x1402f4fd9
mov edi, 1
jmp 0x1402f5102
test dl, dl
je 0x1402f5102
movzx ecx, byte [rsp + 0x64]
movzx eax, byte [rsp + 0x62]
nop dword [rax + rax]
test rsi, rsi
je 0x1402f5102
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 0x1402f4ff0
jmp 0x1402f5102
test cl, cl
je 0x1402f5102
movzx r8d, byte [rsp + 0x62]
movzx ecx, byte [rsp + 0x61]
nop word [rax + rax]
test rsi, rsi
je 0x1402f5102
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 0x1402f5080
jmp 0x1402f5102
test dl, dl
je 0x1402f5102
movzx edx, byte [rsp + 0x63]
movzx ecx, byte [rsp + 0x61]
test rsi, rsi
je 0x1402f5102
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 0x1402f50d1
test r13, r13
je 0x1402f511f
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 0x1402f5110
xor cl, cl
mov rax, r14
mov qword [rsp + 0x60], rax
cmp edi, 1
jne 0x1402f524c
lea r13, [r9 + 0x20]
inc r15
cmp byte [r15 + r13], al
jne 0x1402f5136
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 [0x14038ae64]
lea r8, [rbp - 0x80]
lea rdx, [0x14038ad60]
lea rcx, [0x14038ae80]
call fcn.1402f9a50
movsxd rax, dword [0x14038ae64]
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.1402f9120
movsxd rax, dword [0x14038ae64]
lea r9, [0x14038ad60]
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.1402f99f0
mov rcx, r14
test r12d, r12d
je 0x1402f5242
mov byte [rsp + 0x30], 1
movzx eax, byte [rbp + rcx + 0xc0]
cmp byte [rbp + rcx + 0x1d0], al
jne 0x1402f5240
inc rcx
cmp rcx, rbx
jb 0x1402f5220
movzx ecx, byte [rsp + 0x30]
jmp 0x1402f5242
xor cl, cl
mov r9, qword [rsp + 0x58]
mov rax, qword [rsp + 0x60]
test r12d, r12d
je 0x1402f5260
test rax, rax
jne 0x1402f5263
nop word [rax + rax]
movzx ecx, al
movzx edi, cl
mov rcx, r9
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov r9, qword [rsp + 0x58]
cmp edi, 1
jne 0x1402f5297
mov rax, qword [rsp + 0x38]
cmp rax, qword [0x14038b640]
cmove edi, r14d
jmp 0x1402f5297
cmp byte [rsp + 0x30], dil
mov eax, 2
cmove edi, eax
test r12d, r12d
cmovne r12d, edi
test rbx, rbx
jne 0x1402f52ea
mov rdx, rsi
shl rdx, 5
nop word [rax + rax]
test rsi, rsi
je 0x1402f52ea
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 0x1402f52ea
mov r9, qword [rsp + 0x58]
jmp 0x1402f52b0
mov eax, r12d
mov rcx, qword [rbp + 0x2e0]
xor rcx, rsp
call fcn.1402fa650
mov rbx, qword [rsp + 0x440]
add rsp, 0x3f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret