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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x180005010]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor r14d, r14d
mov eax, 0x5a4d
cmp word [0x180005040], ax
mov ebx, r14d
jne 0x180001b82
mov rcx, qword [0x18000507c]
movsxd rax, ecx
add rax, 0x108
cmp rax, 0x76d200
jbe 0x1800016cb
lea ecx, [r14 + 0xd]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180001900
movsxd rbp, ecx
lea rsi, [0x180005040]
add rbp, rsi
cmp dword [rbp], 0x4550
jne 0x180001b82
mov eax, 0x8664
cmp word [rbp + 4], ax
jne 0x180001b82
mov eax, dword [rbp + 0x38]
test al, 1
jne 0x180001b82
movzx ecx, word [rbp + 0x14]
mov r9d, eax
movzx eax, word [rbp + 6]
add rcx, 0x24
cmp r14w, ax
jae 0x180001745
add rcx, rbp
mov r8d, eax
nop word [rax + rax]
mov eax, dword [rcx + 4]
mov edx, dword [rcx]
test eax, eax
jne 0x18000172f
lea rax, [r9 + rdx]
jmp 0x180001731
add eax, edx
cmp rax, rbx
cmovbe rax, rbx
add rcx, 0x28
mov rbx, rax
sub r8, 1
jne 0x180001720
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x24]
lea r8d, [rdx - 1]
lea edi, [rdx - 1]
not r8d
add edi, dword [rbp + 0x50]
lea rcx, [rdx - 1]
add rcx, rbx
and rdi, r8
and rcx, r8
cmp rdi, rcx
jne 0x180001b82
mov rcx, qword [rbp + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x98], r13
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
jne 0x1800017bd
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
je 0x1800017ee
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 0x50]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x180001800
xor edx, edx
mov r8d, 0x8000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1800018f8
mov qword [rax + 8], r13
movzx eax, word [rbp + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x40], r14
mov dword [rdi + 0x20], eax
lea rax, [0x180001640]
mov qword [rdi + 0x28], rax
lea rax, [0x180001650]
mov qword [rdi + 0x30], rax
lea rax, [0x180001660]
mov qword [rdi + 0x38], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x50], eax
cmp dword [rbp + 0x54], 0x76d200
mov qword [rsp + 0x90], r12
mov qword [rsp + 0xa0], r15
jbe 0x180001918
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [rdi + 0x1c], r14d
je 0x180001881
mov rax, qword [rdi]
xor r8d, r8d
mov rcx, qword [rdi + 8]
xor edx, edx
mov r9d, dword [rax + 0x28]
add r9, rcx
call r9
cmp qword [rdi + 0x10], r14
je 0x1800018bb
cmp dword [rdi + 0x18], r14d
jle 0x1800018b1
mov rbx, r14
mov rax, qword [rdi + 0x10]
mov rcx, qword [rbx + rax]
test rcx, rcx
je 0x1800018a4
mov rdx, qword [rdi + 0x40]
call qword [rdi + 0x38]
inc r14d
add rbx, 8
cmp r14d, dword [rdi + 0x18]
jl 0x180001890
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1800018d2
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov r12, qword [rsp + 0x90]
mov r15, qword [rsp + 0xa0]
mov r13, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.180001bb0
add rsp, 0x60
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov edx, dword [rbp + 0x54]
mov r9d, 4
mov r8d, 0x1000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rbp + 0x54]
mov rdx, rsi
mov rcx, rax
mov rbx, rax
call sub.VCRUNTIME140.dll_memcpy
movsxd rcx, dword [0x18000507c]
mov r12d, r14d
add rcx, rbx
mov qword [rdi], rcx
mov qword [rcx + 0x30], r13
mov rax, qword [rdi]
mov r15, qword [rdi + 8]
movzx esi, word [rax + 0x14]
add rsi, 0x24
cmp r14w, word [rax + 6]
jae 0x180001a2a
add rsi, rax
mov ecx, dword [rsi + 4]
test ecx, ecx
jne 0x1800019c0
movsxd rax, dword [rbp + 0x38]
test eax, eax
jle 0x180001a13
mov ecx, dword [rsi]
mov r9d, 4
add rcx, r15
mov r8d, 0x1000
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x180001865
mov ecx, dword [rsi]
mov r8, rbx
add rcx, r15
xor edx, edx
mov dword [rsi - 4], ecx
call sub.VCRUNTIME140.dll_memset
jmp 0x180001a13
add ecx, dword [rsi + 8]
cmp ecx, 0x76d200
ja 0x18000185a
mov ecx, dword [rsi]
mov r9d, 4
mov edx, dword [rsi + 4]
add rcx, r15
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x180001865
mov ebx, dword [rsi]
lea rax, [0x180005040]
mov edx, dword [rsi + 8]
add rbx, r15
mov r8d, dword [rsi + 4]
mov rcx, rbx
add rdx, rax
call sub.VCRUNTIME140.dll_memcpy
mov dword [rsi - 4], ebx
mov rax, qword [rdi]
inc r12d
add rsi, 0x28
movzx ecx, word [rax + 6]
cmp r12d, ecx
jl 0x180001973
mov rax, qword [rdi]
mov rbx, qword [rax + 0x30]
sub rbx, qword [rbp + 0x30]
je 0x180001ac9
cmp dword [rax + 0xb4], r14d
jne 0x180001a4c
mov eax, r14d
jmp 0x180001ace
mov r11d, dword [rax + 0xb0]
mov rsi, qword [rdi + 8]
add r11, rsi
mov eax, dword [r11]
test eax, eax
je 0x180001ac9
mov r9d, dword [r11 + 4]
lea rdx, [r11 + 8]
mov r10d, eax
mov r8d, r14d
add r10, rsi
lea rax, [r9 - 8]
test rax, 0xfffffffffffffffe
jbe 0x180001abc
nop
movzx eax, word [rdx]
mov ecx, eax
shr eax, 0xc
and ecx, 0xfff
cmp eax, 3
je 0x180001a9e
cmp eax, 0xa
jne 0x180001aa2
add qword [rcx + r10], rbx
jmp 0x180001aa2
add dword [rcx + r10], ebx
mov r9d, dword [r11 + 4]
inc r8d
add rdx, 2
mov eax, r8d
lea rcx, [r9 - 8]
shr rcx, 1
cmp rax, rcx
jb 0x180001a80
mov eax, r9d
add r11, rax
mov eax, dword [r11]
test eax, eax
jne 0x180001a61
mov eax, 1
mov rdx, rdi
mov dword [rdi + 0x24], eax
call fcn.180001490
test eax, eax
je 0x180001865
mov rdx, rdi
call fcn.180001200
test eax, eax
je 0x180001865
mov rax, qword [rdi]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x180001b2d
mov rsi, qword [rdi + 8]
mov rbx, qword [rcx + rsi + 0x18]
test rbx, rbx
je 0x180001b2d
mov rax, qword [rbx]
test rax, rax
je 0x180001b2d
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
lea rbx, [rbx + 8]
test rax, rax
jne 0x180001b14
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x180001b76
lea rax, [rcx + r13]
cmp dword [rdi + 0x20], r14d
je 0x180001b6a
xor r8d, r8d
mov rcx, r13
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x180001b5b
mov ecx, 0x45a
jmp 0x18000185f
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x1800018e8
mov qword [rdi + 0x48], rax
mov rax, rdi
jmp 0x1800018e8
mov qword [rdi + 0x48], r14
mov rax, rdi
jmp 0x1800018e8
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180001900