Function at 0x140189560
Capabilities:
Parse pe header

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xb8
mov rax, qword [0x1402da2b0]
xor rax, rsp
mov qword [rbp - 9], rax
mov rsi, rdx
mov r15, rcx
mov qword [rbp - 0x21], rdx
mov qword [rbp - 0x19], r8
mov qword [rbp - 0x11], r9
movzx r14d, byte [rbp + 0x77]
mov byte [rsp + 0x30], r14b
mov rax, qword [rbp + 0x8f]
mov qword [rbp - 0x51], rax
mov rax, qword [rbp + 0x97]
mov qword [rbp - 0x49], rax
mov rax, qword [rdx]
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140189a0b
movsxd rdi, dword [rax + 0x3c]
add rdi, rax
cmp dword [rdi], 0x4550
jne 0x140189a0b
mov eax, 0x20b
cmp word [rdi + 0x18], ax
je 0x1401895f4
lea rdx, str.____Image_is_not_64_bit
jmp 0x140189a12
mov ebx, dword [rdi + 0x50]
mov edx, ebx
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r12, rax
test rax, rax
je 0x140189a2f
movzx eax, word [rdi + 0x14]
mov ecx, dword [rax + rdi + 0x24]
mov dword [rbp - 0x71], ecx
xor r13d, r13d
mov eax, r13d
test r14b, r14b
cmovne eax, ecx
mov dword [rbp - 0x61], eax
sub ebx, eax
mov qword [rbp - 0x59], r13
mov edx, ebx
mov qword [rbp - 0x69], rdx
cmp byte [rbp + 0x7f], r13b
je 0x140189657
lea r8, [rbp - 0x59]
mov rcx, r15
call fcn.1401891a0
mov r13, rax
jmp 0x140189731
test ebx, ebx
je 0x140189704
mov r8d, 8
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x140323710], eax
jle 0x1401896d7
lea rcx, [0x140323710]
call fcn.140217cb8
cmp dword [0x140323710], 0xffffffff
jne 0x1401896d3
lea rdx, str.ExAllocatePoolWithTag
lea rcx, [rbp - 0x41]
call fcn.14000c8b0
nop
lea r8, [rbp - 0x41]
mov rdx, qword [0x1402ebd98]
mov rcx, r15
call fcn.140187270
mov qword [0x140323780], rax
lea rcx, [rbp - 0x41]
call fcn.14000c7a0
nop
lea rcx, [0x140323710]
call fcn.140217c58
mov rdx, qword [rbp - 0x69]
cmp qword [0x140323780], 0
jne 0x140189714
lea rdx, str.____Failed_to_find_ExAllocatePool
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401876f0
mov rcx, rax
lea rdx, [0x140187900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov qword [rbp - 0x79], r13
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
jmp 0x140189932
mov qword [rbp - 0x79], r13
mov qword [rsp + 0x20], rdx
lea rdx, [rbp - 0x79]
mov rcx, r15
call fcn.1401882f0
test al, al
je 0x140189704
mov r13, qword [rbp - 0x79]
mov qword [rbp - 0x79], r13
test r13, r13
jne 0x140189746
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
jmp 0x140189932
lea rdx, str.___Image_base_has_been_allocated_at_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401876f0
mov rcx, rax
mov rdx, r13
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___void_const____ptr64____ptr64]
mov rcx, rax
lea rdx, [0x140187900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov r8d, dword [rdi + 0x54]
mov rdx, qword [rsi]
mov rcx, r12
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rdi + 0x14]
add rbx, 0x24
xor eax, eax
mov r14d, eax
cmp ax, word [rdi + 6]
jae 0x1401897cd
add rbx, rdi
nop word [rax + rax]
test dword [rbx + 0x18], 0x80
ja 0x1401897bd
mov ecx, dword [rbx]
add rcx, r12
mov r8d, dword [rbx + 4]
mov edx, dword [rbx + 8]
add rdx, qword [rsi]
call sub.VCRUNTIME140.dll_memcpy
inc r14d
add rbx, 0x28
movzx eax, word [rdi + 6]
cmp r14d, eax
jl 0x1401897a0
mov rbx, r13
cmp byte [rsp + 0x30], 0
je 0x14018982c
mov r14d, dword [rbp - 0x71]
sub r13, r14
lea rdx, str.___Skipped_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401876f0
mov rcx, rax
lea rdx, [0x1401133d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, r14d
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._bytes_of_PE_Header
call fcn.1401876f0
mov rcx, rax
lea rdx, [0x140187900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rdx, r12
lea rcx, [rbp - 0x41]
call fcn.14018a870
mov rdx, r13
sub rdx, qword [rdi + 0x30]
mov rcx, rax
call fcn.140189a60
mov rdx, r12
lea rcx, [rbp - 0x41]
call fcn.14018aaa0
mov rdx, rax
mov rcx, r15
call fcn.140189b40
test al, al
jne 0x14018986e
lea rdx, str.____Failed_to_resolve_imports
jmp 0x140189932
mov r8d, dword [rbp - 0x61]
add r8, r12
mov r9, qword [rbp - 0x69]
mov rdx, rbx
mov rcx, r15
call fcn.140186cc0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
test al, al
jne 0x14018989b
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x140189939
mov edi, dword [rdi + 0x28]
add rdi, r13
lea rdx, str.____Calling_DriverEntry_0x
call fcn.1401876f0
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___void_const____ptr64____ptr64]
mov rcx, rax
lea rdx, [0x140187900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rax, qword [rbp - 0x51]
mov r14, qword [rbp - 0x59]
test rax, rax
je 0x1401898f9
mov qword [rsp + 0x20], r14
mov r9, qword [rbp - 0x69]
mov r8, rbx
lea rdx, [rbp - 0x11]
lea rcx, [rbp - 0x19]
call rax
test al, al
jne 0x1401898f9
lea rdx, str.____Callback_returns_false__failed_
jmp 0x140189932
mov dword [rbp - 0x71], 0
mov r9, qword [rbp - 0x19]
cmp byte [rbp + 0x87], 0
cmovne r9, rbx
mov rax, qword [rbp - 0x11]
mov qword [rsp + 0x20], rax
mov r8, rdi
lea rdx, [rbp - 0x71]
mov rcx, r15
call fcn.140189e00
test al, al
jne 0x140189970
lea rdx, str.____Failed_to_call_driver_entry
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401876f0
lea rdx, [0x140187900]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rbp - 0x79]
mov rcx, r15
call fcn.140187190
jmp 0x140189a2f
mov edi, dword [rbp - 0x71]
mov rax, qword [rbp - 0x49]
test rax, rax
je 0x14018997e
mov dword [rax], edi
lea rdx, str.___DriverEntry_returned_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401876f0
mov rcx, rax
lea rdx, [0x1401133d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
mov rcx, rax
lea rdx, [0x140187900]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
cmp byte [rbp + 0x6f], 0
je 0x1401899ec
mov rdx, rbx
mov rcx, r15
cmp byte [rbp + 0x7f], 0
je 0x1401899e7
mov r8, r14
call fcn.140186fb0
mov rdx, r14
mov rcx, r15
call fcn.1401870b0
mov rdx, r14
mov rcx, r15
call fcn.140187190
xor edx, edx
mov r8d, 0x8000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
nop
mov rcx, rsi
call fcn.1401235a0
mov rax, rbx
jmp 0x140189a39
lea rdx, str.____Invalid_format_of_PE_image
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401876f0
lea rdx, [0x140187900]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
mov rcx, rsi
call fcn.1401235a0
xor eax, eax
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140217b10
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret