Function at 0x140065570
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Parse pe header
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x280
mov rax, qword [0x1400f60c0]
xor rax, rsp
mov qword [rsp + 0x270], rax
lea rax, [rsp + 0x2a8]
mov byte [rsp + 0x41], dl
mov r14, qword [rax]
mov rbp, rcx
xor esi, esi
mov qword [rsp + 0x50], r14
mov qword [rax], rsi
xor edx, edx
mov rcx, qword [0x1400f6c50]
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea edx, [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [0x1400f6c58]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea edx, [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [0x1400f6c60]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea edx, [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [0x1400f6c68]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea edx, [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r12, rax
test rax, rax
je 0x140065937
mov eax, 0x5a4d
cmp word [r12], ax
jne 0x140065937
movsxd rdi, dword [r12 + 0x3c]
add rdi, r12
cmp dword [rdi], 0x4550
jne 0x140065937
movzx ebx, word [rdi + 0x14]
add rbx, 0x18
mov dword [rsp + 0x58], 0x104
add rbx, rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r9, [rsp + 0x58]
xor edx, edx
mov rcx, rax
lea r8, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameW]
mov qword [rsp + 0x30], rsi
lea r8d, [rsi + 1]
mov dword [rsp + 0x28], 0x80
lea rcx, [rsp + 0x60]
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140065937
mov qword [rsp + 0x28], rsi
lea r8d, [rsi + 2]
xor r9d, r9d
mov dword [rsp + 0x20], esi
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
test rax, rax
je 0x14006592e
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
lea edx, [rsi + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r15, rax
test rax, rax
je 0x140065937
mov eax, 0x5a4d
cmp word [r15], ax
jne 0x140065925
movsxd rcx, dword [r15 + 0x3c]
add rcx, r15
cmp dword [rcx], 0x4550
jne 0x140065925
mov eax, dword [rdi + 8]
cmp dword [rcx + 8], eax
jne 0x140065925
movzx edx, word [rcx + 6]
cmp dx, word [rdi + 6]
jne 0x140065925
movzx r14d, word [rcx + 0x14]
xor dil, dil
add r14, 0x18
mov byte [rsp + 0x40], dil
add r14, rcx
mov r9d, esi
mov r10d, edx
test edx, edx
je 0x140065871
mov qword [rsp + 0x48], r13
nop dword [rax]
mov r8, rbp
mov rax, rbx
sub r8, rbx
nop dword [rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1400657b3
inc rax
test ecx, ecx
jne 0x1400657a0
test edx, edx
jne 0x1400657c0
test dword [rbx + 0x24], 0x20000000
jne 0x1400657d5
inc r9d
add rbx, 0x28
add r14, 0x28
cmp r9d, r10d
jl 0x140065790
jmp 0x140065871
mov edx, dword [rbx + 0x10]
test edx, edx
je 0x140065871
movzx r13d, byte [rsp + 0x41]
nop word [rax + rax]
mov eax, dword [r14 + 0x14]
mov ecx, dword [rbx + 0xc]
mov edi, esi
add rax, rdi
add rcx, rdi
add rcx, r12
movzx ebp, byte [rax + r15]
mov eax, edx
cmp byte [rcx], bpl
je 0x14006585f
test r13b, r13b
je 0x14006585a
mov edx, 1
mov dword [rsp + 0x58], 0x40
lea r9, [rsp + 0x5c]
lea r8d, [rdx + 0x3f]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rbx + 0xc]
lea r9, [rsp + 0x58]
add rax, rdi
mov edx, 1
mov byte [rax + r12], bpl
mov ecx, dword [rbx + 0xc]
mov r8d, dword [rsp + 0x5c]
add rcx, rdi
add rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rbx + 0x10]
mov byte [rsp + 0x40], 1
inc esi
mov edx, eax
cmp esi, eax
jb 0x1400657f0
mov r13, qword [rsp + 0x48]
movzx edi, byte [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1400f6c50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, reloc.WLDAP32.dll_Ordinal_32
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [0x1400f6c58]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, reloc.WLDAP32.dll_Ordinal_32
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [0x1400f6c60]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, reloc.WLDAP32.dll_Ordinal_32
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [0x1400f6c68]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, reloc.WLDAP32.dll_Ordinal_32
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rax, qword [rsp + 0x50]
lea rcx, [rsp + 0x2a8]
mov qword [rcx], rax
movzx eax, dil
jmp 0x140065944
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x2a8]
mov al, 1
mov qword [rcx], r14
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1400c9ee0
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret