Function at 0x14018f1e0
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x58
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
cmp dword [0x1402c91cc], ecx
je 0x14018f202
mov eax, 0xc0000476
add rsp, 0x58
ret
cmp dword [0x1402c91c8], 0
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x50], rdi
jge 0x14018f305
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
cmp dword [0x1402c91cc], ecx
jne 0x14018f5d5
mov rdi, qword [0x1402ca238]
xor esi, esi
test rdi, rdi
je 0x14018f2f3
nop dword [rax]
mov dword [rsp + 0x30], esi
lea r8, [rsp + 0x38]
mov rax, qword [rdi + 0x18]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
mov rax, qword [rdi + 0x20]
movzx ecx, byte [rax + 0x3e]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x38], rcx
mov rcx, 0xffffffffffffffff
mov r9d, dword [rdi + 0x28]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
cmp dword [rdi + 8], esi
jne 0x14018f2d7
mov r8, qword [rdi + 0x20]
test r8, r8
je 0x14018f2d7
xorps xmm0, xmm0
mov rdx, r8
movups xmmword [r8], xmm0
and rdx, 0xffffffffffff0000
movups xmmword [r8 + 0x10], xmm0
movups xmmword [r8 + 0x20], xmm0
movups xmmword [r8 + 0x30], xmm0
movups xmmword [r8 + 0x40], xmm0
movups xmmword [r8 + 0x50], xmm0
mov rax, qword [rdx + 0x10]
mov qword [r8 + 0x48], rax
mov qword [rdx + 0x10], r8
mov qword [rdi + 0x20], rsi
mov rbx, qword [rdi]
mov edx, 0x30
mov rcx, rdi
call fcn.1401e615c
mov rdi, rbx
test rbx, rbx
jne 0x14018f250
mov qword [0x1402ca238], rsi
call fcn.14018eae0
nop
jmp 0x14018f5c8
mov rdi, qword [0x1402ca238]
xor esi, esi
mov qword [rsp + 0x68], rbp
mov ebp, esi
mov rbx, rdi
test rdi, rdi
je 0x14018f492
nop dword [rax]
mov rdx, qword [rbx + 0x20]
cmp dword [rbx + 8], esi
je 0x14018f351
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
mov rcx, qword [rbx + 0x18]
call fcn.14020c7e0
mov rax, qword [rbx + 0x18]
jmp 0x14018f3a9
mov word [rdx + 0x58], 0x25ff
lea rcx, [rdx + 0x58]
lea rax, [rcx + 6]
sub edx, eax
add edx, 0x50
mov dword [rcx + 2], edx
mov r8, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x20]
add rcx, 0x58
lea rax, [r8 + 5]
mov byte [r8], 0xe9
sub ecx, eax
mov dword [r8 + 1], ecx
lea rcx, [r8 + 5]
mov rax, qword [rbx + 0x20]
mov r8, qword [rax + 0x48]
sub r8, rcx
cmp rcx, qword [rax + 0x48]
cmova r8, rsi
test r8, r8
je 0x14018f3a5
mov dl, 0xcc
call fcn.14020c410
mov rax, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14018f330
nop dword [rax]
test rdi, rdi
je 0x14018f492
nop dword [rax]
mov dword [rsp + 0x30], esi
lea r8, [rsp + 0x40]
mov rax, qword [rdi + 0x18]
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x38], rax
mov rax, qword [rdi + 0x20]
movzx ecx, byte [rax + 0x3e]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x40], rcx
mov rcx, 0xffffffffffffffff
mov r9d, dword [rdi + 0x28]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov rax, qword [rdi + 0x20]
mov rcx, 0xffffffffffffffff
mov rdx, qword [rdi + 0x18]
movzx r8d, byte [rax + 0x3e]
call qword [sym.imp.ntdll.dll_NtFlushInstructionCache]
cmp dword [rdi + 8], esi
je 0x14018f476
mov r8, qword [rdi + 0x20]
test r8, r8
je 0x14018f476
xorps xmm0, xmm0
mov rdx, r8
movups xmmword [r8], xmm0
and rdx, 0xffffffffffff0000
mov ebp, 1
movups xmmword [r8 + 0x10], xmm0
movups xmmword [r8 + 0x20], xmm0
movups xmmword [r8 + 0x30], xmm0
movups xmmword [r8 + 0x40], xmm0
movups xmmword [r8 + 0x50], xmm0
mov rax, qword [rdx + 0x10]
mov qword [r8 + 0x48], rax
mov qword [rdx + 0x10], r8
mov qword [rdi + 0x20], rsi
mov rbx, qword [rdi]
mov edx, 0x30
mov rcx, rdi
call fcn.1401e615c
mov rdi, rbx
test rbx, rbx
jne 0x14018f3d0
test ebp, ebp
mov qword [0x1402ca238], rsi
mov rbp, qword [rsp + 0x68]
je 0x14018f55b
cmp dword [0x1402c625c], esi
jne 0x14018f55b
mov r8, qword [0x1402ca228]
lea rbx, [0x1402ca228]
test r8, r8
je 0x14018f55b
nop dword [rax]
cmp dword [r8], 0x52334953
je 0x14018f4df
lea rbx, [r8 + 8]
jmp 0x14018f54f
lea r9, [r8 + 0x10000]
mov eax, esi
nop dword [rax + rax]
mov ecx, eax
lea rdx, [rcx + rcx*2]
shl rdx, 5
mov rcx, qword [rdx + r8 + 0xa8]
test rcx, rcx
je 0x14018f511
cmp rcx, r8
jb 0x14018f4d9
cmp rcx, r9
jae 0x14018f4d9
inc eax
cmp eax, 0x2a9
jb 0x14018f4f0
mov rax, qword [r8 + 8]
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x38], r8
mov r9d, 0x8000
lea r8, [rsp + 0x40]
mov qword [rbx], rax
mov rcx, 0xffffffffffffffff
mov qword [rsp + 0x40], rsi
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
mov qword [0x1402ca218], rsi
mov r8, qword [rbx]
test r8, r8
jne 0x14018f4d0
mov rbx, qword [0x1402ca228]
test rbx, rbx
je 0x14018f5c8
nop word [rax + rax]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], esi
mov r9d, 0x20
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
mov qword [rsp + 0x38], rbx
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x40], 0x10000
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov r8d, 0x10000
mov rdx, rbx
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtFlushInstructionCache]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x14018f570
mov qword [0x1402ca230], rsi
mov dword [0x1402c91cc], esi
mov eax, dword [0x1402c91c8]
mov rsi, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x50]
add rsp, 0x58
ret