Function at 0x1400164b0
Capabilities:
Parse pe header
Print debug messages
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov r11, rdx
xor esi, esi
mov eax, 0x5a4d
mov qword [rcx + 0x20], r11
mov rdi, r8
mov rdx, rcx
mov r8d, esi
cmp word [r11], ax
jne 0x1400164fd
mov r8d, dword [r11 + 0x3c]
cmp r8d, 0x800
jbe 0x1400164fd
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_e_lfanew_x__expected_a_lower_value_n
call sub.ntoskrnl.exe_DbgPrint
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov r9d, r8d
add r9, r11
mov qword [rcx + 0x28], r9
mov eax, dword [r9]
cmp eax, 0x4550
je 0x14001652d
mov r8d, eax
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Invalid_PE_signature:__x
call sub.ntoskrnl.exe_DbgPrint
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
movzx eax, word [r9 + 0x14]
mov ecx, pe_nt_image_headers64
cmp ax, cx
je 0x140016558
mov r8d, eax
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Unexpected_optional_header_size:__x_n
call sub.ntoskrnl.exe_DbgPrint
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
movzx eax, word [r9 + 0x18]
mov ecx, 0x20b
cmp ax, cx
je 0x140016583
mov r8d, eax
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Unexpected_optional_header_magic:__x_n
call sub.ntoskrnl.exe_DbgPrint
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov eax, dword [r9 + 0x84]
cmp eax, 0x10
je 0x1400165ab
mov r8d, eax
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Unexpected_number_of_RVA_and_sizes:__x_n
call sub.ntoskrnl.exe_DbgPrint
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov qword [rsp + 0x38], rbx
mov dword [rdx + 0x34], r8d
movzx eax, word [r9 + 6]
lea ebx, [rax*4 + 0x21]
add ebx, eax
lea ebx, [r8 + rbx*8]
mov dword [rdx + 0x38], ebx
mov r10d, dword [r9 + 0x50]
mov dword [rdx + 0x3c], r10d
cmp r10, rdi
jbe 0x1400165fa
mov r9, rdi
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_The_image_size__x_is_larger_than_the_mapping:__x_n
mov r8d, r10d
call sub.ntoskrnl.exe_DbgPrint
mov rbx, qword [rsp + 0x38]
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rax, qword [r9 + 0x88]
mov rcx, rax
mov qword [rsp + 0x30], rax
shr rcx, 0x20
cmp ecx, 0x28
jb 0x140016774
cmp eax, ebx
jb 0x1400167a2
cmp eax, r10d
jae 0x1400167a2
add ecx, eax
cmp ecx, r10d
ja 0x1400167a2
mov r8d, eax
mov rcx, rax
shr rcx, 0x20
add r8, r11
mov dword [rdx + 0x40], eax
mov dword [rdx + 0x44], ecx
mov ecx, dword [r8 + 0x14]
lea eax, [rcx - 1]
cmp eax, 0xffffe
ja 0x140016764
mov r9d, dword [r8 + 0x18]
lea eax, [r9 - 1]
cmp eax, 0xffffe
ja 0x140016764
mov dword [rdx + 0x54], r9d
mov ecx, dword [r8 + 0x18]
cmp ecx, dword [r8 + 0x14]
cmovb ecx, dword [r8 + 0x14]
mov dword [rdx + 0x50], ecx
mov r9d, dword [r8 + 0x1c]
cmp r9d, ebx
jb 0x140016743
cmp r9d, r10d
jae 0x140016743
lea rcx, [r9 + rcx*4]
cmp rcx, r10
ja 0x140016743
lea rax, [r9 + r11]
mov qword [rdx + 0x48], rax
mov r9d, dword [r8 + 0x20]
cmp r9d, ebx
jb 0x140016722
cmp r9d, r10d
jae 0x140016722
mov eax, dword [r8 + 0x18]
lea rcx, [r9 + rax*4]
cmp rcx, r10
ja 0x140016722
lea rax, [r9 + r11]
mov qword [rdx + 0x58], rax
mov r9d, dword [r8 + 0x24]
cmp r9d, ebx
jb 0x140016701
cmp r9d, r10d
jae 0x140016701
mov eax, dword [r8 + 0x18]
lea rcx, [r9 + rax*4]
cmp rcx, r10
ja 0x140016701
mov rbx, qword [rsp + 0x38]
lea rax, [r9 + r11]
mov qword [rdx + 0x60], rax
mov al, 1
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov r8d, r9d
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Bad_AddressOfNameOrdinals:__x_n
call sub.ntoskrnl.exe_DbgPrint
mov rbx, qword [rsp + 0x38]
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov r8d, r9d
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Bad_AddressOfNames:__x_n
call sub.ntoskrnl.exe_DbgPrint
mov rbx, qword [rsp + 0x38]
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov r8d, r9d
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Bad_AddressOfFunctions:__x_n
call sub.ntoskrnl.exe_DbgPrint
mov rbx, qword [rsp + 0x38]
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov r9d, dword [r8 + 0x18]
mov r8d, ecx
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_NumberOfNames_or_and_NumberOfFunctions_are_outside_the_expected_range:_nof_x_non_x_n
jmp 0x1400167b1
test ecx, ecx
jne 0x1400167a2
test eax, eax
jne 0x1400167a2
mov rbx, qword [rsp + 0x38]
mov al, 1
mov qword [rdx + 0x40], rsi
mov qword [rdx + 0x50], rsi
mov qword [rdx + 0x48], rsi
mov qword [rdx + 0x58], rsi
mov qword [rdx + 0x60], rsi
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov r9d, dword [rsp + 0x34]
lea rcx, str.rtR0DbgKrnlNtParseModule:__s:_Missing_or_invalid_export_directory:__lx_LB__x_n
mov r8d, eax
call sub.ntoskrnl.exe_DbgPrint
mov rbx, qword [rsp + 0x38]
xor al, al
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret