Function at 0x140005934
Capabilities:
Print debug messages
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x7f0]
sub rsp, 0x8f0
mov rax, qword [0x1400100e0]
xor rax, rsp
mov qword [rbp + 0x7e0], rax
mov rbx, rcx
mov dword [rsp + 0x60], edx
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp dword [0x140010108], 0xffffffff
mov edi, eax
jne 0x140005a33
and dword [0x140010108], 0
lea rax, [rsp + 0x58]
and qword [rsp + 0x58], 0
lea rdx, str.SoftwarePoliciesMicrosoftWindowsInstaller
mov qword [rsp + 0x20], rax
call fcn.140004e70
test eax, eax
jne 0x140005a33
mov rcx, qword [rsp + 0x58]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x70], rax
lea rdx, str.Debug
lea rax, [rsp + 0x50]
mov dword [rsp + 0x78], 0x28
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rbp - 0x80]
mov dword [rsp + 0x50], 0x50
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
nop dword [rax + rax]
test eax, eax
jne 0x140005a0a
mov rax, qword [rsp + 0x70]
mov ecx, dword [rax]
and ecx, 3
mov dword [0x140010108], ecx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
cmp dword [rsp + 0x78], 0x28
jle 0x140005a33
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
nop dword [rax + rax]
cmp dword [0x140010c14], 0
je 0x140005b29
cmp dword [rsp + 0x60], 0
je 0x140005b29
and qword [rsp + 0x58], 0
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x20006
call fcn.140002090
and qword [rsp + 0x40], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionInstallerCA
and qword [rsp + 0x30], 0
xor r9d, r9d
mov eax, dword [rsp + 0x50]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rcx, 0xffffffff80000001
and dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x140005b29
mov rcx, qword [rsp + 0x58]
lea r9d, [rax + 4]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x28], r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.LastError
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
lea rdx, str.LastErrorMessage
mov r9d, 1
xor r8d, r8d
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, dword [0x140010108]
test al, 3
je 0x140005b8d
xor edx, edx
lea rcx, [rbp - 0x30]
mov r8d, 0x802
call sub.msvcrt.dll_memset
mov r9d, dword [rsp + 0x60]
lea rcx, [rbp - 0x30]
mov edx, 0x401
test r9d, r9d
je 0x140005b6a
lea r8, str.Error:__d.__s._r_n
mov qword [rsp + 0x20], rbx
call fcn.1400093d0
jmp 0x140005b79
mov r9, rbx
lea r8, str._s_r_n
call fcn.1400093d0
test eax, eax
js 0x140005b8d
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
nop dword [rax + rax]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x7e0]
xor rcx, rsp
call fcn.140001490
lea r11, [rsp + 0x8f0]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret