Function at 0x18021f040
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xa8
mov dword [rsp + 0x40], 0
cmp qword [rsp + 0xc0], 0
je 0x18021f07d
mov rax, qword [rsp + 0xc0]
mov qword [rax], 0
cmp qword [rsp + 0xc8], 0
je 0x18021f097
mov rax, qword [rsp + 0xc8]
mov qword [rax], 0
cmp qword [rsp + 0xd0], 0
je 0x18021f0b1
mov rax, qword [rsp + 0xd0]
mov qword [rax], 0
cmp qword [rsp + 0xb8], 0
jne 0x18021f0c6
mov eax, 0x57
jmp 0x18021f646
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1802c94d8], eax
je 0x18021f0de
mov eax, 0x10dd
jmp 0x18021f646
cmp dword [0x1802c94dc], 0
je 0x18021f0f2
mov eax, dword [0x1802c94dc]
jmp 0x18021f646
cmp qword [rsp + 0xb0], 0
jne 0x18021f107
mov eax, 6
jmp 0x18021f646
mov rax, qword [rsp + 0xb0]
cmp qword [rax], 0
jne 0x18021f13f
mov dword [rsp + 0x40], 6
mov eax, dword [rsp + 0x40]
mov dword [0x1802c94dc], eax
mov rax, qword [rsp + 0xb0]
mov qword [0x1802c94e0], rax
mov eax, dword [rsp + 0x40]
jmp 0x18021f646
mov rax, qword [rsp + 0xb0]
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x58], 0
xor edx, edx
mov rcx, qword [rsp + 0x50]
call fcn.18021f650
mov qword [rsp + 0x50], rax
xor edx, edx
mov rcx, qword [rsp + 0xb8]
call fcn.18021f650
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0xb8], rax
jne 0x18021f1ab
cmp dword [0x1802c94d0], 0
je 0x18021f1a7
jmp 0x18021f221
jmp 0x18021f217
cmp qword [rsp + 0xc8], 0
je 0x18021f1c6
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x50]
mov qword [rax], rcx
cmp qword [rsp + 0xd0], 0
je 0x18021f1e4
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xb8]
mov qword [rax], rcx
mov ecx, 0x30
call fcn.18028ae74
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x18021f29e
mov dword [rsp + 0x40], 8
mov eax, dword [rsp + 0x40]
mov dword [0x1802c94dc], eax
cmp qword [rsp + 0x38], 0
je 0x18021f256
mov rcx, qword [rsp + 0x38]
call fcn.18021e300
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0xc0], 0
je 0x18021f256
mov rax, qword [rsp + 0xc0]
mov qword [rax], 0
cmp qword [rsp + 0x58], 0
je 0x18021f286
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x98], rax
mov edx, 0x30
mov rcx, qword [rsp + 0x98]
call fcn.18028b230
mov qword [rsp + 0x58], 0
mov rax, qword [rsp + 0xb0]
mov qword [0x1802c94e0], rax
mov eax, dword [rsp + 0x40]
jmp 0x18021f646
mov rcx, qword [rsp + 0x50]
call fcn.18021dc30
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x18021f2c2
mov dword [rsp + 0x40], 8
jmp 0x18021f217
cmp qword [rsp + 0xc0], 0
je 0x18021f2dd
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x38]
mov qword [rax], rcx
mov rax, qword [rsp + 0x38]
add rax, 0x40
mov r8d, 8
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
add rax, 0x1e
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x60], 5
mov dword [rsp + 0x44], 0
mov eax, dword [rsp + 0x60]
cmp dword [rsp + 0x30], eax
jae 0x18021f448
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x70], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x68]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
call fcn.180221170
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x68]
sub rcx, rax
mov rax, rcx
movsxd rcx, dword [rsp + 0x70]
add rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x44]
movzx ecx, byte [rsp + 0x30]
and cl, 7
mov rdx, qword [rsp + 0x38]
movzx eax, byte [rdx + rax + 0x40]
and al, 0xf8
or al, cl
mov ecx, dword [rsp + 0x44]
mov rdx, qword [rsp + 0x38]
mov byte [rdx + rcx + 0x40], al
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x44]
and al, 0x1f
shl al, 3
mov rdx, qword [rsp + 0x38]
movzx ecx, byte [rdx + rcx + 0x40]
and cl, 7
or cl, al
movzx eax, cl
mov ecx, dword [rsp + 0x44]
mov rdx, qword [rsp + 0x38]
mov byte [rdx + rcx + 0x40], al
mov eax, dword [rsp + 0x44]
inc eax
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
cmp rax, 8
jb 0x18021f430
jmp 0x18021f448
mov rcx, qword [rsp + 0x88]
call fcn.18021dfd0
test eax, eax
je 0x18021f443
jmp 0x18021f448
jmp 0x18021f333
mov eax, dword [rsp + 0x60]
cmp dword [rsp + 0x30], eax
jae 0x18021f494
mov rcx, qword [rsp + 0x68]
call fcn.18021e500
mov dword [rsp + 0x74], eax
cmp dword [rsp + 0x74], 0
jne 0x18021f469
jmp 0x18021f494
movsxd rax, dword [rsp + 0x74]
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x30], eax
jmp 0x18021f448
mov eax, dword [rsp + 0x60]
cmp dword [rsp + 0x30], eax
jb 0x18021f4a8
mov eax, dword [rsp + 0x44]
cmp rax, 8
jbe 0x18021f4c5
mov dword [rsp + 0x40], 9
cmp dword [0x1802c94d0], 0
je 0x18021f4c0
jmp 0x18021f221
jmp 0x18021f217
mov rax, qword [rsp + 0x80]
cmp qword [rsp + 0x48], rax
jbe 0x18021f4d5
int3
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x38]
mov byte [rcx + 0x1e], al
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax + 0x3e], cl
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
add rcx, 0x20
mov r8d, eax
mov rdx, qword [rsp + 0x50]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x60]
mov edx, 0x1e
sub rdx, rcx
mov rcx, rdx
cmp rax, rcx
jbe 0x18021f539
mov dword [rsp + 0x40], 6
jmp 0x18021f217
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x38]
mov qword [rcx + 0x48], rax
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0xb8]
mov qword [rax + 0x50], rcx
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax + 0x1e]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x38]
add rax, 0x48
mov rdx, rax
mov rcx, qword [rsp + 0x48]
call fcn.18021e480
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
call fcn.18021e3e0
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x78], 0
mov eax, dword [rsp + 0x30]
lea r9, [rsp + 0x78]
mov r8d, 0x40
mov edx, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x18021f5e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
jmp 0x18021f217
mov rax, qword [rsp + 0x58]
mov dword [rax + 8], 0
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xb0]
mov qword [rax + 0x10], rcx
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x38]
mov qword [rax + 0x20], rcx
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 0x18], rcx
mov rax, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x78]
mov dword [rax + 0x28], ecx
mov rax, qword [rsp + 0x58]
mov rcx, qword [0x1802c94f0]
mov qword [rax], rcx
mov rax, qword [rsp + 0x58]
mov qword [0x1802c94f0], rax
xor eax, eax
add rsp, 0xa8
ret