Function at 0x14002c9e0
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 [0x1402bb040]
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 0x14002cb61
xor edx, edx
mov word [rsp + 0x50], di
mov r8d, 0x206
lea rcx, [rsp + 0x52]
call fcn.14020c410
lea rcx, [rsp + 0x50]
mov rdx, rbp
nop dword [rax]
inc rdx
cmp byte [rbx + rdx], dil
jne 0x14002ca70
mov r8, rdx
and r8, 0xfffffffffffffffc
je 0x14002cabc
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 0x14002ca90
and edx, 3
sub rdx, 1
je 0x14002caec
sub rdx, 1
je 0x14002cadf
cmp rdx, 1
jne 0x14002caf2
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 0x14002cb57
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x200
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
jne 0x14002cb57
cmp dword [0x1402bbf68], 0x3e
jae 0x14002cc13
xor r8d, r8d
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rsi, rax
test rax, rax
je 0x14002cc13
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 0x14002cb7e
xor edx, edx
call fcn.14017fae0
jmp 0x14002cb8f
lea rdx, [r8 + 2]
movzx r8d, word [r8 + r9]
add rdx, r9
call fcn.140180300
mov r15, rax
test rax, rax
je 0x14002cc13
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x14002cc13
mov ecx, dword [0x14000003c]
lea eax, [rcx - 1]
cmp eax, 0x7ffffffd
ja 0x14002cc13
lea r10, [0x140000000]
add rcx, r10
cmp dword [rcx], 0x4550
jne 0x14002cc13
movzx r9d, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
add r9, rcx
test r8d, r8d
je 0x14002cc13
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 0x14002cc0c
mov eax, dword [r9 + rcx + 0x28]
add rax, rdx
add rax, r10
cmp r14, rax
jb 0x14002cc41
inc edi
cmp edi, r8d
jb 0x14002cbe0
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1401e5e40
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 0x14002cc13
test rdi, rdi
je 0x14002cc13
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x40], rbx
lock bts qword [0x1402c4c78], 0
setb al
test al, al
je 0x14002cc77
lea rcx, [0x1402c4c78]
call sym.SystemInformer.exe_Ordinal_1254
mov eax, dword [0x1402c4c70]
inc eax
mov dword [0x1402c4c70], eax
cmp eax, 1
jne 0x14002ccbf
lea rax, [0x1402bbb10]
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 0x14002ccbf
lfence
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3
mov rcx, rbp
lock xadd qword [0x1402c4c78], rcx
movzx eax, cl
and al, 6
cmp al, 2
jne 0x14002ccf3
lea rax, [rcx - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402c4c78], rdx
jne 0x14002ccf3
lea rcx, [0x1402c4c78]
call fcn.140174ba0
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 [0x1402c4c78], 0
setb al
test al, al
je 0x14002cd25
lea rcx, [0x1402c4c78]
call sym.SystemInformer.exe_Ordinal_1254
mov eax, dword [0x1402c4c70]
add eax, 0xffffffff
mov dword [0x1402c4c70], eax
jne 0x14002cd5a
mov r9d, dword [0x1402bbb10]
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 [0x1402c4c78], rbp
movzx eax, bpl
and al, 6
cmp al, 2
jne 0x14002cd8e
lea rax, ss:[rbp - 1]
lea rdx, [rax + 4]
lock cmpxchg qword [0x1402c4c78], rdx
jne 0x14002cd8e
lea rcx, [0x1402c4c78]
call fcn.140174ba0
mov rax, rsi
xchg qword [r13], rax
cmp rax, rsi
jne 0x14002cda8
test r12b, r12b
je 0x14002cda8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, r15
jmp 0x14002cc15