Function at 0x14002a3c0
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x280
mov rax, qword [0x1402ba040]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov ebx, dword [rcx + 4]
lea r9, [0x140000000]
mov r13d, dword [rcx + 8]
xor edi, edi
mov r14d, dword [rcx + 0xc]
xor r12b, r12b
mov r15d, dword [rcx + 0x10]
add rbx, r9
add r13, r9
mov qword [rsp + 0x30], rdx
add r14, r9
lea rbp, [rdi - 1]
add r15, r9
xor eax, eax
lock cmpxchg qword [r13], rdi
mov rsi, rax
jne 0x14002a541
xor edx, edx
mov word [rsp + 0x60], di
mov r8d, 0x206
lea rcx, [rsp + 0x62]
call fcn.140207110
lea rcx, [rsp + 0x60]
mov rdx, rbp
nop dword [rax]
inc rdx
cmp byte [rbx + rdx], dil
jne 0x14002a450
mov r8, rdx
and r8, 0xfffffffffffffffc
je 0x14002a49c
nop word [rax + rax]
movzx eax, byte [rbx]
mov word [rcx], ax
movzx eax, byte [rbx + 1]
mov word [rcx + 2], ax
movzx eax, byte [rbx + 2]
mov word [rcx + 4], ax
movzx eax, byte [rbx + 3]
add rbx, 4
mov word [rcx + 6], ax
add rcx, 8
sub r8, 4
jne 0x14002a470
and edx, 3
sub rdx, 1
je 0x14002a4cc
sub rdx, 1
je 0x14002a4bf
cmp rdx, 1
jne 0x14002a4d2
movzx eax, byte [rbx]
mov word [rcx], ax
add rcx, 2
inc rbx
movzx eax, byte [rbx]
mov word [rcx], ax
add rcx, 2
inc rbx
movzx eax, byte [rbx]
mov word [rcx], ax
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x800
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
jne 0x14002a537
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x200
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
jne 0x14002a537
cmp dword [0x1402baf40], 0x3e
jae 0x14002a5e9
xor r8d, r8d
lea rcx, [rsp + 0x60]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
je 0x14002a5e9
mov r12b, 1
lea r9, [0x140000000]
mov rax, qword [rsp + 0x30]
mov rcx, rsi
sub rax, r14
mov r8, qword [rax + r15]
test r8, r8
jns 0x14002a55e
xor edx, edx
call fcn.140177920
jmp 0x14002a56f
lea rdx, [r8 + 2]
movzx r8d, word [r8 + r9]
add rdx, r9
call fcn.140177f80
mov r15, rax
test rax, rax
je 0x14002a5e9
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x14002a5e9
mov ecx, dword [0x14000003c]
lea eax, [rcx - 1]
cmp eax, 0x7ffffffd
ja 0x14002a5e9
lea r10, [0x140000000]
add rcx, r10
cmp dword [rcx], 0x4550
jne 0x14002a5e9
movzx r8d, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
add r8, rcx
test r9d, r9d
je 0x14002a5e9
mov rcx, rdi
nop dword [rax]
mov edx, dword [rcx + r8 + 0x24]
lea rbx, [rdx + r10]
cmp r14, rbx
jb 0x14002a5de
mov eax, dword [rcx + r8 + 0x28]
add rax, rdx
add rax, r10
cmp r14, rax
jb 0x14002a616
inc edi
add rcx, 0x28
cmp edi, r9d
jb 0x14002a5c0
xor eax, eax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1401e0100
mov rbx, qword [rsp + 0x2d0]
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edi, dword ds:[r8 + rcx + 0x20]
test rbx, rbx
je 0x14002a5e9
test rdi, rdi
je 0x14002a5e9
mov qword ds:[rsp + 0x50], rdi
mov qword [rsp + 0x38], rbx
lock bts qword [0x1402c3c48], 0
jae 0x14002a64e
lea rcx, [0x1402c3c48]
call sym.SystemInformer.exe_QifAcquireQueuedLockExclusive
mov eax, dword [0x1402c3c40]
inc eax
mov dword [0x1402c3c40], eax
cmp eax, 1
jne 0x14002a69a
lea rax, [0x1402baac0]
mov r9d, 4
lea r8, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x38]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
jns 0x14002a69a
lfence
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
mov rcx, rbp
lock xadd qword [0x1402c3c48], rcx
movzx eax, cl
and al, 6
cmp al, 2
jne 0x14002a6ce
lea rax, [rcx - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402c3c48], rdx
jne 0x14002a6ce
lea rcx, [0x1402c3c48]
call fcn.140170e20
mov rcx, qword [rsp + 0x30]
mov rax, r15
xchg qword [rcx], rax
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x40], rbx
lock bts qword [0x1402c3c48], 0
jae 0x14002a6fb
lea rcx, [0x1402c3c48]
call sym.SystemInformer.exe_QifAcquireQueuedLockExclusive
add dword [0x1402c3c40], 0xffffffff
jne 0x14002a728
mov r9d, dword [0x1402baac0]
lea rax, [rsp + 0x48]
lea r8, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
lock xadd qword [0x1402c3c48], rbp
movzx eax, bpl
and al, 6
cmp al, 2
jne 0x14002a75a
lea rax, [rbp - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402c3c48], rdx
jne 0x14002a75a
lea rcx, [0x1402c3c48]
call fcn.140170e20
mov rax, rsi
xchg qword [r13], rax
cmp rax, rsi
jne 0x14002a774
test r12b, r12b
je 0x14002a774
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, r15
jmp 0x14002a5eb