Function at 0x180016bf0
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r10d, r10d
mov r13, r9
mov r12, r8
mov r15, rdx
mov r14, rcx
mov ebx, r10d
cmp rdx, 0x40
jb 0x180016c42
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180016ef7
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp rdx, rax
jae 0x180016c4c
mov ecx, 0xd
jmp 0x180016efc
lea rsi, [rcx + r14]
cmp dword [rsi], 0x4550
jne 0x180016ef7
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x180016ef7
test byte [rsi + 0x38], 1
jne 0x180016ef7
movzx ecx, word [rsi + 0x14]
mov r9d, dword [rsi + 0x38]
add rcx, 0x24
cmp r10w, word [rsi + 6]
jae 0x180016cb5
movzx r8d, word [rsi + 6]
add rcx, rsi
mov eax, dword [rcx + 4]
mov edx, dword [rcx]
test eax, eax
jne 0x180016c9f
lea rax, [r9 + rdx]
jmp 0x180016ca1
add eax, edx
cmp rax, rbx
cmovbe rax, rbx
add rcx, 0x28
mov rbx, rax
sub r8, 1
jne 0x180016c90
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x34]
mov eax, dword [rsi + 0x50]
lea rdi, [rdx - 1]
add rdi, rax
lea rcx, [rdx - 1]
not rcx
lea rax, [rdx - 1]
add rax, rbx
and rdi, rcx
and rax, rcx
cmp rdi, rax
jne 0x180016ef7
mov rbx, qword [rsp + 0xc8]
mov r9d, 4
mov rcx, qword [rsi + 0x30]
mov r8d, 0x3000
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call r12
mov rbp, rax
test rax, rax
jne 0x180016d3f
lea r9d, [rax + 4]
mov qword [rsp + 0x20], rbx
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call r12
mov rbp, rax
test rax, rax
jne 0x180016d3f
mov ecx, 0xe
jmp 0x180016efc
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x68]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x180016d72
mov r9, rbx
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call r13
jmp 0x180016d35
mov qword [rax + 8], rbp
movzx eax, word [rsi + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x28], r12
mov dword [rdi + 0x20], eax
mov rax, qword [rsp + 0xb0]
mov qword [rdi + 0x38], rax
mov rax, qword [rsp + 0xb8]
mov qword [rdi + 0x40], rax
mov rax, qword [rsp + 0xc0]
mov qword [rdi + 0x48], rax
mov qword [rdi + 0x30], r13
mov qword [rdi + 0x58], rbx
mov eax, dword [rsp + 0x34]
mov dword [rdi + 0x68], eax
mov edx, dword [rsi + 0x54]
cmp r15, rdx
jae 0x180016dda
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.180016978
jmp 0x180016f02
mov r9d, 4
mov qword [rsp + 0x20], rbx
mov r8d, 0x1000
mov rcx, rbp
call r12
mov r8d, dword [rsi + 0x54]
mov rdx, r14
mov rcx, rax
mov rbx, rax
call fcn.180019190
movsxd rax, dword [r14 + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rsi
mov qword [rdi], rax
mov rdx, r15
mov rcx, r14
mov qword [rax + 0x30], rbp
call fcn.1800165e4
xor r14d, r14d
test eax, eax
je 0x180016dcd
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rsi + 0x30]
je 0x180016e49
cmp dword [rax + 0xb0], r14d
je 0x180016dcd
mov rcx, rdi
call fcn.180016f24
jmp 0x180016e4e
mov eax, 1
mov rcx, rdi
mov dword [rdi + 0x24], eax
call fcn.180016468
test eax, eax
je 0x180016dcd
mov rcx, rdi
call fcn.1800167cc
test eax, eax
je 0x180016dcd
mov rcx, qword [rdi]
mov rax, rcx
mov edx, dword [rcx + 0xd0]
test edx, edx
je 0x180016eb3
mov rsi, qword [rdi + 8]
mov rbx, qword [rdx + rsi + 0x18]
test rbx, rbx
je 0x180016eb3
mov r9, qword [rbx]
test r9, r9
je 0x180016eb3
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call r9
lea rbx, [rbx + 8]
mov r9, qword [rbx]
test r9, r9
jne 0x180016e97
mov rax, qword [rdi]
cmp dword [rax + 0x28], r14d
je 0x180016eee
mov eax, dword [rax + 0x28]
add rax, rbp
cmp dword [rdi + 0x20], r14d
je 0x180016ee8
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x180016edf
mov ecx, 0x45a
jmp 0x180016dc7
mov dword [rdi + 0x1c], 1
jmp 0x180016ef2
mov qword [rdi + 0x60], rax
jmp 0x180016ef2
mov qword [rdi + 0x60], r14
mov rax, rdi
jmp 0x180016f04
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret