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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xe0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov qword [rbp - 0x38], 0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x28], 0
mov rax, qword [rbp + 0x18]
mov edx, 0x40
mov rcx, rax
call sym.CheckSize
test eax, eax
jne 0x14007cf8e
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x40], rax
mov rax, qword [rbp - 0x40]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x14007cfbb
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x40]
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 0x14007cfe5
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x48], rax
mov rax, qword [rbp - 0x48]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14007d01f
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x48]
movzx eax, word [rax + 4]
cmp ax, 0x8664
je 0x14007d045
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x48]
mov eax, dword [rax + 0x38]
and eax, 1
test eax, eax
je 0x14007d06b
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x48]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x48]
add rax, rdx
add rax, 0x18
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x48]
mov eax, dword [rax + 0x38]
mov eax, eax
mov qword [rbp - 0x50], rax
mov dword [rbp - 0x14], 0
jmp 0x14007d0ed
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0x10]
test eax, eax
jne 0x14007d0bc
mov rax, qword [rbp - 0x10]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp - 0x50]
add rax, rdx
mov qword [rbp - 0x30], rax
jmp 0x14007d0d2
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 - 0x30], rax
mov rax, qword [rbp - 0x30]
cmp qword [rbp - 0x20], rax
jae 0x14007d0e4
mov rax, qword [rbp - 0x30]
mov qword [rbp - 0x20], rax
add dword [rbp - 0x14], 1
add qword [rbp - 0x10], 0x28
mov rax, qword [rbp - 0x48]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0x14], eax
jb 0x14007d09b
lea rax, [rbp - 0xb0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
call rax
mov eax, dword [rbp - 0xac]
mov edx, eax
mov rax, qword [rbp - 0x48]
mov eax, dword [rax + 0x50]
mov eax, eax
mov rcx, rax
call sym.AlignValueUp
mov qword [rbp - 0x58], rax
mov eax, dword [rbp - 0xac]
mov edx, eax
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.AlignValueUp
cmp qword [rbp - 0x58], rax
je 0x14007d15f
mov ecx, 0xc1
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x48]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [rbp - 0x58]
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 0x14007d2d0
mov rax, qword [rbp - 0x58]
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 0x14007d2d0
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov ecx, 0x10
call sym.malloc
mov qword [rbp - 0x80], rax
cmp qword [rbp - 0x80], 0
jne 0x14007d24f
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 rcx, qword [rbp + 0x48]
mov rdx, qword [rbp + 0x28]
mov rax, qword [rbp - 0x28]
mov r8, rcx
mov rcx, rax
call sym.FreePointerList
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x80]
mov rdx, qword [rbp - 0x28]
mov qword [rax], rdx
mov rax, qword [rbp - 0x80]
mov rdx, qword [rbp - 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 0x80]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x58]
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 0x14007d2d0
mov rcx, qword [rbp + 0x48]
mov rdx, qword [rbp + 0x28]
mov rax, qword [rbp - 0x28]
mov r8, rcx
mov rcx, rax
call sym.FreePointerList
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 8]
shr rax, 0x20
mov rcx, rax
mov rdx, qword [rbp - 8]
mov rax, qword [rbp - 0x58]
add rax, rdx
shr rax, 0x20
cmp rcx, rax
jb 0x14007d1eb
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8d, 0x78
mov edx, 8
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 0x38], rax
cmp qword [rbp - 0x38], 0
jne 0x14007d36d
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 rcx, qword [rbp + 0x48]
mov rdx, qword [rbp + 0x28]
mov rax, qword [rbp - 0x28]
mov r8, rcx
mov rcx, rax
call sym.FreePointerList
mov ecx, 0xe
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
mov eax, 0
jmp 0x14007d5f6
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp - 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 0x48]
movzx eax, word [rax + 0x16]
movzx eax, ax
and eax, 0x2000
test eax, eax
setne al
movzx edx, al
mov rax, qword [rbp - 0x38]
mov dword [rax + 0x20], edx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x20]
mov qword [rax + 0x28], rdx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x28]
mov qword [rax + 0x30], rdx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x30]
mov qword [rax + 0x38], rdx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x38]
mov qword [rax + 0x40], rdx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x40]
mov qword [rax + 0x48], rdx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x48]
mov qword [rax + 0x58], rdx
mov edx, dword [rbp - 0xac]
mov rax, qword [rbp - 0x38]
mov dword [rax + 0x68], edx
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp - 0x28]
mov qword [rax + 0x70], rdx
mov rax, qword [rbp - 0x48]
mov eax, dword [rax + 0x54]
mov edx, eax
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.CheckSize
test eax, eax
je 0x14007d5d8
mov rax, qword [rbp - 0x48]
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 - 0x60], rax
mov rax, qword [rbp - 0x48]
mov eax, dword [rax + 0x54]
mov ecx, eax
mov rdx, qword [rbp - 0x40]
mov rax, qword [rbp - 0x60]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp - 0x40]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 0x60]
add rdx, rax
mov rax, qword [rbp - 0x38]
mov qword [rax], rdx
mov rax, qword [rbp - 0x38]
mov rax, qword [rax]
mov rdx, qword [rbp - 8]
mov qword [rax + 0x30], rdx
mov r8, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x48]
mov rdx, qword [rbp + 0x18]
mov rax, qword [rbp + 0x10]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.CopySections
test eax, eax
je 0x14007d5db
mov rax, qword [rbp - 0x38]
mov rax, qword [rax]
mov rdx, qword [rax + 0x30]
mov rax, qword [rbp - 0x48]
mov rax, qword [rax + 0x30]
sub rdx, rax
mov qword [rbp - 0x68], rdx
cmp qword [rbp - 0x68], 0
je 0x14007d4ec
mov rdx, qword [rbp - 0x68]
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.PerformBaseRelocation
mov rdx, qword [rbp - 0x38]
mov dword [rdx + 0x24], eax
jmp 0x14007d4f7
mov rax, qword [rbp - 0x38]
mov dword [rax + 0x24], 1
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.BuildImportTable
test eax, eax
je 0x14007d5de
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.FinalizeSections
test eax, eax
je 0x14007d5e1
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.ExecuteTLS
test eax, eax
je 0x14007d5e4
mov rax, qword [rbp - 0x38]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
test eax, eax
je 0x14007d5c6
mov rax, qword [rbp - 0x38]
mov eax, dword [rax + 0x20]
test eax, eax
je 0x14007d5a6
mov rax, qword [rbp - 0x38]
mov rax, qword [rax]
mov eax, dword [rax + 0x28]
mov edx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x70], rax
mov rax, qword [rbp - 8]
mov r9, qword [rbp - 0x70]
mov r8d, 0
mov edx, 1
mov rcx, rax
call r9
mov dword [rbp - 0x74], eax
cmp dword [rbp - 0x74], 0
jne 0x14007d599
mov ecx, 0x45a
mov rax, qword [sym.imp.KERNEL32.dll_SetLastError]
call rax
jmp 0x14007d5e5
mov rax, qword [rbp - 0x38]
mov dword [rax + 0x1c], 1
jmp 0x14007d5d2
mov rax, qword [rbp - 0x38]
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 - 0x38]
mov qword [rax + 0x60], rdx
jmp 0x14007d5d2
mov rax, qword [rbp - 0x38]
mov qword [rax + 0x60], 0
mov rax, qword [rbp - 0x38]
jmp 0x14007d5f6
nop
jmp 0x14007d5e5
nop
jmp 0x14007d5e5
nop
jmp 0x14007d5e5
nop
jmp 0x14007d5e5
nop
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.MemoryFreeLibrary
mov eax, 0
add rsp, 0xe0
pop rbp
ret