Function at 0x14002c2c0
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, 0x270
mov rax, qword [0x1402bf040]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov ebx, dword [rcx + 4]
lea r9, [0x140000000]
mov r13d, dword [rcx + 8]
add rbx, r9
mov r14d, dword [rcx + 0xc]
add r13, r9
mov r15d, dword [rcx + 0x10]
add r14, r9
add r15, r9
mov qword [rsp + 0x38], rdx
xor r12b, r12b
xor edi, edi
xor eax, eax
mov rbp, 0xffffffffffffffff
lock cmpxchg qword [r13], rdi
mov rsi, rax
jne 0x14002c441
xor edx, edx
mov word [rsp + 0x50], di
mov r8d, 0x206
lea rcx, [rsp + 0x52]
call fcn.14020a280
lea rcx, [rsp + 0x50]
mov rdx, rbp
nop dword [rax]
inc rdx
cmp byte [rbx + rdx], dil
jne 0x14002c350
mov r8, rdx
and r8, 0xfffffffffffffffc
je 0x14002c39c
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 0x14002c370
and edx, 3
sub rdx, 1
je 0x14002c3cc
sub rdx, 1
je 0x14002c3bf
cmp rdx, 1
jne 0x14002c3d2
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 + 0x50]
mov r8d, 0x800
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
jne 0x14002c437
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
jne 0x14002c437
cmp dword [0x1402bff40], 0x3e
jae 0x14002c4f3
xor r8d, r8d
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
je 0x14002c4f3
mov r12b, 1
lea r9, [0x140000000]
mov rax, qword [rsp + 0x38]
mov rcx, rsi
sub rax, r14
mov r8, qword [rax + r15]
test r8, r8
jns 0x14002c45e
xor edx, edx
call fcn.14017dae0
jmp 0x14002c46f
lea rdx, [r8 + 2]
movzx r8d, word [r8 + r9]
add rdx, r9
call fcn.14017e120
mov r15, rax
test rax, rax
je 0x14002c4f3
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x14002c4f3
mov ecx, dword [0x14000003c]
lea eax, [rcx - 1]
cmp eax, 0x7ffffffd
ja 0x14002c4f3
lea r10, [0x140000000]
add rcx, r10
cmp dword [rcx], 0x4550
jne 0x14002c4f3
movzx r9d, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
add r9, rcx
test r8d, r8d
je 0x14002c4f3
nop dword [rax]
mov eax, edi
lea rcx, [rax + rax*4]
mov edx, dword [r9 + rcx*8 + 0x24]
lea rcx, [rcx*8]
lea rbx, [rdx + r10]
cmp r14, rbx
jb 0x14002c4ec
mov eax, dword [r9 + rcx + 0x28]
add rax, rdx
add rax, r10
cmp r14, rax
jb 0x14002c521
inc edi
cmp edi, r8d
jb 0x14002c4c0
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1401e4160
mov rbx, qword ss:[rsp + 0x2c0]
add rsp, 0x270
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edi, dword [r9 + rcx + 0x20]
test rbx, rbx
je 0x14002c4f3
test rdi, rdi
je 0x14002c4f3
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x40], rbx
lock bts qword [0x1402c9628], 0
setb al
test al, al
je 0x14002c557
lea rcx, [0x1402c9628]
call sym.SystemInformer.exe_PhfAcquireQueuedLockExclusive
mov eax, dword [0x1402c9620]
inc eax
mov dword [0x1402c9620], eax
cmp eax, 1
jne 0x14002c59f
lea rax, [0x1402bfac0]
mov r9d, 4
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x40]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
test eax, eax
jns 0x14002c59f
lfence
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
mov rcx, rbp
lock xadd qword [0x1402c9628], rcx
movzx eax, cl
and al, 6
cmp al, 2
jne 0x14002c5d3
lea rax, [rcx - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402c9628], rdx
jne 0x14002c5d3
lea rcx, [0x1402c9628]
call fcn.140172bc0
mov rcx, qword [rsp + 0x38]
mov rax, r15
xchg qword [rcx], rax
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x30], rbx
lock bts qword [0x1402c9628], 0
setb al
test al, al
je 0x14002c605
lea rcx, [0x1402c9628]
call sym.SystemInformer.exe_PhfAcquireQueuedLockExclusive
add dword [0x1402c9620], 0xffffffff
jne 0x14002c632
mov r9d, dword [0x1402bfac0]
lea rax, [rsp + 0x38]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x30]
mov rcx, rbp
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
lock xadd qword [0x1402c9628], rbp
movzx eax, bpl
and al, 6
cmp al, 2
jne 0x14002c665
lea rax, [rbp - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402c9628], rdx
jne 0x14002c665
lea rcx, [0x1402c9628]
nop
call fcn.140172bc0
mov rax, rsi
xchg qword [r13], rax
cmp rax, rsi
jne 0x14002c67f
test r12b, r12b
je 0x14002c67f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, r15
jmp 0x14002c4f5