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

Disassembly:
test edx, edx
je 0x14000431c
mov r11, rsp
push rdi
sub rsp, 0xb0
mov rax, qword [0x14004d020]
xor rax, rsp
mov qword [rsp + 0x78], rax
cmp byte [rcx + 0x20], 0
mov edi, edx
je 0x140004307
cmp qword [rcx + 0x18], 0x10
mov qword [r11 + 0x18], rbx
mov qword [r11 - 0x20], r12
jb 0x140004100
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 rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400042f7
xor edx, edx
mov qword [rsp + 0xa8], rbp
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test eax, eax
je 0x140004349
mov r8d, edi
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140004349
mov qword [rsp + 0x90], r13
lea r8, [rbp + 1]
mov qword [rsp + 0x88], r14
mov r9d, 0x1000
xor edx, edx
mov qword [rsp + 0x80], r15
mov rcx, rax
mov dword [rsp + 0x20], 0x40
mov r13d, ebp
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
test rax, rax
jne 0x1400041c7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400042d7
mov rcx, r13
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0x70], r12
call fcn.14000de54
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], r12
mov r8d, ebp
mov rdx, rax
mov rcx, rbx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000431d
mov rdx, rsi
call fcn.140005370
mov ebp, eax
test eax, eax
je 0x14000431d
lea rax, [rsp + 0x70]
mov r9, r13
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x48], r12
add rbp, r14
mov qword [rsp + 0x40], r12
mov r9, rdi
mov qword [rsp + 0x38], r12
xor r8d, r8d
mov dword [rsp + 0x30], r12d
mov edx, 0x1fffff
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x60], r12
call fcn.140009ad0
mov rcx, qword [rsp + 0x60]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x14000431d
test eax, eax
jne 0x14000431d
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call fcn.14000dde4
mov r9d, 0x1000
lea r8, [r13 + 1]
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa0]
mov r13, qword [rsp + 0x90]
mov r14, qword [rsp + 0x88]
mov r15, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xd0]
mov r12, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14000ddc0
add rsp, 0xb0
pop rdi
ret
mov rcx, rsi
call fcn.14000dde4
mov r9d, 0x1000
lea r8, [r13 + 1]
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
jmp 0x1400042c9
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400042ef