Function at 0x140015940
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x6a0]
sub rsp, 0x7a0
mov rax, qword [0x140055008]
xor rax, rsp
mov qword [rbp + 0x690], rax
movzx r14d, r8w
mov rsi, rdx
mov rdi, rcx
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x50]
call sub.msvcrt.dll_memset
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x108
call sub.msvcrt.dll_memset
xor edx, edx
lea rcx, [rbp + 0x190]
mov r8d, 0x500
call sub.msvcrt.dll_memset
and qword [rsp + 0x20], 0
lea r8, [rbp + 0x150]
mov r9d, 0x40
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x140015c42
movsxd rbx, dword [rbp + 0x18c]
lea r8, [rbp + 0x50]
and qword [rsp + 0x20], 0
add rbx, rsi
mov rdx, rbx
mov r9d, pe_nt_image_headers64
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x140015c42
cmp word [rbp + 0x56], 0x20
ja 0x140015c42
movzx eax, word [rbp + 0x56]
lea r8, [rbp + 0x190]
movzx edx, word [rbp + 0x64]
mov rcx, rdi
and qword [rsp + 0x20], 0
add rdx, 0x18
add rdx, rbx
lea r9d, [rax + rax*4]
shl r9d, 3
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_ReadProcessMemory]
test eax, eax
je 0x140015c42
mov eax, dword [rbp + 0x50]
lea rdx, [rbp + 0xc8]
mov dword [rsp + 0x40], eax
lea rcx, [rbp - 0x38]
mov eax, dword [rbp + 0x64]
mov r8d, 0x80
mov dword [rsp + 0x54], eax
mov eax, 0xf0
movups xmm0, xmmword [rbp + 0x54]
mov word [rsp + 0x54], ax
mov eax, 0x20b
mov word [rsp + 0x58], ax
mov al, byte [rbp + 0x6a]
mov byte [rsp + 0x5a], al
mov al, byte [rbp + 0x6b]
mov byte [rsp + 0x5b], al
mov eax, dword [rbp + 0x6c]
mov dword [rsp + 0x5c], eax
mov eax, dword [rbp + 0x70]
mov dword [rsp + 0x60], eax
mov eax, dword [rbp + 0x74]
mov dword [rsp + 0x64], eax
mov eax, dword [rbp + 0x78]
mov dword [rsp + 0x68], eax
mov eax, dword [rbp + 0x7c]
mov dword [rsp + 0x6c], eax
mov eax, dword [rbp + 0x84]
mov qword [rsp + 0x70], rax
mov eax, dword [rbp + 0x88]
mov dword [rsp + 0x78], eax
mov eax, dword [rbp + 0x8c]
mov dword [rsp + 0x7c], eax
movzx eax, word [rbp + 0x90]
mov word [rbp - 0x80], ax
movzx eax, word [rbp + 0x92]
mov word [rbp - 0x7e], ax
movzx eax, word [rbp + 0x94]
mov word [rbp - 0x7c], ax
movzx eax, word [rbp + 0x96]
mov word [rbp - 0x7a], ax
movzx eax, word [rbp + 0x98]
mov word [rbp - 0x78], ax
movzx eax, word [rbp + 0x9a]
mov word [rbp - 0x76], ax
mov eax, dword [rbp + 0x9c]
mov dword [rbp - 0x74], eax
mov eax, dword [rbp + 0xa0]
mov dword [rbp - 0x70], eax
mov eax, dword [rbp + 0xa4]
mov dword [rbp - 0x6c], eax
mov eax, dword [rbp + 0xa8]
mov dword [rbp - 0x68], eax
movzx eax, word [rbp + 0xac]
mov word [rbp - 0x64], ax
movzx eax, word [rbp + 0xae]
mov word [rbp - 0x62], ax
mov eax, dword [rbp + 0xb0]
mov qword [rbp - 0x60], rax
mov eax, dword [rbp + 0xb4]
mov qword [rbp - 0x58], rax
mov eax, dword [rbp + 0xb8]
mov qword [rbp - 0x50], rax
mov eax, dword [rbp + 0xbc]
mov qword [rbp - 0x48], rax
mov eax, dword [rbp + 0xc0]
mov dword [rbp - 0x40], eax
mov eax, dword [rbp + 0xc4]
movups xmmword [rsp + 0x44], xmm0
mov dword [rbp - 0x3c], eax
mov word [rsp + 0x44], r14w
call sub.msvcrt.dll_memcpy
and dword [rbp - 0x30], 0
lea rax, [rsp + 0x30]
and dword [rbp - 0x2c], 0
mov r9d, 0x40
and dword [rsp + 0x30], 0
mov rdx, rsi
mov r8d, dword [rbp - 0x6c]
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualProtectEx]
test eax, eax
je 0x140015c42
and qword [rsp + 0x20], 0
lea r8, [rsp + 0x40]
mov r9d, 0x108
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_WriteProcessMemory]
test eax, eax
je 0x140015c42
movzx eax, word [rsp + 0x46]
lea r8, [rbp + 0x190]
movzx edx, word [rsp + 0x54]
mov rcx, rdi
and qword [rsp + 0x20], 0
add rdx, 0x18
add rdx, rbx
lea r9d, [rax + rax*4]
shl r9d, 3
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_WriteProcessMemory]
test eax, eax
je 0x140015c42
mov r8d, dword [rbp - 0x6c]
lea rax, [rsp + 0x34]
mov r9d, dword [rsp + 0x30]
mov rdx, rsi
and dword [rsp + 0x34], 0
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_memory_l1_1_0.dll_VirtualProtectEx]
test eax, eax
je 0x140015c42
mov eax, 1
jmp 0x140015c44
xor eax, eax
mov rcx, qword [rbp + 0x690]
xor rcx, rsp
call fcn.140016790
add rsp, 0x7a0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret