Function at 0x14009f7e0
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 [0x1400f2040]
xor rax, rsp
mov qword [rbp - 0x11], rax
mov r14, rdx
mov qword [rbp - 0x69], rdx
mov rdi, rcx
mov qword [rbp - 0x21], r8
mov qword [rbp - 0x19], r9
movzx r15d, byte [rbp + 0x77]
mov byte [rsp + 0x30], r15b
mov rax, qword [rbp + 0x8f]
mov qword [rbp - 0x31], rax
mov rax, qword [rbp + 0x97]
mov qword [rbp - 0x29], rax
mov eax, 0x5a4d
cmp word [rdx], ax
jne 0x14009fc4a
movsxd rsi, dword [rdx + 0x3c]
add rsi, rdx
cmp dword [rsi], 0x4550
jne 0x14009fc4a
mov eax, 0x20b
cmp word [rsi + 0x18], ax
je 0x14009f871
lea rdx, str.____Image_is_not_64_bit
jmp 0x14009fc51
mov ebx, dword [rsi + 0x50]
mov edx, ebx
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
je 0x14009fc6d
movzx eax, word [rsi + 0x14]
mov ecx, dword [rax + rsi + 0x24]
mov dword [rbp - 0x79], ecx
xor r8d, r8d
mov eax, r8d
test r15b, r15b
cmovne eax, ecx
mov dword [rbp - 0x61], eax
sub ebx, eax
mov dword [rbp - 0x7d], ebx
mov r12d, r8d
mov qword [rbp - 0x59], r8
mov eax, dword [rbp + 0x7f]
cmp eax, 1
jne 0x14009f8dc
mov edx, ebx
lea r8, [rbp - 0x59]
mov rcx, rdi
call fcn.14009ffa0
mov r15, rax
mov r12, qword [rbp - 0x59]
jmp 0x14009f9a0
cmp eax, 2
jne 0x14009f8f3
mov edx, ebx
mov rcx, rdi
call fcn.14009fd50
mov r15, rax
jmp 0x14009f9a0
test rbx, rbx
je 0x14009f94a
mov edx, 0x130
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x1401d9998], eax
jg 0x14009fca0
jmp 0x14009f91d
xor r8d, r8d
cmp qword [0x1401d9a80], 0
jne 0x14009f983
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.140021b50
lea rdx, [0x140021d30]
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.140021b50
lea rdx, [0x140021d30]
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, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14009fc6d
mov qword [rbp - 0x71], r8
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x71]
mov rcx, rdi
call fcn.140023450
test al, al
je 0x14009f94a
mov r15, qword [rbp - 0x71]
test r15, r15
je 0x14009f94a
mov r8d, dword [rsi + 0x54]
mov rdx, r14
mov rcx, r13
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rsi + 0x14]
add rbx, 0x28
xor eax, eax
mov r14d, eax
cmp ax, word [rsi + 6]
jae 0x14009fa01
add rbx, rsi
mov r12, qword [rbp - 0x69]
nop
test dword [rbx + 0x14], 0x80
ja 0x14009f9ed
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r12
mov ecx, dword [rbx - 4]
add rcx, r13
call sub.VCRUNTIME140.dll_memcpy
inc r14d
add rbx, 0x28
movzx eax, word [rsi + 6]
cmp r14d, eax
jl 0x14009f9d0
mov r12, qword [rbp - 0x59]
mov r14, r15
cmp byte [rsp + 0x30], 0
je 0x14009fa11
mov eax, dword [rbp - 0x79]
sub r15, rax
mov rbx, r15
sub rbx, qword [rsi + 0x30]
mov rdx, r13
lea rcx, [rbp - 0x51]
call fcn.1400be150
mov rdx, rbx
mov rcx, rax
call fcn.14009f6e0
mov rdx, r15
mov rcx, r13
call fcn.14009f5e0
test al, al
jne 0x14009fa4a
lea rdx, str.____Failed_to_fix_cookie
jmp 0x14009fc51
mov rdx, r13
lea rcx, [rbp - 0x51]
call fcn.1400be2a0
mov rdx, rax
mov rcx, rdi
call fcn.14009f440
test al, al
jne 0x14009fa71
lea rdx, str.____Failed_to_resolve_imports
jmp 0x14009fb28
mov ebx, dword [rbp - 0x7d]
mov qword [rbp - 0x69], rbx
mov r8d, dword [rbp - 0x61]
add r8, r13
mov r9d, ebx
mov rdx, r14
mov rcx, rdi
call fcn.14009e090
test al, al
jne 0x14009fab9
lea rdx, str.____Failed_to_write_local_image_to_remote_image
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140021b50
lea rdx, [0x140021d30]
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]
jmp 0x14009fb47
mov ebx, dword [rsi + 0x28]
add rbx, r15
mov rax, qword [rbp - 0x31]
test rax, rax
je 0x14009faeb
mov qword [rsp + 0x20], r12
mov r9, qword [rbp - 0x69]
mov r8, r14
lea rdx, [rbp - 0x19]
lea rcx, [rbp - 0x21]
call rax
test al, al
jne 0x14009faeb
lea rdx, str.____Callback_returns_false__failed_
jmp 0x14009fb28
mov dword [rbp - 0x79], 0
mov r9, qword [rbp - 0x21]
cmp byte [rbp + 0x87], 0
cmovne r9, r14
mov rax, qword [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rbp - 0x79]
mov rcx, rdi
call fcn.140024510
test al, al
jne 0x14009fbb2
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.140021b50
lea rdx, [0x140021d30]
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 ebx, dword [rbp - 0x7d]
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [rbp + 0x7f]
mov rdx, r14
cmp eax, 1
jne 0x14009fba0
mov r8, r12
mov rcx, rdi
call fcn.14009d360
test al, al
je 0x14009fb94
mov rdx, r12
mov rcx, rdi
call fcn.14009d220
test al, al
je 0x14009fb94
mov rdx, r12
mov rcx, rdi
call fcn.14009cf80
test al, al
jne 0x14009fc6d
lea rdx, str.____WARNING:_Failed_to_free_memory_
jmp 0x14009fc51
cmp eax, 2
jne 0x14009fb84
mov r8d, ebx
mov rcx, rdi
call fcn.14009d9e0
jmp 0x14009fb8c
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x14009fbc0
mov eax, dword [rbp - 0x79]
mov dword [rcx], eax
cmp byte [rbp + 0x6f], 0
je 0x14009fc21
mov eax, dword [rbp + 0x7f]
mov rdx, r14
cmp eax, 1
jne 0x14009fc37
mov r8, r12
mov rcx, rdi
call fcn.14009d360
test al, al
je 0x14009fbfe
mov rdx, r12
mov rcx, rdi
call fcn.14009d220
test al, al
je 0x14009fbfe
mov rdx, r12
mov rcx, rdi
call fcn.14009cf80
test al, al
jne 0x14009fc21
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.140021b50
lea rdx, [0x140021d30]
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, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r14
jmp 0x14009fc6f
cmp eax, 2
jne 0x14009fbf2
mov r8d, dword [rbp - 0x7d]
mov rcx, rdi
call fcn.14009d9e0
jmp 0x14009fbfa
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.140021b50
lea rdx, [0x140021d30]
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 [rbp - 0x11]
xor rcx, rsp
call fcn.140025bf0
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, [0x1401d9998]
call fcn.1400263b0
jmp 0x14009f91a
lea rcx, [0x1401d9998]
call fcn.14002641c
cmp dword [0x1401d9998], 0xffffffff
jne 0x14009f91a
xorps xmm0, xmm0
movups xmmword [rbp - 0x51], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x41], xmm1
mov r8d, 0x15
lea rdx, str.ExAllocatePoolWithTag
lea rcx, [rbp - 0x51]
call fcn.14000ef90
nop
lea r8, [rbp - 0x51]
mov rdx, qword [0x1401d9768]
mov rcx, rdi
call fcn.14009cc40
mov qword [0x1401d9a80], rax
mov rdx, qword [rbp - 0x39]
cmp rdx, 0xf
jbe 0x14009fc8f
inc rdx
mov rcx, qword [rbp - 0x51]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14009fd32
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14009fd32
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140025c10
jmp 0x14009fc8f