Function at 0x180009a70
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov rbx, rdx
mov qword [rsp + 0x50], rdx
movzx ebp, byte [rsp + 0xd8]
mov byte [rsp + 0x30], bpl
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x78], rax
mov rdi, qword [0x18001fa00]
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x18000a0a8
movsxd rsi, dword [rdx + 0x3c]
add rsi, rdx
cmp dword [rsi], 0x4550
jne 0x18000a0a8
mov eax, 0x20b
cmp word [rsi + 0x18], ax
je 0x180009af0
lea rdx, str.____Image_is_not_64_bit
jmp 0x18000a0af
mov r13d, dword [rsi + 0x50]
mov edx, r13d
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
test rax, rax
je 0x18000a0cb
movzx eax, word [rsi + 0x14]
mov ecx, dword [rax + rsi + 0x24]
mov dword [rsp + 0x34], ecx
xor r8d, r8d
mov eax, r8d
test bpl, bpl
cmovne eax, ecx
mov dword [rsp + 0x40], eax
sub r13d, eax
mov r12d, r8d
mov qword [rsp + 0x48], r8
mov eax, dword [rsp + 0xe0]
cmp eax, 1
jne 0x180009b65
mov edx, r13d
lea r8, [rsp + 0x48]
mov rcx, rdi
call fcn.1800092e0
mov r15, rax
mov r12, qword [rsp + 0x48]
jmp 0x180009d09
cmp eax, 2
jne 0x180009b7d
mov edx, r13d
mov rcx, rdi
call fcn.180009800
mov r15, rax
jmp 0x180009d09
mov ebp, r13d
test r13d, r13d
je 0x180009cb0
mov ecx, dword [0x18001f930]
mov rax, qword gs:[0x58]
mov edx, 4
mov rax, qword [rax + rcx*8]
mov ecx, dword [rdx + rax]
cmp dword [0x18001fa68], ecx
jle 0x180009c83
lea rcx, [0x18001fa68]
call fcn.18000ccc0
cmp dword [0x18001fa68], 0xffffffff
jne 0x180009c80
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
mov ecx, 0x20
call fcn.18000cd38
mov qword [rsp + 0x58], rax
movdqa xmm0, xmmword [0x18001ab70]
movdqu xmmword [rsp + 0x68], xmm0
movups xmm1, xmmword [0x180010260]
movups xmmword [rax], xmm1
mov ecx, dword [0x180010270]
mov dword [rax + 0x10], ecx
movzx ecx, byte [0x180010274]
mov byte [rax + 0x14], cl
mov byte [rax + 0x15], 0
lea r8, [rsp + 0x58]
mov rdx, qword [0x18001f9f8]
mov rcx, rdi
call fcn.1800030d0
mov qword [0x18001fb50], rax
mov rdx, qword [rsp + 0x70]
cmp rdx, 0xf
jbe 0x180009c74
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180009c6e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180009c6e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18000cc10
nop
lea rcx, [0x18001fa68]
call fcn.18000cc54
xor r8d, r8d
cmp qword [0x18001fb50], 0
jne 0x180009ce9
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.180006480
lea rdx, [0x180006660]
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.180006480
lea rdx, [0x180006660]
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, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x18000a0cb
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x20], rbp
lea rdx, [rsp + 0x38]
mov rcx, rdi
call fcn.180007d70
test al, al
je 0x180009cb0
mov r15, qword [rsp + 0x38]
test r15, r15
je 0x180009cb0
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.180006480
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, [0x180006660]
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 [rsi + 0x54]
mov rdx, rbx
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rsi + 0x14]
add rbx, 0x28
xor eax, eax
mov ebp, eax
cmp ax, word [rsi + 6]
jae 0x180009d96
add rbx, rsi
mov r12, qword [rsp + 0x50]
test dword [rbx + 0x14], 0x80
ja 0x180009d83
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r12
mov ecx, dword [rbx - 4]
add rcx, r14
call sub.VCRUNTIME140.dll_memcpy
inc ebp
add rbx, 0x28
movzx eax, word [rsi + 6]
cmp ebp, eax
jl 0x180009d66
mov r12, qword [rsp + 0x48]
mov rbp, r15
cmp byte [rsp + 0x30], 0
je 0x180009df4
mov ebx, dword [rsp + 0x34]
sub r15, rbx
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.180006480
lea rdx, [0x180001290]
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___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._bytes_of_PE_Header
call fcn.180006480
lea rdx, [0x180006660]
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 rbx, r15
sub rbx, qword [rsi + 0x30]
mov rdx, r14
lea rcx, [rsp + 0x58]
call fcn.18000afe0
mov rdx, rbx
mov rcx, rax
call fcn.18000a0f0
mov rdx, r15
mov rcx, r14
call fcn.18000a1f0
test al, al
jne 0x180009e2e
lea rdx, str.____Failed_to_fix_cookie
jmp 0x18000a0af
mov rdx, r14
lea rcx, [rsp + 0x58]
call fcn.18000b130
mov rdx, rax
mov rcx, rdi
call fcn.18000a340
test al, al
jne 0x180009e56
lea rdx, str.____Failed_to_resolve_imports
jmp 0x180009ee6
mov r9d, r13d
mov r8d, dword [rsp + 0x40]
add r8, r14
mov rdx, rbp
mov rcx, rdi
call fcn.1800028b0
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 0x180009e80
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x180009eed
mov ebx, dword [rsi + 0x28]
add rbx, r15
lea rdx, str.____Calling_DriverEntry_0x
call fcn.180006480
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, [0x180006660]
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 dword [rsp + 0x34], eax
mov r9d, eax
cmp byte [rsp + 0xe8], al
cmovne r9, rbp
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rsp + 0x34]
mov rcx, rdi
call fcn.18000a710
test al, al
jne 0x180009f9b
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.180006480
lea rdx, [0x180006660]
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, r14
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.180006480
lea rdx, [0x180006660]
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 eax, dword [rsp + 0xe0]
mov rdx, rbp
cmp eax, 1
jne 0x180009f89
mov r8, r12
mov rcx, rdi
call fcn.180002cc0
test al, al
je 0x180009f7d
mov rdx, r12
mov rcx, rdi
call fcn.180002e20
test al, al
je 0x180009f7d
mov rdx, r12
mov rcx, rdi
call fcn.180002f80
test al, al
lea rdx, str.___Memory_has_been_released
jne 0x18000a0af
lea rdx, str.____WARNING:_Failed_to_free_memory_
jmp 0x18000a0af
cmp eax, 2
jne 0x180009f66
mov r8d, r13d
mov rcx, rdi
call fcn.180002ba0
jmp 0x180009f6e
mov ebx, dword [rsp + 0x34]
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x180009fab
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.180006480
lea rdx, [0x180001290]
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, [0x180006660]
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]
cmp byte [rsp + 0xd0], 0
je 0x18000a080
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.180006480
lea rdx, [0x180006660]
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 eax, dword [rsp + 0xe0]
mov rdx, rbp
cmp eax, 1
jne 0x18000a096
mov r8, r12
mov rcx, rdi
call fcn.180002cc0
test al, al
je 0x18000a05d
mov rdx, r12
mov rcx, rdi
call fcn.180002e20
test al, al
je 0x18000a05d
mov rdx, r12
mov rcx, rdi
call fcn.180002f80
test al, al
lea rdx, str.___Memory_has_been_released
jne 0x18000a064
lea rdx, str.____WARNING:_Failed_to_free_memory_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.180006480
lea rdx, [0x180006660]
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, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, rbp
jmp 0x18000a0cd
cmp eax, 2
jne 0x18000a04a
mov r8d, r13d
mov rcx, rdi
call fcn.180002ba0
jmp 0x18000a052
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.180006480
lea rdx, [0x180006660]
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
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret