Function at 0x14000397d
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xd0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x20], 0
mov rax, qword [rbp + 0x18]
mov edx, 0x40
mov rcx, rax
call fcn.140002d1a
test eax, eax
jne 0x1400039c7
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400039f4
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x38]
mov eax, dword [rax + 0x3c]
cdqe
lea rdx, [rax + 0x108]
mov rax, qword [rbp + 0x18]
mov rcx, rax
call fcn.140002d1a
test eax, eax
jne 0x140003a1e
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x38]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x40], rax
mov rax, qword [rbp - 0x40]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140003a58
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x40]
movzx eax, word [rax + 4]
cmp ax, 0x8664
je 0x140003a7e
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x38]
and eax, 1
test eax, eax
je 0x140003aa4
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x40]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x40]
add rax, rdx
add rax, 0x18
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x38]
mov eax, eax
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x14], 0
jmp 0x140003b26
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x10]
test eax, eax
jne 0x140003af5
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp - 0x48]
add rax, rdx
mov qword [rbp - 0x28], rax
jmp 0x140003b0b
mov rax, qword [rbp - 0x10]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x10]
add eax, edx
mov eax, eax
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
cmp rax, qword [rbp - 0x20]
jbe 0x140003b1d
mov rax, qword [rbp - 0x28]
mov qword [rbp - 0x20], rax
add dword [rbp - 0x14], 1
add qword [rbp - 0x10], 0x28
mov rax, qword [rbp - 0x40]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0x14], eax
jb 0x140003ad4
lea rax, [rbp - 0xa0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
call rax
mov eax, dword [rbp - 0x9c]
mov edx, eax
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x50]
mov eax, eax
mov rcx, rax
call fcn.140002ccf
mov qword [rbp - 0x50], rax
mov eax, dword [rbp - 0x9c]
mov edx, eax
mov rax, qword [rbp - 0x20]
mov rcx, rax
call fcn.140002ccf
cmp qword [rbp - 0x50], rax
je 0x140003b98
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x40]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [rbp - 0x50]
mov rdx, qword [rbp + 0x48]
mov qword [rsp + 0x20], rdx
mov r10, qword [rbp + 0x20]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rax
call r10
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140003c1c
mov rax, qword [rbp - 0x50]
mov rdx, qword [rbp + 0x48]
mov qword [rsp + 0x20], rdx
mov r10, qword [rbp + 0x20]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
call r10
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140003c1c
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8d, 0x68
mov edx, 8
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
jne 0x140003c7f
mov rdx, qword [rbp + 0x48]
mov rax, qword [rbp - 8]
mov r10, qword [rbp + 0x28]
mov r9, rdx
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
call r10
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x140003eff
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp - 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 0x40]
movzx eax, word [rax + 0x16]
movzx eax, ax
and eax, 0x2000
test eax, eax
setne al
movzx edx, al
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x20], edx
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x20]
mov qword [rax + 0x28], rdx
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x28]
mov qword [rax + 0x30], rdx
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x30]
mov qword [rax + 0x38], rdx
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x38]
mov qword [rax + 0x40], rdx
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x40]
mov qword [rax + 0x48], rdx
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x48]
mov qword [rax + 0x50], rdx
mov edx, dword [rbp - 0x9c]
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x60], edx
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x54]
mov edx, eax
mov rax, qword [rbp + 0x18]
mov rcx, rax
call fcn.140002d1a
test eax, eax
je 0x140003ee1
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x54]
mov ecx, eax
mov rax, qword [rbp - 8]
mov rdx, qword [rbp + 0x48]
mov qword [rsp + 0x20], rdx
mov r10, qword [rbp + 0x20]
mov r9d, 4
mov r8d, 0x1000
mov rdx, rcx
mov rcx, rax
call r10
mov qword [rbp - 0x58], rax
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x54]
mov ecx, eax
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x58]
mov r8, rcx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbp - 0x38]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 0x58]
add rdx, rax
mov rax, qword [rbp - 0x30]
mov qword [rax], rdx
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov rdx, qword [rbp - 8]
mov qword [rax + 0x30], rdx
mov rcx, qword [rbp - 0x30]
mov rdx, qword [rbp - 0x40]
mov rax, qword [rbp + 0x18]
mov r9, rcx
mov r8, rdx
mov rdx, rax
mov rcx, qword [rbp + 0x10]
call fcn.140002d54
test eax, eax
je 0x140003ee4
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov rdx, qword [rax + 0x30]
mov rax, qword [rbp - 0x40]
mov rcx, qword [rax + 0x30]
mov rax, rdx
sub rax, rcx
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
je 0x140003df5
mov rdx, qword [rbp - 0x60]
mov rax, qword [rbp - 0x30]
mov rcx, rax
call fcn.1400033f0
mov rdx, qword [rbp - 0x30]
mov dword [rdx + 0x24], eax
jmp 0x140003e00
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x24], 1
mov rax, qword [rbp - 0x30]
mov rcx, rax
call fcn.140003562
test eax, eax
je 0x140003ee7
mov rax, qword [rbp - 0x30]
mov rcx, rax
call fcn.140003163
test eax, eax
je 0x140003eea
mov rax, qword [rbp - 0x30]
mov rcx, rax
call fcn.140003356
test eax, eax
je 0x140003eed
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
test eax, eax
je 0x140003ecf
mov rax, qword [rbp - 0x30]
mov eax, dword [rax + 0x20]
test eax, eax
je 0x140003eaf
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov edx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x68], rax
mov rax, qword [rbp - 8]
mov r9, qword [rbp - 0x68]
mov r8d, 0
mov edx, 1
mov rcx, rax
call r9
mov dword [rbp - 0x6c], eax
cmp dword [rbp - 0x6c], 0
jne 0x140003ea2
mov ecx, 0x45a
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
jmp 0x140003eee
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x1c], 1
jmp 0x140003edb
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov edx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov rdx, rax
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x58], rdx
jmp 0x140003edb
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x58], 0
mov rax, qword [rbp - 0x30]
jmp 0x140003eff
nop
jmp 0x140003eee
nop
jmp 0x140003eee
nop
jmp 0x140003eee
nop
jmp 0x140003eee
nop
mov rax, qword [rbp - 0x30]
mov rcx, rax
call fcn.1400040e4
mov eax, 0
add rsp, 0xd0
pop rbp
ret