Function at 0x14002c1e0
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 [0x1402c0040]
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 0x14002c361
xor edx, edx
mov word [rsp + 0x50], di
mov r8d, 0x206
lea rcx, [rsp + 0x52]
call fcn.14020ba80
lea rcx, [rsp + 0x50]
mov rdx, rbp
nop dword [rax]
inc rdx
cmp byte [rbx + rdx], dil
jne 0x14002c270
mov r8, rdx
and r8, 0xfffffffffffffffc
je 0x14002c2bc
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 0x14002c290
and edx, 3
sub rdx, 1
je 0x14002c2ec
sub rdx, 1
je 0x14002c2df
cmp rdx, 1
jne 0x14002c2f2
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 0x14002c357
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
jne 0x14002c357
cmp dword [0x1402c0f40], 0x3e
jae 0x14002c413
xor r8d, r8d
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
je 0x14002c413
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 0x14002c37e
xor edx, edx
call fcn.14017f020
jmp 0x14002c38f
lea rdx, [r8 + 2]
movzx r8d, word [r8 + r9]
add rdx, r9
call fcn.14017f660
mov r15, rax
test rax, rax
je 0x14002c413
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x14002c413
mov ecx, dword [0x14000003c]
lea eax, [rcx - 1]
cmp eax, 0x7ffffffd
ja 0x14002c413
lea r10, [0x140000000]
add rcx, r10
cmp dword [rcx], 0x4550
jne 0x14002c413
movzx r9d, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
add r9, rcx
test r8d, r8d
je 0x14002c413
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 0x14002c40c
mov eax, dword [r9 + rcx + 0x28]
add rax, rdx
add rax, r10
cmp r14, rax
jb 0x14002c441
inc edi
cmp edi, r8d
jb 0x14002c3e0
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1401e5e20
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 0x14002c413
test rdi, rdi
je 0x14002c413
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x40], rbx
lock bts qword [0x1402ca588], 0
setb al
test al, al
je 0x14002c477
lea rcx, [0x1402ca588]
call sym.SystemInformer.exe_PhfAcquireQueuedLockExclusive
mov eax, dword [0x1402ca580]
inc eax
mov dword [0x1402ca580], eax
cmp eax, 1
jne 0x14002c4bf
lea rax, [0x1402c0ac0]
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 0x14002c4bf
lfence
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
mov rcx, rbp
lock xadd qword [0x1402ca588], rcx
movzx eax, cl
and al, 6
cmp al, 2
jne 0x14002c4f3
lea rax, [rcx - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402ca588], rdx
jne 0x14002c4f3
lea rcx, [0x1402ca588]
call fcn.1401740c0
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 [0x1402ca588], 0
setb al
test al, al
je 0x14002c525
lea rcx, [0x1402ca588]
call sym.SystemInformer.exe_PhfAcquireQueuedLockExclusive
add dword [0x1402ca580], 0xffffffff
jne 0x14002c552
mov r9d, dword [0x1402c0ac0]
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 [0x1402ca588], rbp
movzx eax, bpl
and al, 6
cmp al, 2
jne 0x14002c585
lea rax, [rbp - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402ca588], rdx
jne 0x14002c585
lea rcx, [0x1402ca588]
nop
call fcn.1401740c0
mov rax, rsi
xchg qword [r13], rax
cmp rax, rsi
jne 0x14002c59f
test r12b, r12b
je 0x14002c59f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, r15
jmp 0x14002c415