Function at 0x180015220
Capabilities:
Access pe header

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rdi
push r14
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rax + 8], rbx
mov rdi, rdx
mov qword [rax - 0x30], r13
mov rdx, r8
mov qword [rax - 0x38], r15
mov rbx, r8
mov r15, rcx
shr rdx, 0xc
lea rcx, [rbp + 7]
call fcn.180016e90
mov r9d, 4
mov r8d, 0x1000
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, qword [rbp + 7]
mov r13, rax
mov qword [rbp - 9], rax
test rax, rax
jne 0x18001528e
xor dil, dil
jmp 0x1800154f9
mov qword [rsp + 0x98], rsi
xor ebx, ebx
mov qword [rsp + 0x90], r12
mov r12, qword [rbp + 0x1f]
test r12, r12
je 0x180015308
mov rsi, r13
sub rsi, qword [rbp + 0x6f]
lea rax, [rbp + 0x7f]
mov qword [rbp + 0x7f], 0
lea r8, [rsi + rdi]
mov qword [rsp + 0x20], rax
mov r9d, 0x1000
mov rdx, rdi
mov rcx, r15
call qword [sym.imp.ntdll.dll_NtReadVirtualMemory]
test eax, eax
js 0x1800152f5
mov rax, rbx
mov rcx, rbx
shr rax, 5
and ecx, 0x1f
lea rdx, [r14 + rax*4]
mov eax, dword [r14 + rax*4]
bts eax, ecx
mov dword [rdx], eax
inc rbx
add rdi, 0x1000
cmp rbx, r12
jb 0x1800152b0
mov rdi, qword [rbp + 0x6f]
xor esi, esi
mov rcx, r13
mov qword [rbp - 0x19], rsi
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
test rax, rax
jne 0x180015321
xor dil, dil
jmp 0x180015384
test byte [rax + 0x16], 1
mov rsi, qword [rax + 0x30]
mov qword [rbp - 0x19], rsi
mov qword [rax + 0x30], rdi
jne 0x180015381
mov edx, dword [rax + 0xb4]
test edx, edx
je 0x180015381
mov ecx, dword [rax + 0xb0]
test ecx, ecx
je 0x180015381
lea rax, [rcx + r13]
sub rdi, rsi
lea rbx, [rax + rdx]
cmp rax, rbx
jae 0x180015381
mov edx, dword [rax + 4]
test edx, edx
je 0x180015381
mov ecx, dword [rax]
lea r8, [rax + 8]
sub rdx, 8
add rcx, r13
shr rdx, 1
mov r9, rdi
call qword [sym.imp.ntdll.dll_LdrProcessRelocationBlock]
test rax, rax
je 0x18001531c
cmp rax, rbx
jb 0x180015357
mov dil, 1
xor ebx, ebx
mov qword [rbp - 1], r15
test r12, r12
je 0x18001545c
sub qword [rbp + 0x6f], r13
mov rsi, r13
mov r13, qword [rbp + 0x6f]
nop
movzx eax, bl
and al, 0x1f
movzx ecx, al
mov rax, rbx
shr rax, 5
mov eax, dword [r14 + rax*4]
bt eax, ecx
jae 0x180015445
lea rax, [rsi + r13]
mov qword [rbp - 0x29], 0x1000
mov qword [rbp - 0x21], rax
lea r8, [rbp - 0x29]
lea rax, [rbp + 0x7f]
mov dword [rbp + 0x7f], 0
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x21]
mov rcx, r15
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
js 0x180015442
mov r9, qword [rbp - 0x29]
lea rax, [rbp - 0x11]
mov rdx, qword [rbp - 0x21]
mov r8, rsi
mov rcx, r15
mov qword [rsp + 0x20], rax
mov qword [rbp - 0x11], 0
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
js 0x180015442
mov r9d, dword [rbp + 0x7f]
lea rax, [rbp + 0x7f]
lea r8, [rbp - 0x29]
mov qword [rsp + 0x20], rax
lea rdx, [rbp - 0x21]
mov rcx, r15
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
jns 0x180015445
xor dil, dil
inc rbx
add rsi, 0x1000
cmp rbx, r12
jb 0x1800153a0
mov r13, qword [rbp - 9]
mov r12, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x98]
test dil, dil
je 0x1800154e6
mov rbx, qword [rbp - 0x19]
mov r9d, 0x3000
mov rdx, rbx
mov dword [rsp + 0x20], 4
mov r8d, 0x1000
mov rcx, r15
xor dil, dil
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
test rax, rax
je 0x1800154e6
mov r8, r13
lea rcx, [rbp - 1]
mov rdx, rbx
call fcn.180015560
test al, al
je 0x1800154e6
lea rax, [rbp + 0x7f]
mov dword [rbp + 0x7f], 0
mov r9d, 2
mov qword [rsp + 0x20], rax
mov r8d, 0x1000
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
movzx edi, dil
mov ecx, 1
test eax, eax
cmovne edi, ecx
mov rdx, qword [rbp + 0x77]
mov r8d, 0x4000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r15, qword [rsp + 0x80]
mov r13, qword [rsp + 0x88]
mov rbx, qword [rsp + 0xc0]
test r14, r14
je 0x18001554a
mov rdx, qword [rbp + 0x17]
mov rax, r14
sub rdx, r14
and rdx, 0xfffffffffffffffc
cmp rdx, 0x1000
jb 0x180015542
mov r14, qword [r14 - 8]
add rdx, 0x27
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18001555a
mov rcx, r14
call fcn.180049e70
movzx eax, dil
add rsp, 0xa0
pop r14
pop rdi
pop rbp
ret
call fcn.1800503fc
int3