Function at 0x10021da0
Capabilities:
Create process on windows
Query environment variable

Disassembly:
mov r11, rsp
sub rsp, 0x528
mov rax, qword [0x10050650]
mov qword [rsp + 0x4d0], rax
mov rax, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov qword [r11 - 8], rbx
mov rbx, qword [rdx + 8]
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov rsi, qword [r8 + 8]
mov qword [r11 - 0x20], rdi
mov rdi, qword [rcx + 8]
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
xor r13d, r13d
test rsi, rsi
cmove rsi, rax
mov qword [r11 - 0x38], r14
test rbx, rbx
mov qword [r11 - 0x40], r15
mov r15, rdx
mov r14, rcx
cmove rbx, rax
lea rdx, [0x100414d8]
lea rcx, [rsp + 0x30]
test rdi, rdi
mov qword [rsp + 0x38], r9
mov rbp, r8
cmove rdi, rax
mov r12d, r13d
call fcn.10024b50
lea rdx, str._comm__shell_exec__s___s___s_.
mov r9, rbx
mov r8, rdi
mov rcx, rax
mov qword [rsp + 0x20], rsi
call fcn.10024c50
lea rcx, [rsp + 0x40]
mov rdx, r14
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const____ptr64____ptr64]
lea rcx, [rsp + 0xd1]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0xd0], r12b
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0xd0]
test rcx, rcx
mov r8d, 0x400
cmove rcx, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov r8, qword [sym.imp.msvcp60.dll_unsigned_long_long_unsigned___int64__const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea rcx, [rsp + 0x40]
mov r8, qword [r8]
xor edx, edx
call qword [sym.imp.msvcp60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::erase_unsigned_long_long_unsigned___int64___unsigned_long_long_unsigned___int64_____ptr64]
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0x40]
call qword [sym.imp.msvcp60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const____ptr64____ptr64]
lea r8d, [r13 + 0x6c]
lea rcx, [rsp + 0x64]
xor edx, edx
call sub.msvcrt.dll_memset
mov rcx, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov rax, qword [rsp + 0x48]
test rax, rax
mov dword [rsp + 0x60], reloc.WS2_32.dll_WSASetLastError
mov dword [rsp + 0x64], 0x40
cmove rax, rcx
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x78], rax
mov rax, qword [r15 + 8]
mov dword [rsp + 0x90], 5
test rax, rax
mov qword [rsp + 0x98], r13
cmove rax, rcx
mov qword [rsp + 0x80], rax
mov rax, qword [rbp + 8]
test rax, rax
cmove rax, rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x88], rax
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x1002209c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
mov r12d, eax
jne 0x10022039
mov rax, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov rsi, qword [rbp + 8]
mov rbx, qword [r15 + 8]
mov rdi, qword [r14 + 8]
test rsi, rsi
lea rdx, [0x10041508]
cmove rsi, rax
test rbx, rbx
lea rcx, [rsp + 0x30]
cmove rbx, rax
test rdi, rdi
cmove rdi, rax
call fcn.10024b50
lea rdx, str._comm__shell_exec__s___s___s__returns_SE_ERR_ACCESSDENIED__now_use_runas
mov r9, rbx
mov r8, rdi
mov rcx, rax
mov qword [rsp + 0x20], rsi
call fcn.10024c50
lea rdx, str.runas
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x70], rdx
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x1002209c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rbp, qword [rbp + 8]
mov rsi, qword [r15 + 8]
mov rbx, qword [r14 + 8]
mov r12d, eax
mov rax, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test rbp, rbp
mov ecx, r12d
cmove rbp, rax
test rsi, rsi
cmove rsi, rax
test rbx, rbx
cmove rbx, rax
call fcn.1001f320
lea rdx, [0x10041570]
lea rcx, [rsp + 0x30]
mov rdi, rax
call fcn.10024b50
lea rdx, [0x10041578]
mov r9, rsi
mov r8, rbx
mov rcx, rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rbp
call fcn.10024c50
jmp 0x1002209c
mov rax, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov rbp, qword [rbp + 8]
mov rsi, qword [r15 + 8]
mov rbx, qword [r14 + 8]
test rbp, rbp
mov ecx, r12d
cmove rbp, rax
test rsi, rsi
cmove rsi, rax
test rbx, rbx
cmove rbx, rax
call fcn.1001f320
lea rdx, [0x100415a8]
lea rcx, [rsp + 0x30]
mov rdi, rax
call fcn.10024b50
lea rdx, str._comm__shell_exec__s___s___s__failed:__s
mov r9, rsi
mov r8, rbx
mov rcx, rax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rbp
call fcn.10024c50
mov rbp, qword [rsp + 0x38]
mov r15, qword [rsp + 0x4e8]
mov r14, 0xffffffffffffffff
test rbp, rbp
je 0x1002211e
mov rsi, qword [rsp + 0xc8]
test rsi, rsi
je 0x1002211e
lea rdx, [0x100414b8]
mov rbx, r13
test rdx, rdx
je 0x100220ef
xor eax, eax
mov rcx, r14
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x100220ef
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
lea rdx, str.GetProcessId
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1002210c
mov rcx, rsi
call rax
mov r13d, eax
test rbx, rbx
je 0x1002211a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [rbp], r13d
lea rcx, [rsp + 0x40]
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
mov r13, qword [rsp + 0x4f8]
mov rdi, qword [rsp + 0x508]
mov rsi, qword [rsp + 0x510]
mov rbp, qword [rsp + 0x518]
mov rbx, qword [rsp + 0x520]
test r12d, r12d
cmove r12d, r14d
mov r14, qword [rsp + 0x4f0]
mov eax, r12d
mov r12, qword [rsp + 0x500]
mov rcx, qword [rsp + 0x4d0]
call fcn.1003b040
add rsp, 0x528
ret