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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xc0
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 sym.CheckSize
test eax, eax
jne 0x4ad202
mov eax, 0
jmp 0x4ad705
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x4ad22f
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
mov rax, qword [rbp - 0x38]
mov eax, dword [rax + 0x3c]
cdqe
lea rdx, [rax + 0x108]
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.CheckSize
test eax, eax
jne 0x4ad259
mov eax, 0
jmp 0x4ad705
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 0x4ad293
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
mov rax, qword [rbp - 0x40]
movzx eax, word [rax + 4]
cmp ax, 0x8664
je 0x4ad2b9
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x38]
and eax, 1
test eax, eax
je 0x4ad2df
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
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 0x4ad361
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x10]
test eax, eax
jne 0x4ad330
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 0x4ad346
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 0x4ad358
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 eax, dword [rbp - 0x14]
ja 0x4ad30f
lea rax, [rbp - 0xa0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
call rax
mov rax, qword [rbp - 0x40]
mov edx, dword [rax + 0x50]
mov eax, dword [rbp - 0x9c]
add eax, edx
lea edx, [rax - 1]
mov eax, dword [rbp - 0x9c]
neg eax
and eax, edx
mov eax, eax
mov qword [rbp - 0x50], rax
mov eax, dword [rbp - 0x9c]
mov edx, eax
mov rax, qword [rbp - 0x20]
add rax, rdx
lea rdx, [rax - 1]
mov eax, dword [rbp - 0x9c]
neg eax
mov eax, eax
and rax, rdx
cmp rax, qword [rbp - 0x50]
je 0x4ad3e4
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
mov rax, qword [rbp - 0x40]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [rbp - 0x50]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x4ad45a
mov rax, qword [rbp - 0x50]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x4ad45a
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8d, 0x58
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 0x4ad4b8
mov rax, qword [rbp - 8]
mov r8d, 0x8000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
call rax
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x4ad705
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 edx, dword [rbp - 0x9c]
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x50], edx
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x54]
mov edx, eax
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.CheckSize
test eax, eax
jne 0x4ad53e
jmp 0x4ad6f4
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x54]
mov edx, eax
mov rax, qword [rbp - 8]
mov r9d, 4
mov r8d, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
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 sym.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 sym.CopySections
test eax, eax
jne 0x4ad5d1
jmp 0x4ad6f4
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov rdx, qword [rax + 0x30]
mov rax, qword [rbp - 0x40]
mov rax, qword [rax + 0x30]
sub rdx, rax
mov rax, rdx
mov qword [rbp - 0x60], rax
cmp qword [rbp - 0x60], 0
je 0x4ad610
mov rdx, qword [rbp - 0x60]
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.PerformBaseRelocation
mov edx, eax
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x24], edx
jmp 0x4ad61b
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x24], 1
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.BuildImportTable
test eax, eax
jne 0x4ad630
jmp 0x4ad6f4
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.FinalizeSections
test eax, eax
jne 0x4ad645
jmp 0x4ad6f4
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.ExecuteTLS
test eax, eax
jne 0x4ad65a
jmp 0x4ad6f4
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
test eax, eax
je 0x4ad6e2
mov rax, qword [rbp - 0x30]
mov eax, dword [rax + 0x20]
test eax, eax
je 0x4ad6c5
mov rdx, qword [rbp - 8]
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov eax, eax
add rax, rdx
mov qword [rbp - 0x68], rax
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x68]
mov r8d, 0
mov edx, 1
call rax
mov dword [rbp - 0x6c], eax
cmp dword [rbp - 0x6c], 0
jne 0x4ad6b8
mov ecx, 0x45a
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
jmp 0x4ad6f4
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x1c], 1
jmp 0x4ad6ee
mov rdx, qword [rbp - 8]
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov eax, eax
add rdx, rax
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x48], rdx
jmp 0x4ad6ee
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x48], 0
mov rax, qword [rbp - 0x30]
jmp 0x4ad705
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.MemoryFreeLibrary
mov eax, 0
add rsp, 0xc0
pop rbp
ret