Function at 0x140001450
Capabilities:
Enumerate pe sections
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0xd8
lea rbp, [rsp + 0xd0]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov rax, qword [rbp + 0x28]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 0
mov edx, 0x80000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x1400014f6
lea rax, str.Error_opening_file._n
mov rcx, rax
call sym.printf_char_const__::_
lea rax, [rbp - 0x63]
mov qword [rbp - 0x50], rax
nop
nop
lea rdx, [rbp - 0x63]
mov rax, qword [rbp + 0x20]
mov r8, rdx
lea rdx, [0x14002d015]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp - 0x63]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x14000183a
mov rax, qword [rbp - 0x10]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x14]
mov rcx, rax
call sym.operator_new___unsigned_long_long_
mov qword [rbp - 0x20], rax
lea r8, [rbp - 0x68]
mov ecx, dword [rbp - 0x14]
mov rdx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
mov rax, qword [rbp - 0x20]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400015c3
lea rax, str.Invalid_PE_file._n
mov rcx, rax
call sym.printf_char_const__::_
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
cmp qword [rbp - 0x20], 0
je 0x14000158e
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.operator_delete___void_
lea rax, [rbp - 0x62]
mov qword [rbp - 0x58], rax
nop
nop
lea rdx, [rbp - 0x62]
mov rax, qword [rbp + 0x20]
mov r8, rdx
lea rdx, [0x14002d015]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp - 0x62]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x14000183a
mov rax, qword [rbp - 0x28]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 0x20]
add rax, rdx
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x30]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x30]
add rax, rdx
add rax, 0x18
mov qword [rbp - 0x38], rax
lea rax, [rbp - 0x61]
mov qword [rbp - 0x60], rax
nop
nop
lea rdx, [rbp - 0x61]
lea rax, [rbp - 0x90]
mov r8, rdx
lea rdx, [0x14002d015]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp - 0x61]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
nop
mov dword [rbp - 4], 0
jmp 0x14000176e
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
shl rax, 3
mov rdx, rax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov rcx, rax
mov rax, qword [rbp + 0x30]
mov r8d, 8
mov rdx, rax
call sym.strncmp
test eax, eax
jne 0x14000176a
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
shl rax, 3
mov rdx, rax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov eax, dword [rax + 0x10]
mov dword [rbp - 0x3c], eax
mov eax, dword [rbp - 4]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
shl rax, 3
mov rdx, rax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov eax, dword [rax + 0x14]
mov dword [rbp - 0x40], eax
mov eax, dword [rbp - 0x3c]
mov rcx, rax
call sym.operator_new___unsigned_long_long_
mov qword [rbp - 0x48], rax
mov edx, dword [rbp - 0x40]
mov rax, qword [rbp - 0x10]
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetFilePointer]
call rax
lea r8, [rbp - 0x68]
mov ecx, dword [rbp - 0x3c]
mov rdx, qword [rbp - 0x48]
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
mov dword [rbp - 8], 0
jmp 0x14000174a
mov edx, dword [rbp - 8]
mov rax, qword [rbp - 0x48]
add rax, rdx
movzx eax, byte [rax]
test al, al
je 0x140001754
mov edx, dword [rbp - 8]
mov rax, qword [rbp - 0x48]
add rax, rdx
movzx eax, byte [rax]
movsx edx, al
lea rax, [rbp - 0x90]
mov rcx, rax
call fcn.140025dc0
add dword [rbp - 8], 1
mov eax, dword [rbp - 8]
cmp eax, dword [rbp - 0x3c]
jb 0x140001716
jmp 0x140001755
nop
cmp qword [rbp - 0x48], 0
je 0x140001784
mov rax, qword [rbp - 0x48]
mov rcx, rax
call sym.operator_delete___void_
jmp 0x140001784
add dword [rbp - 4], 1
mov rax, qword [rbp - 0x30]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 4], eax
jl 0x140001632
jmp 0x140001785
nop
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
cmp qword [rbp - 0x20], 0
je 0x1400017a8
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.operator_delete___void_
lea rdx, [rbp - 0x90]
mov rax, qword [rbp + 0x20]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
lea rax, [rbp - 0x90]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x14000183a
mov rax, qword [rbp + 0x20]
add rsp, 0xd8
pop rbx
pop rbp
ret