Function at 0x140004a90
Capabilities:
Create process on windows

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 - 0xb0]
sub rsp, 0x1b0
mov rax, qword [0x140012040]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov rbx, r8
mov rdi, rdx
xor esi, esi
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
jne 0x140004b05
lea rdx, str.No_active_user_session_found.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400023a0
lea rdx, [0x140004850]
mov rcx, rax
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
jmp 0x14000514d
mov qword [rbp - 0x60], rsi
lea rdx, [rbp - 0x60]
mov ecx, eax
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x140004b42
lea rdx, str.Failed_to_query_user_token:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400023a0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
jmp 0x140004aee
mov qword [rbp - 0x58], rsi
lea rax, [rbp - 0x58]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 1
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x140004bbb
lea rdx, str.Failed_to_duplicate_token_with_admin_privileges:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400023a0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140004850]
mov rcx, rax
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x14000514d
cmp qword [rdi + 0x18], 0xf
jbe 0x140004bce
mov r8, qword [rdi]
add r8, qword [rdi + 0x10]
mov rdi, qword [rdi]
jmp 0x140004bd5
mov r8, qword [rdi + 0x10]
add r8, rdi
mov rdx, rdi
lea rcx, [rbp + 0x80]
call fcn.140005340
nop
cmp qword [rbx + 0x18], 0xf
jbe 0x140004bf8
mov r8, qword [rbx]
add r8, qword [rbx + 0x10]
mov rbx, qword [rbx]
jmp 0x140004bff
mov r8, qword [rbx + 0x10]
add r8, rbx
mov rdx, rbx
lea rcx, [rbp + 0x60]
call fcn.140005340
nop
movabs rcx, 0x7ffffffffffffffe
mov rax, rcx
mov rsi, qword [rbp + 0x90]
sub rax, rsi
cmp rax, 1
jb 0x140005183
lea r12, [rbp + 0x80]
mov r14, qword [rbp + 0x80]
mov r13, qword [rbp + 0x98]
cmp r13, 7
cmova r12, r14
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
lea r15, [rsi + 1]
mov edi, 7
lea rbx, [rsp + 0x60]
cmp r15, rdi
jbe 0x140004d01
mov rdi, r15
or rdi, 7
cmp rdi, rcx
jbe 0x140004cc0
mov rdi, rcx
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
cmp rcx, 0x1000
jb 0x140004cf4
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14000517d
mov rcx, rax
call fcn.14000a9d0
test rax, rax
je 0x140004ced
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x140004cfc
mov eax, 0xa
cmp rdi, rax
cmovb rdi, rax
lea rcx, [rdi + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x14000517d
add rcx, rcx
jne 0x140004c8f
mov rbx, rcx
jmp 0x140004cfc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000a9d0
mov rbx, rax
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], rdi
mov word [rbx], 0x22
lea rcx, [rbx + 2]
lea r8, [rsi + rsi]
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
xor eax, eax
mov word [rbx + r15*2], ax
mov rcx, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
mov rax, rdx
sub rax, rcx
cmp rax, 2
jb 0x140004d6a
lea rax, [rcx + 2]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x60]
cmp rdx, 7
cmova rax, qword [rsp + 0x60]
mov dword [rax + rcx*2], 0x200022
xor ebx, ebx
mov word [rax + rcx*2 + 4], bx
lea rax, [rsp + 0x60]
jmp 0x140004d8b
mov qword [rsp + 0x20], 2
lea r9, [0x14000d914]
mov edx, 2
lea rcx, [rsp + 0x60]
call fcn.140005490
xor ebx, ebx
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x80], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x70], xmm1
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 7
mov word [rax], bx
lea r9, [rbp + 0x60]
mov rdi, qword [rbp + 0x60]
mov r15, qword [rbp + 0x78]
cmp r15, 7
cmova r9, rdi
mov r12, qword [rbp - 0x70]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
sub rax, r12
mov rsi, qword [rbp + 0x70]
cmp rsi, rax
ja 0x140004e1a
lea rax, [rsi + r12]
mov qword [rbp - 0x70], rax
lea rbx, [rbp - 0x80]
cmp rcx, 7
cmova rbx, qword [rbp - 0x80]
lea rcx, [rbx + r12*2]
lea r8, [rsi + rsi]
mov rdx, r9
call sub.VCRUNTIME140.dll_memmove
lea rax, [rsi + r12]
xor ecx, ecx
mov word [rbx + rax*2], cx
lea rax, [rbp - 0x80]
xor ebx, ebx
jmp 0x140004e33
mov qword [rsp + 0x20], rsi
mov rdx, rsi
lea rcx, [rbp - 0x80]
call fcn.140005490
mov r15, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x60]
xorps xmm0, xmm0
movups xmmword [rbp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x50], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x50], xmm1
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 7
mov word [rax], bx
mov rdx, qword [rbp - 0x68]
cmp rdx, 7
jbe 0x140004ea3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004e9e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004e9e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000aa0c
movdqa xmm0, xmmword [0x14000dfa0]
movdqu xmmword [rbp - 0x70], xmm0
mov word [rbp - 0x80], bx
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x140004f01
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004ef4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004ef4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000aa0c
movdqa xmm0, xmmword [0x14000dfa0]
movdqu xmmword [rsp + 0x70], xmm0
mov word [rsp + 0x60], bx
mov dword [rbp - 0x30], 0x68
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
movups xmmword [rbp - 0x18], xmm0
movups xmmword [rbp - 8], xmm0
movups xmmword [rbp + 8], xmm0
movups xmmword [rbp + 0x18], xmm0
movups xmmword [rbp + 0x28], xmm0
xor eax, eax
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], rax
lea rax, str.winsta0default
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x50], rbx
xor r8d, r8d
mov rdx, qword [rbp - 0x58]
lea rcx, [rbp - 0x50]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x140004f98
lea rdx, str.Failed_to_create_environment_block:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400023a0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140004850]
mov rcx, rax
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x14000502b
lea r8, [rbp + 0x40]
cmp qword [rbp + 0x58], 7
cmova r8, qword [rbp + 0x40]
lea rax, [rbp - 0x48]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rbx
mov rax, qword [rbp - 0x50]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x400
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor edx, edx
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x140005043
lea rdx, str.Failed_to_create_process_as_administrator:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400023a0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
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__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140004850]
mov rcx, rax
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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
jmp 0x140005077
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
mov rdx, qword [rbp + 0x58]
cmp rdx, 7
jbe 0x1400050ba
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400050b5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400050b5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000aa0c
movdqa xmm0, xmmword [0x14000dfa0]
movdqu xmmword [rbp + 0x50], xmm0
xor eax, eax
mov word [rbp + 0x40], ax
cmp r15, 7
jbe 0x14000510c
lea rdx, [r15*2 + 2]
mov rax, rdi
cmp rdx, 0x1000
jb 0x140005103
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005103
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.14000aa0c
nop
cmp r13, 7
jbe 0x14000514a
lea rdx, [r13*2 + 2]
mov rax, r14
cmp rdx, 0x1000
jb 0x140005142
add rdx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005142
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r14
call fcn.14000aa0c
movzx eax, bl
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.14000a9b0
lea r11, [rsp + 0x1b0]
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
call fcn.140001140
nop
call fcn.1400011e0
int3