Function at 0x140009f50
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
push rbp
push rdi
push r13
push r15
sub rsp, 0x488
mov rax, qword [0x1400c87d8]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rdi, r9
mov rbp, r8
mov r15, rdx
mov r13, rcx
test rdx, rdx
je 0x14000a28b
mov qword [r11 + 0x18], rbx
lea r9, str.winspool
mov qword [r11 - 0x28], rsi
lea r8, [0x1400aafe0]
mov qword [r11 - 0x30], r12
lea rcx, [rsp + 0x50]
mov qword [r11 - 0x38], r14
mov r14d, 0x208
mov edx, r14d
call fcn.14000a2a0
mov rbx, 0xffffffffffffffff
lea rax, [rsp + 0x50]
mov rcx, rbx
nop word [rax + rax]
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140009fd0
mov eax, ecx
lea rsi, [rsp + 0x50]
mov edx, r14d
xor r12d, r12d
sub edx, ecx
lea rsi, [rsi + rax*2]
mov rcx, rsi
test rbp, rbp
jne 0x140015003
mov eax, dword [rdi]
lea r9, [0x1400ab088]
lea r8, str._s_.2d:
mov dword [rsp + 0x20], eax
call fcn.14000a2a0
inc dword [rdi]
cmp dword [rdi], 0x63
ja 0x140014f70
call sym.spoolsv.exe_PrvRevertToPrinterSelf
mov rdi, rax
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x38]
mov r9d, 2
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionPorts
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x14000a090
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], 2
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov word [rsp + 0x30], r12w
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14000a0a6
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
test rdi, rdi
je 0x14000a13b
mov qword [rsp + 0x40], rdi
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov r9d, 4
lea r8, [rsp + 0x30]
mov esi, eax
mov rcx, rdi
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea edx, [r9 + 4]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetTokenInformation]
nop dword [rax + rax]
mov ecx, esi
test eax, eax
jne 0x140014f78
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov r9d, 8
lea r8, [rsp + 0x40]
mov rcx, 0xfffffffffffffffe
lea edx, [r9 - 3]
call qword [sym.imp.ntdll.dll_NtSetInformationThread]
nop dword [rax + rax]
test eax, eax
js 0x140014f95
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
mov rsi, qword [rsp + 0x480]
lea rcx, [rsp + 0x50]
mov rax, rbx
nop dword [rax + rax]
cmp word [rcx + rax*2 + 2], r12w
lea rax, [rax + 1]
jne 0x14000a150
mov rcx, qword [r13 + 0x10]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov r9d, 1
lea rax, [rsp + 0x50]
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, r14
lea rax, [rsp + 0x50]
cmp word [rax], r12w
je 0x14000a1a7
add rax, 2
sub rcx, 1
jne 0x14000a195
jmp 0x14000a203
sub r14, rcx
lea rax, [rsp + 0x50]
lea rax, [rax + r14*2]
test rcx, rcx
je 0x140015031
lea r9, str._15_45
mov edx, 0x7ffffffe
sub r9, rax
nop dword [rax + rax]
test rdx, rdx
je 0x14000a1ff
movzx r8d, word [r9 + rax]
test r8w, r8w
je 0x14000a1f6
mov word [rax], r8w
dec rdx
add rax, 2
sub rcx, 1
jne 0x14000a1d0
jmp 0x140015031
test rcx, rcx
je 0x140015031
mov word [rax], r12w
mov r14, qword [rsp + 0x470]
lea rcx, [rsp + 0x50]
mov r12, qword [rsp + 0x478]
nop dword [rax + rax]
cmp word [rcx + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x14000a220
lea r8d, [rbx*2 + 2]
mov r9d, 1
mov dword [rsp + 0x28], r8d
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, qword [r13 + 0x18]
mov rdx, r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x4c0]
mov eax, 1
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.14000e2c0
add rsp, 0x488
pop r15
pop r13
pop rdi
pop rbp
ret
xor eax, eax
jmp 0x14000a26c
mov dword [rdi], r12d
jmp 0x14000a01d
cmp dword [rsp + 0x30], 2
je 0x14000a0f4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
nop
jmp 0x14000a12a
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov rax, qword [0x1400c82a8]
lea rcx, [0x1400c82a8]
cmp rax, rcx
je 0x14000a13b
test byte [rax + 0x44], 0x20
je 0x14000a13b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400c82a8]
lea r8, [0x1400ab970]
mov edx, 0x14
mov r9d, eax
mov rcx, qword [rcx + 0x38]
call fcn.140016c88
nop
jmp 0x14000a13b
mov r8, rbp
call fcn.140023ee4
mov edx, 0x2c
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
test rax, rax
je 0x14000a13b
mov word [rax], r12w
jmp 0x14000a13b
sub rax, 2
jmp 0x14000a1ff