Function at 0x140023f30
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x90
xor r12d, r12d
lea rax, [rdx - 1]
mov r13, rdx
mov r8d, r12d
mov esi, r12d
cmp rax, 0x3e
jbe 0x140023f85
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400247af
test rdx, rdx
je 0x140023fa1
movsxd rax, dword [rcx + 0x3c]
add rax, 0x108
cmp rdx, rax
jae 0x140023fa1
mov ecx, SafeArrayDestroy
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x90
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
movsxd rbp, dword [rcx + 0x3c]
add rbp, rcx
mov qword [rsp + 0xd8], rbp
cmp dword [rbp], 0x4550
jne 0x1400247af
mov eax, 0x8664
cmp word [rbp + 4], ax
jne 0x1400247af
mov eax, dword [rbp + 0x38]
test al, 1
jne 0x1400247af
movzx ecx, word [rbp + 0x14]
mov r10d, eax
movzx eax, word [rbp + 6]
add rcx, 0x24
cmp r12w, ax
jae 0x140024018
add rcx, rbp
movzx r9d, ax
mov eax, dword [rcx + 4]
mov edx, dword [rcx]
test eax, eax
jne 0x140024002
lea rax, [r10 + rdx]
jmp 0x140024004
add eax, edx
cmp rax, r8
cmovbe rax, r8
add rcx, 0x28
mov r8, rax
sub r9, 1
jne 0x140023ff3
mov edi, dword [rbp + 0x50]
lea rcx, [r10 - 1]
dec rdi
lea rax, [r10 - 1]
add rdi, r10
not rcx
add rax, r8
and rdi, rcx
and rax, rcx
cmp rdi, rax
jne 0x1400247af
mov rcx, qword [rbp + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x78], r15
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
test rax, rax
jne 0x140024091
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
test rax, rax
jne 0x140024091
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140024174
mov qword [rsp + 0x88], rbx
lea rcx, [r15 + rdi]
mov qword [rsp + 0x80], r14
mov rax, r15
movabs r14, 0xffffffff00000000
and rcx, r14
and rax, r14
cmp rax, rcx
jae 0x14002410f
nop dword [rax]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x14002412f
mov qword [rax], rsi
mov r9d, 4
mov r8d, 0x3000
mov qword [rax + 8], r15
mov rdx, rdi
xor ecx, ecx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r15, rax
test rax, rax
je 0x140024188
lea rcx, [rax + rdi]
and rax, r14
and rcx, r14
cmp rax, rcx
jb 0x1400240c0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
jne 0x14002418d
xor edx, edx
mov r8d, 0x8000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, rsi
mov r8, qword [rsp + 0xf8]
lea rdx, [0x140023eb0]
call fcn.1400237c0
mov ecx, SafeArrayDestroy
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov r14, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x88]
mov r15, qword [rsp + 0x78]
add rsp, 0x90
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbx
jmp 0x140024143
mov edx, 8
xor r8d, r8d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov qword [r14 + 0x18], rax
mov qword [r14 + 8], r15
movzx eax, word [rbp + 0x16]
shr eax, 0xd
and eax, 1
mov dword [r14 + 0x28], eax
lea rax, [0x140023ea0]
mov qword [r14 + 0x30], rax
lea rax, [0x140023eb0]
mov qword [r14 + 0x38], rax
mov rax, qword [rsp + 0xe0]
mov qword [r14 + 0x40], rax
mov rax, qword [rsp + 0xe8]
mov qword [r14 + 0x48], rax
mov rax, qword [rsp + 0xf0]
mov qword [r14 + 0x50], rax
mov rax, qword [rsp + 0xf8]
mov qword [r14 + 0x60], rax
mov eax, dword [rbp + 0x38]
mov dword [r14 + 0x70], eax
mov qword [r14 + 0x78], rsi
test r13, r13
je 0x140024229
mov eax, dword [rbp + 0x54]
cmp r13, rax
jae 0x140024229
mov ecx, SafeArrayDestroy
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, r14
call fcn.140024970
jmp 0x140024162
mov edx, dword [rbp + 0x54]
mov r9d, 4
mov r8d, 0x1000
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, qword [rsp + 0xc0]
mov rcx, rax
mov r8d, dword [rbp + 0x54]
mov rdx, rdi
mov rbx, rax
call sub.VCRUNTIME140.dll_memcpy
movsxd rax, dword [rdi + 0x3c]
mov ebp, r12d
add rax, rbx
mov qword [r14], rax
mov qword [rax + 0x30], r15
mov rcx, qword [r14]
mov rsi, qword [r14 + 8]
movzx edi, word [rcx + 0x14]
add rdi, 0x24
cmp r12w, word [rcx + 6]
jae 0x14002435d
add rdi, rcx
nop dword [rax]
mov ecx, dword [rdi + 4]
test ecx, ecx
jne 0x1400242ec
mov rax, qword [rsp + 0xd8]
movsxd rax, dword [rax + 0x38]
test eax, eax
jle 0x140024348
mov ecx, dword [rdi]
mov rbx, rax
mov rax, qword [r14 + 0x60]
add rcx, rsi
mov rdx, rbx
mov qword [rsp + 0x20], rax
mov r9d, 4
mov r8d, 0x1000
call qword [r14 + 0x30]
test rax, rax
je 0x14002421c
mov ecx, dword [rdi]
mov r8, rbx
add rcx, rsi
xor edx, edx
mov dword [rdi - 4], ecx
call sub.VCRUNTIME140.dll_memset
jmp 0x140024348
test r13, r13
je 0x1400242ff
mov eax, dword [rdi + 8]
add eax, ecx
cmp r13, rax
jb 0x140024211
mov rax, qword [r14 + 0x60]
mov rdx, rcx
mov ecx, dword [rdi]
mov r9d, 4
add rcx, rsi
mov qword [rsp + 0x20], rax
mov r8d, 0x1000
call qword [r14 + 0x30]
test rax, rax
je 0x14002421c
mov ebx, dword [rdi]
mov edx, dword [rdi + 8]
add rbx, rsi
mov r8d, dword [rdi + 4]
mov rcx, rbx
add rdx, qword [rsp + 0xc0]
call sub.VCRUNTIME140.dll_memcpy
mov dword [rdi - 4], ebx
mov rcx, qword [r14]
inc ebp
add rdi, 0x28
movzx eax, word [rcx + 6]
cmp ebp, eax
jl 0x140024290
mov rbx, qword [rsp + 0xd8]
mov rbp, qword [rcx + 0x30]
sub rbp, qword [rbx + 0x30]
je 0x140024427
cmp dword [rcx + 0xb4], r12d
jne 0x140024384
mov eax, r12d
jmp 0x14002442c
mov r13, qword [r14 + 8]
mov esi, dword [rcx + 0xb0]
add rsi, r13
mov eax, dword [rsi]
test eax, eax
je 0x140024427
nop dword [rax + rax]
mov edi, eax
lea rdx, [rsi + 8]
mov eax, dword [rsi + 4]
add rdi, r13
sub rax, 8
mov r8d, r12d
test rax, 0xfffffffffffffffe
jbe 0x1400243fa
nop dword [rax + rax]
movzx eax, word [rdx]
mov ecx, eax
shr eax, 0xc
and ecx, 0xfff
cmp eax, 3
je 0x1400243de
cmp eax, 0xa
jne 0x1400243e1
add qword [rcx + rdi], rbp
jmp 0x1400243e1
add dword [rcx + rdi], ebp
mov ecx, dword [rsi + 4]
inc r8d
sub rcx, 8
mov eax, r8d
shr rcx, 1
add rdx, 2
cmp rax, rcx
jb 0x1400243c0
mov ebx, dword [r14 + 0x70]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8d, ebx
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [rsi + 4]
add rsi, rax
mov eax, dword [rsi]
test eax, eax
jne 0x1400243a0
mov rbx, qword [rsp + 0xd8]
mov eax, 1
mov rcx, r14
mov dword [r14 + 0x2c], eax
call fcn.140023b00
test eax, eax
je 0x14002421c
mov rcx, r14
call fcn.1400238f0
test eax, eax
je 0x14002421c
mov rax, qword [0x140101cf0]
cmp qword [rbx + 0x30], rax
je 0x140024499
mov rax, qword [r14]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x140024499
mov rdi, qword [r14 + 8]
mov rbx, qword [rcx + rdi + 0x18]
test rbx, rbx
je 0x140024499
mov rax, qword [rbx]
test rax, rax
je 0x140024499
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
lea rbx, [rbx + 8]
test rax, rax
jne 0x140024480
mov rdx, qword [r14]
mov eax, dword [rdx + 0x28]
test eax, eax
je 0x1400247a3
cmp dword [r14 + 0x28], r12d
je 0x140024794
cmp byte [rsp + 0x100], r12b
je 0x140024784
lea r13, [r15 + rax]
mov rbp, r12
mov rax, qword gs:[0x60]
mov rcx, qword [r14 + 8]
mov qword [0x140102c40], rcx
mov r8, qword [rax + 0x110]
mov eax, dword [rdx + 0x50]
add rax, rcx
mov qword [rsp + 0xc8], r8
mov rcx, r8
mov qword [0x140102c38], rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [0x1400cb6f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.RtlPcToFileHeader
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
mov rsi, rax
call fcn.140025070
test rax, rax
je 0x1400246a4
mov rdi, qword [rax + 8]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x40], rdi
mov rdx, qword [rdi]
inc dword [rax + 0x10]
mov qword [rax + 8], rdx
lea rax, [0x140023760]
mov qword [rsp + 0x38], rax
call fcn.140025390
test eax, eax
jne 0x14002456f
mov rcx, rdi
call fcn.1400252d0
jmp 0x1400246a4
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_HeapCreate]
mov rbp, rax
test rax, rax
je 0x1400246a4
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x35]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x1400245ac
mov rcx, rdi
call fcn.1400252d0
jmp 0x1400246a4
mov ecx, dword [rsp + 0x50]
movzx edx, cl
and dword [rbx + 0x21], 0xfffffff0
and dl, 1
mov rdi, qword [rsp + 0x30]
mov qword [rax], rdi
mov rax, qword [rsp + 0x48]
mov qword [rbx + 8], rax
mov rax, qword [rsp + 0x40]
mov qword [rbx + 0x10], rax
movzx eax, byte [rbx + 0x20]
and al, 0xf8
or dl, al
mov eax, dword [rsp + 0x54]
and eax, 0xf
mov byte [rbx + 0x20], dl
or dword [rbx + 0x21], eax
mov rax, qword [rsp + 0x58]
mov qword [rbx + 0x25], rax
mov rax, qword [rsp + 0x60]
mov qword [rbx + 0x2d], rax
test ecx, ecx
je 0x140024616
mov eax, dword [rsi - 5]
mov dword [rbx + 0x18], eax
movzx eax, word [rsi - 1]
mov word [rbx + 0x1c], ax
movzx eax, byte [rsi + 1]
mov byte [rbx + 0x1e], al
jmp 0x140024622
mov eax, dword [rsi]
mov dword [rbx + 0x18], eax
movzx eax, byte [rsi + 4]
mov byte [rbx + 0x1c], al
and dl, 1
je 0x14002462b
add rdi, 0xfffffffffffffffb
movzx eax, dl
lea r9, [rsp + 0xd8]
mov r8d, 0x40
mov rcx, rdi
lea rsi, [rax*2 + 5]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400246a4
mov byte [rdi], 0xe9
mov eax, dword [rbx + 8]
sub eax, edi
sub eax, 5
mov dword [rdi + 1], eax
test byte [rbx + 0x20], 1
je 0x140024670
mov rax, qword [rbx]
mov word [rax], 0xf9eb
mov r8d, dword [rsp + 0xd8]
lea r9, [rsp + 0xd8]
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rsi
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov r12, rbx
mov r8, r14
mov qword [0x140102c30], r12
mov edx, 1
mov rcx, r15
call r13
mov rdi, qword [0x140102c30]
mov r8d, 0x40
mov r15d, eax
mov rdx, qword [rdi]
movzx ecx, byte [rdi + 0x20]
and cl, 1
movzx r9d, cl
lea rbx, [rdx - 5]
cmove rbx, rdx
mov rcx, rbx
lea rsi, [r9*2 + 5]
mov rdx, rsi
lea r9, [rsp + 0xd0]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x14002473e
mov eax, dword [rdi + 0x18]
test byte [rdi + 0x20], 1
mov dword [rbx], eax
je 0x14002471b
movzx eax, word [rdi + 0x1c]
mov word [rbx + 4], ax
movzx eax, byte [rdi + 0x1e]
mov byte [rbx + 6], al
jmp 0x140024722
movzx eax, byte [rdi + 0x1c]
mov byte [rbx + 4], al
mov r8d, dword [rsp + 0xd0]
lea r9, [rsp + 0xd0]
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8, qword [0x140102c30]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_HeapDestroy]
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r15d, r15d
jne 0x140024784
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, r14
call fcn.140024970
jmp 0x140024162
mov dword [r14 + 0x24], 1
mov rax, r14
jmp 0x140024164
add rax, r15
mov qword [r14 + 0x68], rax
mov rax, r14
jmp 0x140024164
mov qword [r14 + 0x68], r12
mov rax, r14
jmp 0x140024164
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x90
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret