Function at 0x140041540
Capabilities:
Access pe header
Map section object
Read file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
sub rsp, 0x4a8
mov rax, qword [0x14066d440]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov rax, qword [rsp + 0x4c0]
mov qword [rax], 0
mov rax, qword [rsp + 0x4c8]
mov qword [rax], 0
mov qword [rsp + 0x68], 0
mov rdx, qword [rsp + 0x4b0]
lea rcx, [rsp + 0x68]
call fcn.140041130
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x1400415c9
mov edx, dword [rsp + 0x50]
lea rcx, [0x1401a12e8]
call fcn.140041840
mov eax, dword [rsp + 0x50]
jmp 0x14004180d
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x70], 0
movzx eax, byte [rsp + 0x4b8]
test eax, eax
je 0x1400416be
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0x400
lea rax, [rsp + 0x90]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntdll.dll_NtReadFile]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x140041658
mov edx, dword [rsp + 0x50]
lea rcx, str.NtReadFile:_0x_08X_n
call fcn.140041840
nop
jmp 0x1400417e9
lea r9, [rsp + 0x78]
mov r8d, 0x400
lea rdx, [rsp + 0x90]
xor ecx, ecx
call qword [sym.imp.ntdll.dll_RtlImageNtHeaderEx]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x140041687
mov eax, dword [rsp + 0x50]
jmp 0x14004180d
mov rax, qword [rsp + 0x78]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x1400416a7
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x60], rax
jmp 0x1400416b4
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 0x34]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x1000000
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0xf0004
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x140041714
mov edx, dword [rsp + 0x50]
lea rcx, str.NtCreateSection:_0x_08X_n
call fcn.140041840
nop
jmp 0x1400417e9
mov rax, qword [rsp + 0x4c0]
mov rcx, qword [rsp + 0x58]
mov qword [rax], rcx
mov rax, qword [rsp + 0x4c8]
mov qword [rax], 0
mov dword [rsp + 0x48], 2
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 2
mov rax, qword [rsp + 0x4c8]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0x4c0]
mov rdx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0x40000003
jne 0x1400417d1
movzx eax, byte [rsp + 0x4b8]
test eax, eax
je 0x1400417bd
mov rax, qword [rsp + 0x4c0]
mov rcx, qword [rsp + 0x58]
cmp qword [rax], rcx
jne 0x1400417bd
mov dword [rsp + 0x50], 0
jmp 0x1400417d1
movzx eax, byte [rsp + 0x4b8]
test eax, eax
jne 0x1400417d1
mov dword [rsp + 0x50], 0
cmp dword [rsp + 0x50], 0
jge 0x1400417e9
mov edx, dword [rsp + 0x50]
lea rcx, str.NtMapViewOfSection:_0x_08X_n
call fcn.140041840
nop
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntdll.dll_NtClose]
nop
cmp qword [rsp + 0x70], 0
je 0x140041809
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntdll.dll_NtClose]
nop
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.14019a660
add rsp, 0x4a8
ret