Function at 0x140004300
Capabilities:
Get process image filename
Get token privileges

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x850]
sub rsp, 0x950
mov rax, qword [0x14000b008]
xor rax, rsp
mov qword [rbp + 0x840], rax
xor esi, esi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x38], rsi
call fcn.1400016a0
mov r15d, eax
lea ecx, [rsi + 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__isatty]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rsp + 0x30], 0xffffffff
lea rdx, [rsp + 0x30]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov byte [0x14000b160], sil
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
call fcn.140001420
mov r8d, edi
xor edx, edx
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
mov r8d, 0x1f4
lea rdx, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_K32GetProcessImageFileNameW]
mov ebx, eax
test eax, eax
je 0x1400043f5
lea rdx, [rbx*2 + 2]
lea ecx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
lea rdx, [rbx + 1]
lea r8, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x38]
mov ecx, edi
call fcn.1400017b0
mov r8d, edi
lea rdx, str._PID:__d_n
lea r13, [0x14000b160]
mov rcx, r13
call fcn.140005150
mov rbx, qword [rsp + 0x40]
mov r9, rbx
mov r8, r13
lea rdx, str._s_User:__S_n
mov rcx, r13
call fcn.140005150
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, r13
lea rdx, str._s_d_S_n
mov rcx, r13
call fcn.140005150
mov rbx, qword [rsp + 0x50]
mov r9, rbx
mov r8, r13
lea rdx, str._s_Domain:__S_n
mov rcx, r13
call fcn.140005150
mov qword [rsp + 0x20], rbx
mov r9d, 2
mov r8, r13
lea rdx, str._s_d_S_n
mov rcx, r13
call fcn.140005150
mov r9d, r12d
mov r8, r13
lea rdx, str._s_TTY:__d_n
mov rcx, r13
call fcn.140005150
mov dword [rsp + 0x20], r12d
mov r9d, 3
mov r8, r13
lea rdx, str._s_d_d_n
mov rcx, r13
call fcn.140005150
mov r9d, r15d
mov r8, r13
lea rdx, str._s_IL:__d_n
mov rcx, r13
call fcn.140005150
mov dword [rsp + 0x20], r15d
mov r9d, 4
mov r8, r13
lea rdx, str._s_d_d_n
mov rcx, r13
call fcn.140005150
mov ebx, dword [rsp + 0x30]
mov r9d, ebx
mov r8, r13
lea rdx, str._s_Session_ID:__d_n
mov rcx, r13
call fcn.140005150
mov dword [rsp + 0x20], ebx
mov r9d, 0x10
mov r8, r13
lea rdx, str._s_d_d_n
mov rcx, r13
call fcn.140005150
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call fcn.140001910
mov ebx, eax
mov r8, r13
lea rdx, str._s_n_Parent_processes_CmdLines_n_____________________________n
mov rcx, r13
call fcn.140005150
test ebx, ebx
je 0x1400045b3
nop dword [rax]
mov qword [rsp + 0x40], rsi
lea rdx, [rsp + 0x40]
mov ecx, ebx
call fcn.1400017b0
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x1400045b3
mov qword [rsp + 0x20], rdi
mov r9d, ebx
mov r8, r13
lea rdx, str._s_PID:__d__CMDLINE:__S_n
mov rcx, r13
call fcn.140005150
mov qword [rsp + 0x20], rdi
mov r9d, 8
mov r8, r13
lea rdx, str._s_d_S_n
mov rcx, r13
call fcn.140005150
mov ecx, ebx
call fcn.140001910
cmp eax, ebx
je 0x1400045b3
mov ebx, eax
test eax, eax
jne 0x140004550
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call fcn.140001910
mov edi, eax
mov r8, r13
lea rdx, str._s_n_Parent_processes_executables_n_____________________________n
mov rcx, r13
call fcn.140005150
test edi, edi
je 0x140004691
nop dword [rax]
mov rbx, rsi
mov r8d, edi
xor edx, edx
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r15, rax
mov r8d, 0x1f4
lea rdx, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_K32GetProcessImageFileNameW]
mov r14d, eax
test eax, eax
je 0x140004637
lea rdx, [r14*2 + 2]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
lea rdx, [r14 + 1]
lea r8, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x140004691
mov qword [rsp + 0x20], rbx
mov r9d, edi
mov r8, r13
lea rdx, str._s_PID:__d__EXEImage:__S_n
mov rcx, r13
call fcn.140005150
mov qword [rsp + 0x20], rbx
mov r9d, 9
mov r8, r13
lea rdx, str._s_d_S_n
mov rcx, r13
call fcn.140005150
mov ecx, edi
call fcn.140001910
cmp eax, edi
je 0x140004691
mov edi, eax
test eax, eax
jne 0x1400045e0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x38]
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140004793
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 3]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x30]
mov r8, rdi
mov edx, 3
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140004715
lea rcx, str.ERR:_GetTokenInformation__
call fcn.140001020
jmp 0x140004793
mov r8, r13
lea rdx, str._s_n_Token_Privileges_n______________________________________n
mov rcx, r13
call fcn.140005150
mov ebx, esi
cmp dword [rdi], ebx
jbe 0x140004793
nop dword [rax]
mov dword [rsp + 0x50], 0x3e8
mov eax, ebx
lea rcx, [rax*2 + 1]
add rcx, rax
lea rdx, [rdi + rcx*4]
lea r9, [rsp + 0x50]
lea r8, [rbp + 0x70]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
jne 0x14000476c
lea rcx, str.ERR:_LookupPrivilegeNameW__
call fcn.140001020
jmp 0x14000478d
lea rax, [rbp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0xe
mov r8, r13
lea rdx, str._s_d_S_n
mov rcx, r13
call fcn.140005150
inc ebx
cmp ebx, dword [rdi]
jb 0x140004730
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x38]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1400047c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._nOpen_Current_Process_Token_failed:_d
call fcn.140001080
jmp 0x1400048e7
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x27]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400048e7
mov edx, dword [rsp + 0x30]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
je 0x1400048e7
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x30]
mov r8, r14
mov edx, 0x27
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1400048de
mov r8, r13
lea rdx, str._s_n_Token_Security_Attributes_n______________________________________n
mov rcx, r13
call fcn.140005150
cmp dword [r14 + 4], esi
jbe 0x1400048de
nop
mov eax, esi
lea rcx, [rax + rax*4]
mov rax, qword [r14 + 8]
lea rbx, [rax + rcx*8]
movzx edx, word [rbx]
add rdx, 2
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
movups xmm0, xmmword [rbx]
movaps xmmword [rsp + 0x40], xmm0
movzx edx, word [rbx]
add rdx, 2
lea r9, [rsp + 0x40]
lea r8, [0x140007a78]
mov rcx, rax
call fcn.140003bf0
movups xmm0, xmmword [rbx]
movaps xmmword [rsp + 0x50], xmm0
lea r9, [rsp + 0x50]
mov r8, r13
lea rdx, str._s_TSA:__wZ_n
mov rcx, r13
call fcn.140005150
mov qword [rsp + 0x20], rdi
mov r9d, 0xa
mov r8, r13
lea rdx, str._s_d_S_n
mov rcx, r13
call fcn.140005150
inc esi
cmp esi, dword [r14 + 4]
jb 0x140004850
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
lea rdx, str.FlagInABox.conf
lea rcx, [rsp + 0x60]
call fcn.140004e10
nop
cmp qword [rbp - 0x18], 0
je 0x140004966
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [r8 + r13], 0
jne 0x140004920
mov rdx, r13
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea rcx, [rsp + 0x68]
call fcn.1400037a0
test rax, rax
jne 0x140004966
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
lea rcx, [rsp + 0x60]
call fcn.140004240
mov rcx, qword [rbp + 0x840]
xor rcx, rsp
call fcn.140005220
lea r11, [rsp + 0x950]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret