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

Disassembly:
push rdi
mov eax, 0x1780
call fcn.140012790
sub rsp, rax
xor eax, eax
cmp eax, 1
je 0x140005d35
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, [0x140205a68]
call fcn.14000d9b0
mov rcx, qword [rsp + 0x78]
mov r8, rcx
lea rdx, [rsp + 0x180]
mov rcx, rax
call fcn.140005890
movsxd rax, dword [rsp + 0x5c]
mov qword [rsp + 0x80], rax
lea rcx, [0x140205a88]
call fcn.14000d9b0
mov rcx, qword [rsp + 0x80]
mov r8, rcx
lea rdx, [rsp + 0x130]
mov rcx, rax
call fcn.140005890
lea r8, [rsp + 0x130]
lea rdx, [rsp + 0x180]
lea rcx, [rsp + 0x3a0]
call fcn.1400035f0
mov r8d, 0x1b8800
lea rdx, [0x14004c020]
lea rcx, [rsp + 0x3a0]
call fcn.140003790
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.140002d50
mov r8d, 1
lea rdx, str.SeDebugPrivilege
mov rcx, qword [rsp + 0x68]
call fcn.140002d50
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.140005d50
lea rcx, [rsp + 0xb8]
call fcn.14000d9d0
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.14000d9d0
mov ecx, dword [rsp + 0x60]
mov r8d, ecx
lea rdx, [rsp + 0x570]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [0x140037b1c]
mov r8d, 0x1b8800
lea rdx, [rsp + 0x570]
lea rcx, [0x14004c020]
call fcn.140002f90
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.140008540
lea rax, [rsp + 0x51]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0x98]
call fcn.140010650
mov qword [rsp + 0x88], rax
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x51]
call fcn.140005dc0
mov rcx, rax
call fcn.140009fd0
mov r8, 0xffffffffffffffff
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.14000f1a0
inc rax
mov rcx, qword [rsp + 0x88]
mov r9, rcx
mov r8, rax
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x98]
call fcn.1400107d0
lea rcx, [rsp + 0x54]
call fcn.140009770
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.140005e00
mov rcx, rax
call fcn.140009ff0
mov r8d, 0x104
lea rdx, [rsp + 0x290]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rsp + 0xd8]
call fcn.1400097b0
lea rax, [rsp + 0x53]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rcx, [rsp + 0xf0]
call fcn.14000d9b0
mov qword [rsp + 0x90], rax
lea rdx, [rsp + 0x240]
lea rcx, [rsp + 0x53]
call fcn.140005ea0
mov rcx, rax
call fcn.14000a010
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.140010f60
lea rcx, [rsp + 0x240]
call fcn.1400097f0
mov r8d, 0x68
xor edx, edx
lea rcx, [rsp + 0x1d0]
call fcn.1400138a0
mov dword [rsp + 0x1d0], 0x68
mov r8d, 0x18
xor edx, edx
lea rcx, [rsp + 0x110]
call fcn.1400138a0
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
call fcn.140001840
mov dword [rsp + 0x64], 0
lea rcx, [rsp + 0xf0]
call fcn.140009620
lea rcx, [rsp + 0x98]
call fcn.140009620
lea rcx, [rsp + 0xb8]
call fcn.140009650
mov eax, dword [rsp + 0x64]
add rsp, 0x1780
pop rdi
ret