Function at 0x180051aa0
Capabilities:
Encode data using xor
Set registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xe0
mov rax, qword [0x180109070]
xor rax, rsp
mov qword [rbp + 0x2f], rax
movsxd rbx, r8d
mov r14, rdx
mov rdi, rcx
mov qword [rbp - 0x69], rcx
xor r15d, r15d
mov qword [rbp + 0xf], r15
mov qword [rbp + 0x1f], r15
mov qword [rbp + 0x27], reloc.WS2_32.dll_ntohs
mov byte [rbp + 0xf], r15b
xor r8d, r8d
lea rdx, [0x1800e4e52]
lea rcx, [rbp + 0xf]
call fcn.180047020
nop
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov rsi, rbx
mov eax, r15d
mov qword [rbp - 9], rax
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
test ebx, ebx
je 0x180051b8b
movabs rax, 0x7fffffffffffffff
cmp rbx, rax
ja 0x180051daa
cmp rbx, 0x1000
jb 0x180051b63
lea rcx, [rbx + 0x27]
cmp rcx, rbx
jbe 0x180051da4
call fcn.1800d1a2c
mov rcx, rax
test rax, rax
je 0x180051d71
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x180051b6b
mov rcx, rsi
call fcn.1800d1a2c
mov qword [rbp - 9], rax
add rbx, rax
mov qword [rbp + 7], rbx
mov r8, rsi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp - 1], rbx
mov rax, qword [rbp - 9]
mov dword [rbp - 0x59], 3
mov qword [rbp - 0x39], r14
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x29], rsi
lea rax, [rbp - 0x59]
mov qword [rbp - 0x69], rax
mov dword [rbp - 0x79], 0xe5f7e7cc
mov dword [rbp - 0x75], 0xe9e4efe9
mov word [rbp - 0x71], 0x100
mov rcx, r15
nop dword [rax]
lea eax, [rcx - 0x7f]
xor byte [rbp + rcx - 0x79], al
inc rcx
cmp rcx, 8
jb 0x180051bc0
mov byte [rbp - 0x70], 0
mov dword [rsp + 0x28], 8
lea rax, [rbp - 0x69]
mov qword [rsp + 0x20], rax
mov r9d, recv
xor r8d, r8d
lea rdx, [rbp - 0x79]
mov rcx, qword [0x18015b4b0]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rbx, r15
mov rcx, qword [rbp - 9]
cmp qword [rbp - 1], rcx
je 0x180051c63
nop dword [rax]
movzx r9d, byte [rcx + rbx]
test r9b, r9b
je 0x180051c63
mov rcx, qword [rbp + 0x1f]
mov rdx, qword [rbp + 0x27]
cmp rcx, rdx
jae 0x180051c47
lea rax, [rcx + 1]
mov qword [rbp + 0x1f], rax
lea rax, [rbp + 0xf]
cmp rdx, 0x10
cmovae rax, qword [rbp + 0xf]
mov byte [rax + rcx], r9b
mov byte [rax + rcx + 1], 0
jmp 0x180051c50
lea rcx, [rbp + 0xf]
call fcn.18006b860
inc rbx
mov rax, qword [rbp - 1]
mov rcx, qword [rbp - 9]
sub rax, rcx
cmp rbx, rax
jb 0x180051c10
lea rax, [rbp + 0xf]
mov rsi, qword [rbp + 0x27]
cmp rsi, 0x10
setae r14b
mov rbx, qword [rbp + 0xf]
cmovae rax, rbx
cmp byte [rax], 0
jne 0x180051d35
cmp qword [rbp + 0x1f], 1
jne 0x180051d35
mov qword [rdi], r15
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rdi], 0
xor r8d, r8d
lea rdx, [0x1800e4e52]
mov rcx, rdi
call fcn.180047020
nop
mov rcx, qword [rbp - 9]
test rcx, rcx
je 0x180051cfa
mov rdx, qword [rbp + 7]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180051ce9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180051d71
call fcn.1800d15ac
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
test r14b, r14b
je 0x180051d7e
lea rdx, [rsi + 1]
mov rax, rbx
cmp rdx, 0x1000
jb 0x180051d2b
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180051d2b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbx
call fcn.1800d15ac
jmp 0x180051d7e
movups xmm0, xmmword [rbp + 0xf]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rbp + 0x1f]
movups xmmword [rdi + 0x10], xmm1
test rcx, rcx
je 0x180051d7e
mov rdx, qword [rbp + 7]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180051d78
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180051d78
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1800d15ac
nop
mov rax, rdi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1800d12f0
mov rbx, qword [rsp + 0x128]
add rsp, 0xe0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.180040f60
nop
call fcn.180069920
int3