Function at 0x14004a0f0
Capabilities:
Allocate or change rwx memory
Get file size
Read file on windows

Disassembly:
test edx, edx
je 0x14004620b
mov r11, rsp
push rbx
sub rsp, 0xb0
mov rax, qword [0x14005b040]
xor rax, rsp
mov qword [rsp + 0x78], rax
cmp byte [rcx + 0x20], 0
mov ebx, edx
je 0x1400461f6
cmp qword [rcx + 0x18], 0xf
mov qword [r11 - 0x18], rdi
mov qword [r11 - 0x20], r12
jbe 0x140045fe0
mov rcx, qword [rcx]
xor r12d, r12d
xor r9d, r9d
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400461e6
xor edx, edx
mov qword [rsp + 0x80], r15
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r15d, eax
test eax, eax
je 0x140046238
mov r8d, ebx
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140046238
mov qword [rsp + 0xd0], rbp
lea r8, [r15 + 1]
mov qword [rsp + 0x90], r13
mov r9d, 0x1000
xor edx, edx
mov qword [rsp + 0x88], r14
mov rcx, rax
mov dword [rsp + 0x20], 0x40
mov r13d, r15d
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rbp, rax
test rax, rax
jne 0x1400460a8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400461c6
mov rcx, r13
mov qword [rsp + 0xa8], rsi
mov qword [rsp + 0x70], r12
call fcn.14004a844
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], r12
mov r8d, r15d
mov rdx, rax
mov rcx, rdi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400460ee
mov rcx, rsi
call fcn.14004a58c
lea r8, [r15 + 1]
jmp 0x140046218
mov rdx, rsi
call fcn.140047420
mov r15d, eax
test eax, eax
je 0x14004620c
lea rax, [rsp + 0x70]
mov r9, r13
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x48], r12
add r15, rbp
mov qword [rsp + 0x40], r12
mov r9, rbx
mov qword [rsp + 0x38], r12
xor r8d, r8d
mov dword [rsp + 0x30], r12d
mov edx, 0x1fffff
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], r15
mov qword [rsp + 0x60], r12
call fcn.14004a3a0
mov rcx, qword [rsp + 0x60]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x14004620c
test eax, eax
jne 0x14004620c
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call fcn.14004a58c
mov r9d, 0x1000
lea r8, [r13 + 1]
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
mov r13, qword [rsp + 0x90]
mov rbp, qword [rsp + 0xd0]
mov r14, qword [rsp + 0x88]
mov r15, qword [rsp + 0x80]
mov rdi, qword [rsp + 0xa0]
mov r12, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14004a3f0
add rsp, 0xb0
pop rbx
ret
mov rcx, rsi
call fcn.14004a58c
lea r8, [r13 + 1]
mov r9d, 0x1000
mov rdx, rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
jmp 0x1400461b8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400461de
mov edx, dword [rdx]
lea rcx, [0x14005b0b8]
jmp 0x140045fa0