Function at 0x5eaf48
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 0x5eaf92
mov eax, 0
jmp 0x5eb495
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x5eafbf
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x5eb495
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 0x5eafe9
mov eax, 0
jmp 0x5eb495
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 0x5eb023
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x5eb495
mov rax, qword [rbp - 0x40]
movzx eax, word [rax + 4]
cmp ax, 0x8664
je 0x5eb049
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x5eb495
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x38]
and eax, 1
test eax, eax
je 0x5eb06f
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x5eb495
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 0x5eb0f1
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x10]
test eax, eax
jne 0x5eb0c0
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 0x5eb0d6
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 0x5eb0e8
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 0x5eb09f
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 0x5eb174
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x5eb495
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 0x5eb1ea
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 0x5eb1ea
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x5eb495
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 0x5eb248
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 0x5eb495
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 0x5eb2ce
jmp 0x5eb484
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 0x5eb361
jmp 0x5eb484
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 0x5eb3a0
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 0x5eb3ab
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 0x5eb3c0
jmp 0x5eb484
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.FinalizeSections
test eax, eax
jne 0x5eb3d5
jmp 0x5eb484
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.ExecuteTLS
test eax, eax
jne 0x5eb3ea
jmp 0x5eb484
mov rax, qword [rbp - 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
test eax, eax
je 0x5eb472
mov rax, qword [rbp - 0x30]
mov eax, dword [rax + 0x20]
test eax, eax
je 0x5eb455
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 0x5eb448
mov ecx, 0x45a
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
jmp 0x5eb484
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x1c], 1
jmp 0x5eb47e
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 0x5eb47e
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x48], 0
mov rax, qword [rbp - 0x30]
jmp 0x5eb495
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.MemoryFreeLibrary
mov eax, 0
add rsp, 0xc0
pop rbp
ret