Function at 0x140017ca0
Capabilities:
Access pe header

Disassembly:
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xc8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0xe0]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x68], rax
jmp 0x140017ce4
mov rax, qword [rsp + 0x68]
mov rax, qword [rax]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0xe0]
add rax, 0x20
cmp qword [rsp + 0x68], rax
je 0x140018109
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movzx eax, byte [rax + 0x51]
test eax, eax
je 0x140017d14
jmp 0x140017cd7
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x40]
mov rdi, rax
lea rsi, [rcx + 0x20]
mov ecx, 0x10
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
lea r9, [0x14001e7c0]
lea r8, [0x14001e7e0]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.ntoskrnl.exe_RtlImageNtHeader]
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0xe8]
test eax, eax
jne 0x140017d8d
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax + 0x10]
mov rcx, qword [rsp + 0xe0]
call fcn.14000b710
mov dword [rsp + 0x60], 0
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x140017db3
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x28]
mov dword [rsp + 0x58], eax
jmp 0x140017dbf
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x28]
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
je 0x140017e40
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x140017de4
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x28]
mov dword [rsp + 0x5c], eax
jmp 0x140017df0
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x28]
mov dword [rsp + 0x5c], eax
mov eax, dword [rsp + 0x5c]
mov rcx, qword [rsp + 0x40]
add rax, qword [rcx + 0x10]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 1
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 3
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0xe0]
xor ecx, ecx
call fcn.140018130
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x140017e81
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rcx, rax
call fcn.14000bfe0
movzx eax, al
test eax, eax
je 0x140017e81
lea r9, [0x14001e7c0]
lea r8, [0x14001e810]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov eax, 0xc000010a
jmp 0x14001810b
mov rax, qword [rsp + 0x48]
add rax, 0x108
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x18]
cmp eax, 0x10b
jne 0x140017eb1
mov rax, qword [rsp + 0x48]
add rax, 0xf8
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x50], rax
jmp 0x140017ecb
mov rax, qword [rsp + 0x50]
add rax, 0x28
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 6]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x50], rax
jae 0x140017fea
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x24]
and eax, 0x2000000
test eax, eax
jne 0x140017f01
jmp 0x140017ebd
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x40]
add rax, qword [rcx + 0x10]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 8]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x4c]
and eax, 0x10
test eax, eax
je 0x140017f52
mov rdi, qword [rsp + 0x90]
xor eax, eax
mov rcx, qword [rsp + 0xa0]
rep stosb byte [rdi], al
jmp 0x140017fe5
mov qword [rsp + 0x20], 0
mov r9d, 4
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x90]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwProtectVirtualMemory]
test eax, eax
jl 0x140017f96
mov rdi, qword [rsp + 0x90]
xor eax, eax
mov rcx, qword [rsp + 0xa0]
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
mov r9d, 1
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x90]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwProtectVirtualMemory]
mov r9d, 0x4000
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x90]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwFreeVirtualMemory]
jmp 0x140017ebd
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x4c]
and eax, 4
test eax, eax
je 0x1400180fb
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x14001801b
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x64], eax
jmp 0x140018027
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x64], eax
mov eax, dword [rsp + 0x64]
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x4c]
and eax, 0x10
test eax, eax
je 0x14001805c
mov rax, qword [rsp + 0x40]
mov rdi, qword [rax + 0x10]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
jmp 0x1400180fb
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x20], 0
mov r9d, 4
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x98]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwProtectVirtualMemory]
test eax, eax
jl 0x1400180e0
mov rax, qword [rsp + 0x40]
mov rdi, qword [rax + 0x10]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
mov r9d, 2
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x98]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntoskrnl.exe_ZwProtectVirtualMemory]
jmp 0x1400180fb
lea r9, [0x14001e7c0]
lea r8, [0x14001e850]
xor edx, edx
mov ecx, 0x4d
call qword [sym.imp.ntoskrnl.exe_DbgPrintEx]
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x51], 1
jmp 0x140017cd7
xor eax, eax
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.140001860
add rsp, 0xc8
pop rdi
pop rsi
ret