Function at 0x1400049e0
Capabilities:
Acquire debug privileges
Set registry value

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rsi, rcx
mov rdx, rcx
xor r14d, r14d
lea rcx, str.AddBypassNROReg__s_
mov ebx, 1
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov dword [rsp + 0x6c], ebx
call fcn.140005180
mov rcx, rsi
call fcn.1400058b0
test eax, eax
je 0x140004d5c
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x60]
lea edx, [rbx + 0x1f]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140004a67
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Open_process_token_failed___u
mov edx, eax
call fcn.140005180
jmp 0x140004d5c
mov ecx, 0x28
mov qword [rsp + 0xb0], rdi
call fcn.14000d2a8
mov rdi, rax
test rax, rax
jne 0x140004a92
lea rcx, str.Failed_to_alloc_privileges_memory
call fcn.140005180
jmp 0x140004d54
lea r8, [rax + 4]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x140004d40
lea r8, [rdi + 0x10]
lea rdx, str.SeBackupPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x140004d40
lea r8, [rdi + 0x1c]
lea rdx, str.SeRestorePrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x140004d40
mov dword [rdi], 3
mov dword [rdi + 0xc], 2
mov dword [rdi + 0x18], 2
mov dword [rdi + 0x24], 2
mov rcx, qword [rsp + 0x60]
mov r9d, 0x28
mov r8, rdi
xor edx, edx
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x140004d37
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140004d37
lea rcx, str.AdjustTokenPrivileges_success
call fcn.140005180
lea rdx, str.VTOYNEWSW
mov r8, rsi
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegLoadKeyA]
test eax, eax
je 0x140004b6e
lea rcx, str.RegLoadKey_Failed_0x_x
mov edx, eax
call fcn.140005180
jmp 0x140004d4c
lea rax, [rsp + 0x68]
lea rdx, str.VTOYNEWSWMicrosoftWindowsCurrentVersion
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x58]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0xf003f
mov qword [rsp + 0xa8], rbp
mov qword [rsp + 0xb8], r15
mov dword [rsp + 0x20], 4
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea r15, str.SUCCESS
mov ebp, eax
lea rsi, str.FAILED
test eax, eax
je 0x140004bf1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_create_reg_key_VTOYNEWSWMicrosoftWindowsCurrentVersion__u__u
mov r8d, ebp
mov edx, eax
call fcn.140005180
jmp 0x140004cf9
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x68]
lea rdx, str.OOBE
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
xor r8d, r8d
mov dword [rsp + 0x28], 7
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebp, eax
test eax, eax
je 0x140004c51
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_create_OOBE_reg___u__u
mov r8d, ebp
mov edx, eax
call fcn.140005180
jmp 0x140004cf9
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x6c]
lea rdx, str.BypassNRO
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rdx, rsi
test eax, eax
lea rcx, str.Create_BypassNRO_registry__s__u
mov r8d, eax
cmove rdx, r15
call fcn.140005180
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov rcx, qword [rsp + 0x50]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, rsi
add ebx, eax
lea rcx, str.Flush_and_close_subkey__s__u
cmove rdx, r15
mov r8d, ebx
call fcn.140005180
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov rcx, qword [rsp + 0x58]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, rsi
add ebx, eax
lea rcx, str.Flush_and_close_key__s__u
cmove rdx, r15
mov r8d, ebx
call fcn.140005180
mov ebx, r14d
lea rdx, str.VTOYNEWSW
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyA]
lea rcx, str.RegUnLoadKey__s__u
test eax, eax
mov r8d, eax
cmove rsi, r15
mov rdx, rsi
call fcn.140005180
mov r15, qword [rsp + 0xb8]
mov rbp, qword [rsp + 0xa8]
jmp 0x140004d4c
lea rcx, str.AdjustTokenPrivileges_failed_
jmp 0x140004d47
lea rcx, str.LookupPrivilegeValue_failed_
call fcn.140005180
mov rcx, rdi
call fcn.14000d268
mov rdi, qword [rsp + 0xb0]
mov eax, ebx
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14000d130
add rsp, 0x80
pop r14
pop rsi
pop rbx
ret