Function at 0x140008830
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x140022010]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov r14, rdx
mov r13, rcx
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0x58], rax
xor esi, esi
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x70], rsi
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x140008ca1
movsxd rdi, dword [rdx + 0x3c]
add rdi, rdx
cmp dword [rdi], 0x4550
jne 0x140008ca1
mov eax, 0x20b
cmp word [rdi + 0x18], ax
je 0x1400088b0
lea rdx, str.____Image_is_not_64_bit
jmp 0x140008ca8
mov r12d, dword [rdi + 0x50]
mov r9d, 4
mov r8d, 0x3000
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x140008cc4
test r12, r12
je 0x1400089de
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x140022c70], eax
jle 0x1400089b1
lea rcx, [0x140022c70]
call fcn.14000e7a0
cmp dword [0x140022c70], 0xffffffff
jne 0x1400089b1
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], 0xf
mov byte [rsp + 0x38], 0
mov r8d, 0x1a
lea rdx, [0x140012138]
lea rcx, [rsp + 0x38]
call fcn.1400066e0
nop
lea r8, [rsp + 0x38]
mov rdx, qword [0x140022bd8]
mov rcx, r13
call fcn.140002f20
mov qword [0x140022c48], rax
mov rdx, qword [rsp + 0x50]
cmp rdx, 0x10
jb 0x1400089a5
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000899f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000899f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000e610
nop
lea rcx, [0x140022c70]
call fcn.14000e740
cmp qword [0x140022c48], 0
jne 0x140008a17
lea rdx, str.____Failed_to_find_MmAllocateContiguousMemory
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140006870
lea rdx, [0x140006a50]
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]
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140006870
lea rdx, [0x140006a50]
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, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140008cc4
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r9, r12
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.140006f70
test al, al
je 0x1400089de
mov r15, qword [rsp + 0x30]
test r15, r15
je 0x1400089de
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.140006870
mov rdx, r15
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___void_const____ptr64____ptr64]
lea rdx, [0x140006a50]
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]
mov r8d, dword [rdi + 0x54]
mov rdx, r14
mov rcx, rbp
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rdi + 0x14]
add rbx, 0x28
xor eax, eax
cmp ax, word [rdi + 6]
jae 0x140008abf
add rbx, rdi
test dword [rbx + 0x14], 0x80
ja 0x140008ab1
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r14
mov ecx, dword [rbx - 4]
add rcx, rbp
call sub.VCRUNTIME140.dll_memcpy
inc esi
add rbx, 0x28
movzx eax, word [rdi + 6]
cmp esi, eax
jl 0x140008a94
mov rbx, r15
sub rbx, qword [rdi + 0x30]
mov rdx, rbp
lea rcx, [rsp + 0x38]
call fcn.14000c2c0
mov rdx, rbx
mov rcx, rax
call fcn.140008d00
mov rdx, r15
mov rcx, rbp
call fcn.140008e00
test al, al
jne 0x140008af9
lea rdx, str.____Failed_to_fix_cookie
jmp 0x140008ca8
mov rdx, rbp
lea rcx, [rsp + 0x38]
call fcn.14000c410
mov rdx, rax
mov rcx, r13
call fcn.140008f50
test al, al
jne 0x140008b21
lea rdx, str.____Failed_to_resolve_imports
jmp 0x140008bc7
mov r9, r12
mov r8, rbp
mov rdx, r15
mov rcx, r13
call fcn.1400029b0
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 0x140008b49
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x140008bce
mov ebx, dword [rdi + 0x28]
add rbx, r15
lea rdx, str.____Calling_DriverEntry_0x
call fcn.140006870
mov rdx, rbx
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___void_const____ptr64____ptr64]
lea rdx, [0x140006a50]
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 edi, edi
mov qword [rsp + 0x20], rdi
mov r9, r12
mov r8, r15
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x70]
call fcn.14000ada0
test al, al
jne 0x140008ba0
lea rdx, str.____Callback_returns_false__failed_
jmp 0x140008bc7
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x20], r12d
mov r9, r15
mov r8, rbx
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.140009340
test al, al
jne 0x140008c3d
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.140006870
lea rdx, [0x140006a50]
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, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rdx, str.___Freeing_memory
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140006870
lea rdx, [0x140006a50]
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]
mov rdx, r15
mov rcx, r13
call fcn.140002ca0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
test al, al
lea rdx, str.___Memory_has_been_released
jne 0x140008caf
lea rdx, str.____WARNING:_Failed_to_free_memory_
jmp 0x140008caf
mov ebx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x140008c4d
mov dword [rax], ebx
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.140006870
lea rdx, [0x140001290]
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::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov edx, ebx
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___long_int____ptr64]
lea rdx, [0x140006a50]
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, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r15
jmp 0x140008cc6
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.140006870
lea rdx, [0x140006a50]
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 eax, eax
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14000e5f0
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret