Function at 0x140162010
Capabilities:
Check if file exists
Create pipe
Create process on windows
Get common file path
Get file attributes
Write and execute a file
Write file on windows
Write pipe

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, reloc.MFC80U.DLL_Ordinal_768
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + reloc.MFC80U.DLL_Ordinal_752], rax
mov rsi, rcx
call fcn.140049470
mov rbx, rax
xor edx, edx
mov r8d, 0x80
lea r15, [0x140c47de0]
mov rcx, r15
call sub.ntdll.dll_memset
mov edx, 0x5c
lea rcx, [0x1403627e8]
call qword [sym.imp.ntdll.dll_strrchr]
mov rdi, rax
xor r14d, r14d
test rax, rax
jne 0x140162094
mov r8, r14
jmp 0x140162123
mov byte [rsp + 0x1c0], r14b
xor eax, eax
mov qword [rsp + 0x1c1], rax
mov word [rsp + 0x1c9], ax
mov byte [rsp + 0x1cb], al
lea r8d, [rax + 0x57]
lea rdx, [0x140362910]
lea rcx, [rsp + 0x1c0]
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, r15
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
mov byte [rcx + rdx], al
add rdx, 1
test al, al
jne 0x1401620e0
mov rdi, r15
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
lea rdx, [rsp + 0x1c0]
xor ecx, ecx
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx - 1], al
add rcx, 1
test al, al
jne 0x140162110
mov r8, r15
mov rax, qword [rbx]
lea rdx, str._s_Begin_load_inf
mov rcx, rbx
call qword [rax + 0x10]
mov byte [rsp + 0x1e0], r14b
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x1e1]
call sub.ntdll.dll_memset
mov edx, 0x104
lea rcx, [rsp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x1401627a0
lea rdx, [rsp + 0x1e0]
lea rcx, [rsp + 0x148]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const____ptr64____ptr64]
nop
lea rdx, [rsp + 0x1e0]
lea rcx, [rsp + 0x170]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const____ptr64____ptr64]
nop
lea rdx, str._system32drvload.exe
lea rcx, [rsp + 0x148]
call qword [sym.imp.MSVCP80.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__::operator_char_const____ptr64____ptr64]
lea rdx, str._system32wpeinit.exe
lea rcx, [rsp + 0x170]
call qword [sym.imp.MSVCP80.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__::operator_char_const____ptr64____ptr64]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_336]
cmp qword [rsp + 0x168], 0x10
cmovae rcx, qword [rsp + reloc.MFC80U.DLL_Ordinal_336]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14016220c
lea rcx, [rsp + 0x170]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x148]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
xor eax, eax
jmp 0x1401627a0
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], r14
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.140161ec0
lea rdx, [rsp + 0x148]
lea rcx, [rsp + 0x198]
call qword [sym.imp.MSVCP80.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]
nop
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rsp + 0xb0]
call sub.ntdll.dll_memset
mov dword [rsp + 0xb0], 0x68
mov dword [rsp + 0xec], 1
mov word [rsp + 0xf0], 0
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_376]
cmp qword [rsp + 0x190], 0x10
cmovae rdx, qword [rsp + reloc.MFC80U.DLL_Ordinal_376]
lea rax, [rsp + 0x88]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, 1
jne 0x1401622eb
lea rcx, str.Running_wpeinit..._n
call qword [sym.imp.MSVCR80.dll_printf]
or edx, 0xffffffff
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, str.Driver_loading..._n
call qword [sym.imp.MSVCR80.dll_printf]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x140162387
lea rcx, [rsp + 0x198]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
nop
mov rdi, qword [rsp + 0x58]
test rdi, rdi
je 0x140162354
mov rbx, qword [rsp + 0x60]
cmp rdi, rbx
je 0x14016234c
mov rcx, rdi
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
add rdi, 0x28
cmp rdi, rbx
jne 0x140162335
mov rdi, qword [rsp + 0x58]
mov rcx, rdi
call sub.MFC80U.DLL_Ordinal_776
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], r14
lea rcx, [rsp + 0x170]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x148]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
xor eax, eax
jmp 0x1401627a0
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x100], rax
mov r12, r14
mov r13, r14
movabs rbx, 0x6666666666666667
nop
nop
nop
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x140162711
mov rcx, qword [rsp + 0x60]
sub rcx, rax
mov rax, rbx
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp r12, rdx
jae 0x140162711
lea rdx, [rsp + 0x198]
lea rcx, [rsp + 0x120]
call qword [sym.imp.MSVCP80.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]
nop
lea rdx, [0x1403627d4]
lea rcx, [rsp + 0x120]
call qword [sym.imp.MSVCP80.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__::operator_char_const____ptr64____ptr64]
mov rdi, qword [rsp + 0x58]
test rdi, rdi
je 0x14016243a
mov rcx, qword [rsp + 0x60]
sub rcx, rdi
mov rax, rbx
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp r12, rdx
jb 0x140162445
call qword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov rdi, qword [rsp + 0x58]
lea rdx, [r13 + rdi]
lea rcx, [rsp + 0x120]
call qword [reloc.MSVCP80.dll___Y__basic_string_DU__char_traits_D_std__V__allocator_D_2__std__QEAAAEAV01_AEBV01__Z]
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_296]
cmp qword [rsp + reloc.MFC80U.DLL_Ordinal_320], 0x10
cmovae rdx, qword [rsp + reloc.MFC80U.DLL_Ordinal_296]
lea rax, [rsp + 0x88]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1401625ba
call fcn.140049470
mov rsi, rax
lea rbx, [rsp + reloc.MFC80U.DLL_Ordinal_296]
cmp qword [rsp + reloc.MFC80U.DLL_Ordinal_320], 0x10
cmovae rbx, qword [rsp + reloc.MFC80U.DLL_Ordinal_296]
xor edx, edx
mov r8d, 0x80
mov rcx, r15
call sub.ntdll.dll_memset
mov edx, 0x5c
lea rcx, [0x140362888]
call qword [sym.imp.ntdll.dll_strrchr]
mov rdi, rax
test rax, rax
jne 0x14016250a
mov r8, r14
jmp 0x140162593
mov byte [rsp + 0x1c0], 0
xor eax, eax
mov qword [rsp + 0x1c1], rax
mov word [rsp + 0x1c9], ax
mov byte [rsp + 0x1cb], al
mov r8d, 0x8c
lea rdx, [0x140362910]
lea rcx, [rsp + 0x1c0]
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, r15
sub rcx, rdx
movzx eax, byte [rdx]
mov byte [rcx + rdx], al
add rdx, 1
test al, al
jne 0x140162550
mov rdi, r15
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
lea rdx, [rsp + 0x1c0]
xor ecx, ecx
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx - 1], al
add rcx, 1
test al, al
jne 0x140162580
mov r8, r15
mov rax, qword [rsi]
mov r9, rbx
lea rdx, str._s_command:_s_fail
mov rcx, rsi
call qword [rax + 0x10]
nop
lea rcx, [rsp + 0x120]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
jmp 0x1401626fa
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x80]
mov r8d, 4
lea rdx, [0x1403627e4]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, eax
call fcn.140049470
mov rbx, rax
lea rsi, [rsp + reloc.MFC80U.DLL_Ordinal_296]
cmp qword [rsp + reloc.MFC80U.DLL_Ordinal_320], 0x10
cmovae rsi, qword [rsp + reloc.MFC80U.DLL_Ordinal_296]
xor edx, edx
mov r8d, 0x80
mov rcx, r15
call sub.ntdll.dll_memset
mov edx, 0x5c
lea rcx, str..PeInstallDriverPeInstatllDriver.cpp
call qword [sym.imp.ntdll.dll_strrchr]
mov rdi, rax
test rax, rax
jne 0x140162635
mov r8, r14
jmp 0x1401626c3
mov byte [rsp + 0x1d0], 0
xor eax, eax
mov qword [rsp + 0x1d1], rax
mov word [rsp + 0x1d9], ax
mov byte [rsp + 0x1db], al
mov r8d, 0x93
lea rdx, [0x140362910]
lea rcx, [rsp + 0x1d0]
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, r15
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
mov byte [rcx + rdx], al
add rdx, 1
test al, al
jne 0x140162680
mov rdi, r15
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
lea rdx, [rsp + 0x1d0]
xor ecx, ecx
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx - 1], al
add rcx, 1
test al, al
jne 0x1401626b0
mov r8, r15
mov rax, qword [rbx]
mov dword [rsp + 0x20], ebp
mov r9, rsi
lea rdx, str._s_command:_s_ok__write_pipe:_d
mov rcx, rbx
call qword [rax + 0x10]
or edx, 0xffffffff
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
lea rcx, [rsp + 0x120]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
add r12, 1
add r13, 0x28
movabs rbx, 0x6666666666666667
jmp 0x1401623b0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rsp + 0x198]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
nop
mov rdi, qword [rsp + 0x58]
test rdi, rdi
je 0x14016276f
mov rbx, qword [rsp + 0x60]
cmp rdi, rbx
je 0x140162767
nop
nop
mov rcx, rdi
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
add rdi, 0x28
cmp rdi, rbx
jne 0x140162750
mov rdi, qword [rsp + 0x58]
mov rcx, rdi
call sub.MFC80U.DLL_Ordinal_776
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], r14
lea rcx, [rsp + 0x170]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x148]
call qword [sym.imp.MSVCP80.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
mov eax, 1
mov rcx, qword [rsp + reloc.MFC80U.DLL_Ordinal_752]
xor rcx, rsp
call fcn.140161080
lea r11, [rsp + reloc.MFC80U.DLL_Ordinal_768]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret