Function at 0x140006820
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
sub rsp, 0x2c0
mov rax, qword [0x140017040]
xor rax, rsp
mov qword [rsp + 0x2b8], rax
xor eax, eax
cmp eax, 1
je 0x140006aba
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rsp + 0x48], eax
lea rax, [rsp + 0xa0]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov r8d, dword [rsp + 0x48]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x40], rax
lea rdx, [0x140013880]
lea rcx, [rsp + 0x70]
call fcn.140006ae0
mov rcx, rax
call fcn.140006b10
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x38], 0
jmp 0x1400068b6
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
movsxd rax, dword [rsp + 0x38]
cmp rax, 3
jae 0x1400068f7
movsxd rax, dword [rsp + 0x38]
imul rax, rax, 0x18
lea rcx, [0x140017780]
mov rdx, qword [rcx + rax]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
movsxd rcx, dword [rsp + 0x38]
imul rcx, rcx, 0x18
lea rdx, [0x140017780]
mov qword [rdx + rcx + 8], rax
jmp 0x1400068ac
mov byte [rsp + 0x31], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x50], rax
lea rdx, str.ntdll
lea rcx, [rsp + 0x80]
call fcn.140006b30
mov rcx, rax
call fcn.140006b60
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call fcn.1400010b0
test rax, rax
jne 0x140006969
lea rdx, str.NTDLL
lea rcx, [rsp + 0x90]
call fcn.140006b30
mov rcx, rax
call fcn.140006b60
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call fcn.1400010b0
test rax, rax
je 0x140006aaa
mov dword [rsp + 0x34], 0
jmp 0x14000697d
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
movsxd rax, dword [rsp + 0x34]
cmp rax, 3
jae 0x140006aaa
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0x18
lea rcx, [0x140017780]
movsxd rdx, dword [rsp + 0x34]
imul rdx, rdx, 0x18
lea rdi, [0x140017780]
lea r8, [rsp + 0x2b0]
mov qword [rsp + 0x20], r8
mov r9d, 0x40
mov r8, qword [rcx + rax + 0x10]
mov rdx, qword [rdi + rdx + 8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0x18
lea rcx, [0x140017780]
movsxd rdx, dword [rsp + 0x34]
imul rdx, rdx, 0x18
lea rdi, [0x140017780]
movsxd r8, dword [rsp + 0x34]
imul r8, r8, 0x18
mov qword [rsp + 0x68], r8
lea r9, [0x140017780]
mov qword [rsp + 0x60], r9
mov qword [rsp + 0x20], 0
mov r9, qword [rcx + rax + 0x10]
mov r8, qword [rdi + rdx + 8]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x68]
mov rdx, qword [rcx + rax + 8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140006a46
mov byte [rsp + 0x30], 1
jmp 0x140006a4b
mov byte [rsp + 0x30], 0
movzx eax, byte [rsp + 0x30]
mov byte [rsp + 0x31], al
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0x18
lea rcx, [0x140017780]
movsxd rdx, dword [rsp + 0x34]
imul rdx, rdx, 0x18
lea rdi, [0x140017780]
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x2b0]
mov r8, qword [rcx + rax + 0x10]
mov rdx, qword [rdi + rdx + 8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
movzx eax, byte [rsp + 0x31]
test eax, eax
jne 0x140006aa5
jmp 0x140006aaa
jmp 0x140006973
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000683b
mov rcx, qword [rsp + 0x2b8]
xor rcx, rsp
call fcn.14000e450
add rsp, 0x2c0
pop rdi
ret