Function at 0x1400010d0
Capabilities:
Set registry value

Disassembly:
push rbp
push rdi
push r14
push r15
lea rbp, [rsp - 0x3c8]
sub rsp, 0x4c8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x3b0], rax
mov r14, rdx
mov r15, rcx
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x50]
lea edx, [rdi + 0x28]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14000112b
lea rcx, str.___OpenProcessToken_Failed_n
call fcn.140001010
jmp 0x1400015cf
xor r9d, r9d
mov qword [rsp + 0x500], rbx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x4c0], rsi
mov rsi, qword [rsp + 0x50]
xor r8d, r8d
mov rcx, rsi
mov dword [rsp + 0x58], edi
lea edx, [r9 + 1]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001195
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140001195
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetTokenInformation_failed__error:__d_n
call fcn.140001010
lea rcx, str.___Error_while_getting_user_SID_n
call fcn.140001010
jmp 0x1400015bf
mov ebx, dword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x1400011dd
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, str.___Error_while_getting_user_SID_n
call fcn.140001010
jmp 0x1400015bf
mov r9d, dword [rsp + 0x58]
lea rax, [rsp + 0x58]
mov r8, rbx
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001218
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.___Error_while_getting_user_SID_n
call fcn.140001010
jmp 0x1400015bf
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x140001242
lea rcx, str.The_owner_SID_is_invalid._n
call fcn.140001010
lea rcx, str.___Error_while_getting_user_SID_n
call fcn.140001010
jmp 0x1400015bf
mov rcx, qword [rbx]
lea rdx, [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov rsi, qword [rsp + 0x60]
test rsi, rsi
jne 0x14000126b
lea rcx, str.___Error_while_getting_user_SID_n
call fcn.140001010
jmp 0x1400015bf
mov r9, r15
mov dword [rsp + 0x68], 1
lea r8, [0x140004610]
mov dword [rsp + 0x6c], 1
mov rdx, 0xffffffffffffffff
mov dword [rsp + 0x70], 3
lea rcx, [rbp + 0x1a0]
call fcn.140001600
lea r9, str.___
mov qword [rsp + 0x20], r14
lea r8, str._s_s
mov rdx, 0xffffffffffffffff
lea rcx, [rbp - 0x70]
call fcn.140001600
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rdx, [rbp + 0x1a0]
lea rax, [rsp + 0x60]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [rsp + 0x58], 1
mov ebx, eax
je 0x14000133f
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, ebx
lea rcx, str.RegCreateKeyEx_failed:_0x_x_n
call fcn.140001010
test ebx, ebx
je 0x140001431
mov edx, ebx
lea rcx, str.____Error_while_creating_registry_keys:_error_value__d_n
call fcn.140001010
jmp 0x1400015bf
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x60]
lea rdx, str.ImagePath
mov r9d, 2
xor r8d, r8d
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
mov ebx, eax
test eax, eax
jne 0x1400013e5
lea rax, [rsp + 0x68]
mov dword [rsp + 0x28], 4
lea r9d, [rbx + 4]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.Type
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
mov ebx, eax
test eax, eax
jne 0x1400013e5
lea rax, [rsp + 0x6c]
mov dword [rsp + 0x28], 4
lea r9d, [rbx + 4]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.ErrorControl
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
mov ebx, eax
test eax, eax
je 0x1400013fe
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, ebx
lea rcx, str.____Error_while_creating_registry_keys:_error_value__d_n
call fcn.140001010
jmp 0x1400015bf
lea rax, [rsp + 0x70]
mov dword [rsp + 0x28], 4
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.Start
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.___Enabling_SeLoadDriverPrivilege_n
call fcn.140001010
mov rbx, qword [rsp + 0x50]
lea r8, [rsp + 0x60]
lea rdx, str.SeLoadDriverPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14000147f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____LookupPrivilegeValue_error:__u_n
call fcn.140001010
lea rcx, str.____SeLoadDriverPrivilege_Failed_n
call fcn.140001010
jmp 0x1400015bf
mov rax, qword [rsp + 0x60]
lea r8, [rsp + 0x78]
mov qword [rsp + 0x28], rdi
mov r9d, 0x10
xor edx, edx
mov qword [rsp + 0x7c], rax
mov rcx, rbx
mov dword [rsp + 0x78], 1
mov dword [rbp - 0x7c], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400014e1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____AdjustTokenPrivileges_error:__u_n
call fcn.140001010
lea rcx, str.____SeLoadDriverPrivilege_Failed_n
call fcn.140001010
jmp 0x1400015bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x14000150b
lea rcx, str.____The_token_does_not_have_the_specified_privilege.__n
call fcn.140001010
lea rcx, str.____SeLoadDriverPrivilege_Failed_n
call fcn.140001010
jmp 0x1400015bf
lea rcx, str.___SeLoadDriverPrivilege_Enabled_n
call fcn.140001010
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtLoadDriver
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, str.ntdll.dll
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, [0x140004460]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea r9, str.RegistryUser_
mov qword [rsp + 0x28], r15
lea r8, str._s_s_s
mov qword [rsp + 0x20], rsi
mov rdx, 0xffffffffffffffff
lea rcx, [rbp - 0x70]
mov rbx, rax
call fcn.140001600
lea rdx, [rbp - 0x70]
lea rcx, str.___Loading_Driver:__s_n
call fcn.140001010
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x78]
call rbx
lea rcx, [rsp + 0x78]
call rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, ebx
lea rcx, str.NTSTATUS:__08x__WinError:__d_n
mov r8d, eax
call fcn.140001070
sar ebx, 0x1f
mov edi, ebx
mov rbx, qword [rsp + 0x500]
mov rsi, qword [rsp + 0x4c0]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rbp + 0x3b0]
xor rcx, rsp
call fcn.140002ad0
add rsp, 0x4c8
pop r15
pop r14
pop rdi
pop rbp
ret