Function at 0x180017f9c
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 r13d, r13d
mov r12, rdx
mov rbp, rcx
mov ebx, r13d
mov rcx, r12
mov r15d, r13d
lea edx, [r13 + 0x40]
call fcn.18001793c
test eax, eax
je 0x180018306
mov eax, 0x5a4d
cmp word [rbp], ax
jne 0x1800182fb
movsxd rdx, dword [rbp + 0x3c]
mov rcx, r12
add rdx, 0x108
call fcn.18001793c
test eax, eax
je 0x180018306
movsxd rsi, dword [rbp + 0x3c]
add rsi, rbp
cmp dword [rsi], 0x4550
jne 0x1800182fb
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x1800182fb
test byte [rsi + 0x38], 1
jne 0x1800182fb
movzx ecx, word [rsi + 0x14]
mov r9d, dword [rsi + 0x38]
add rcx, 0x24
cmp r13w, word [rsi + 6]
jae 0x180018071
movzx r8d, word [rsi + 6]
add rcx, rsi
mov eax, dword [rcx + 4]
mov edx, dword [rcx]
test eax, eax
jne 0x18001805b
lea rax, [r9 + rdx]
jmp 0x18001805d
add eax, edx
cmp rax, rbx
cmovbe rax, rbx
add rcx, 0x28
mov rbx, rax
sub r8, 1
jne 0x18001804c
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x34]
mov ecx, dword [rsi + 0x50]
call fcn.1800178c4
mov rcx, rbx
mov rdi, rax
call fcn.1800178c4
cmp rdi, rax
jne 0x1800182fb
mov rcx, qword [rsi + 0x30]
mov ebx, 0x3000
mov r8d, ebx
mov qword [rsp + 0x20], r13
mov r9d, 4
mov rdx, rdi
call sub.KERNEL32.dll_VirtualAlloc
mov r14, rax
test rax, rax
jne 0x1800180eb
lea r9d, [rax + 4]
mov qword [rsp + 0x20], r13
mov r8d, ebx
mov rdx, rdi
xor ecx, ecx
call sub.KERNEL32.dll_VirtualAlloc
mov r14, rax
test rax, rax
jne 0x1800180eb
mov ecx, 0xe
jmp 0x180018300
lea rcx, [r14 + rdi]
mov rax, r14
jmp 0x18001813f
mov ecx, 0x10
call fcn.18004eb3c
mov rbx, rax
test rax, rax
je 0x180018265
mov qword [rax], r15
mov r9d, 4
mov r8d, 0x3000
mov qword [rax + 8], r14
mov rdx, rdi
mov qword [rsp + 0x20], r13
xor ecx, ecx
mov r15, rax
call sub.KERNEL32.dll_VirtualAlloc
mov r14, rax
test rax, rax
je 0x18001824e
lea rcx, [rax + rdi]
movabs rdx, 0xffffffff00000000
and rcx, rdx
and rax, rdx
cmp rax, rcx
jb 0x1800180f4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x70]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x180018265
mov qword [rax + 8], r14
mov rcx, r12
movzx eax, word [rsi + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x58], r13
mov dword [rdi + 0x20], eax
lea rax, [sub.KERNEL32.dll_VirtualAlloc]
mov qword [rdi + 0x28], rax
lea rax, [sub.KERNEL32.dll_VirtualFree]
mov qword [rdi + 0x30], rax
lea rax, [0x180017f74]
mov qword [rdi + 0x38], rax
lea rax, [0x180017f7c]
mov qword [rdi + 0x40], rax
lea rax, [0x180017f84]
mov qword [rdi + 0x48], rax
mov eax, dword [rsp + 0x34]
mov dword [rdi + 0x68], eax
mov qword [rdi + 0x70], r15
mov edx, dword [rsi + 0x54]
call fcn.18001793c
test eax, eax
je 0x1800182d9
mov edx, dword [rsi + 0x54]
mov r9d, 4
mov r8d, 0x1000
mov qword [rsp + 0x20], r13
mov rcx, r14
call sub.KERNEL32.dll_VirtualAlloc
mov r8d, dword [rsi + 0x54]
mov rdx, rbp
mov rcx, rax
mov rbx, rax
call fcn.1800401a0
movsxd rax, dword [rbp + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rsi
mov qword [rdi], rax
mov rdx, r12
mov rcx, rbp
mov qword [rax + 0x30], r14
call fcn.180017960
test eax, eax
je 0x1800182d9
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rsi + 0x30]
je 0x18001827d
mov rcx, rdi
call fcn.180017d20
jmp 0x180018282
mov rcx, rbx
lea rdx, [sub.KERNEL32.dll_VirtualFree]
xor r8d, r8d
call fcn.1800178e0
jmp 0x1800180e1
xor r9d, r9d
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call sub.KERNEL32.dll_VirtualFree
mov rcx, r15
jmp 0x180018251
mov eax, 1
mov rcx, rdi
mov dword [rdi + 0x24], eax
call fcn.180017df0
test eax, eax
je 0x1800182d9
mov rcx, rdi
call fcn.180017b6c
test eax, eax
je 0x1800182d9
mov rcx, rdi
call fcn.180017cd0
test eax, eax
je 0x1800182d9
mov rax, qword [rdi]
cmp dword [rax + 0x28], r13d
je 0x1800182f2
mov eax, dword [rax + 0x28]
add rax, r14
cmp dword [rdi + 0x20], r13d
je 0x1800182ec
xor r8d, r8d
mov rcx, r14
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x1800182e3
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.180018498
jmp 0x180018306
mov dword [rdi + 0x1c], 1
jmp 0x1800182f6
mov qword [rdi + 0x60], rax
jmp 0x1800182f6
mov qword [rdi + 0x60], r13
mov rax, rdi
jmp 0x180018308
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