Function at 0x1400012a0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
lea rax, [rdx + 0xfff]
mov dword [rsp + 0x28], 2
and rax, 0xfffffffffffff000
mov qword [rbp - 0x18], 0x1000
mov rdi, rax
mov dword [rsp + 0x20], 0x2000
add rax, 0x1000
shr rdi, 0xc
mov r15, r8
mov qword [rbp - 0x10], rax
mov rsi, rcx
lea r9, [rbp - 0x10]
xor r12d, r12d
lea rdx, [rbp - 0x20]
xor r8d, r8d
mov dword [rbp + 0x38], r12d
mov rcx, 0xffffffffffffffff
mov qword [rbp - 0x20], r12
call sub.ntdll.dll_NtAllocateVirtualMemory
mov ebx, eax
test eax, eax
jns 0x14000135b
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400016d6
mov r8d, ebx
lea rdx, str._n____NtAllocateVirtualMemory_1__Failed_With_Error:_0x_0.8X
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
jmp 0x14000169e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x1400013c5
lea rdx, str._n___Allocated_memory_for_payload
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rbp - 0x20]
mov ebx, r12d
sub qword [rbp - 0x10], 0x1000
add rax, 0x1000
mov qword [rbp - 0x20], rax
mov qword [rbp + 0x48], rax
test edi, edi
je 0x140001430
nop word [rax + rax]
mov dword [rsp + 0x28], 4
lea r9, [rbp - 0x18]
xor r8d, r8d
mov dword [rsp + 0x20], 0x1000
lea rdx, [rbp + 0x48]
mov rcx, 0xffffffffffffffff
call sub.ntdll.dll_NtAllocateVirtualMemory
mov r14d, eax
test eax, eax
js 0x14000163b
mov rax, qword [rbp - 0x18]
inc ebx
add qword [rbp + 0x48], rax
cmp ebx, edi
jb 0x1400013f0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x14000149a
lea rdx, str._n___Allocated_memory_for_payload
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rbp - 0x20]
mov ebx, r12d
mov qword [rbp + 0x48], rax
test edi, edi
je 0x1400014ec
nop dword [rax]
lea rax, [rbp + 0x38]
mov r9d, 0x40
lea r8, [rbp - 0x18]
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x48]
mov rcx, 0xffffffffffffffff
call sub.ntdll.dll_NtProtectVirtualMemory
mov r14d, eax
test eax, eax
js 0x140001666
mov rax, qword [rbp - 0x18]
inc ebx
add qword [rbp + 0x48], rax
cmp ebx, edi
jb 0x1400014b0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x140001556
lea rdx, str._n___Allocated_memory_for_payload
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rbp - 0x20]
mov qword [rbp + 0x48], rax
test edi, edi
je 0x1400015ac
mov r9d, edi
nop word [rax + rax]
mov r8, rsi
mov edx, 0x1000
sub r8, rax
nop dword [rax + rax]
movzx ecx, byte [r8 + rax]
mov byte [rax], cl
lea rax, [rax + 1]
sub rdx, 1
jne 0x140001580
mov rax, qword [rbp + 0x48]
add rsi, 0x1000
add rax, 0x1000
mov qword [rbp + 0x48], rax
sub r9, 1
jne 0x140001570
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x140001616
lea rdx, str._n___Allocated_memory_for_payload
mov rcx, rax
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rbp - 0x20]
mov qword [r15], rax
mov eax, 1
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400016d6
lea rdx, str._n____NtAllocateVirtualMemory__d__Failed_With_Error:_0x_0.8X_n
jmp 0x14000168f
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1400016d6
lea rdx, str._n____NtProtectVirtualMemory__d__Failed_With_Error:_0x_0.8X_n
mov r9d, r14d
mov r8d, ebx
mov rcx, rdi
call qword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0xfffffff5
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor r9d, r9d
mov qword [rsp + 0x20], r12
mov rcx, rax
mov r8d, ebx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x140001622