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

Disassembly:
push rbx
sub rsp, 0x60
xor ebx, ebx
mov eax, 0x5a4d
cmp word [0x180037d10], ax
je 0x180002569
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x60
pop rbx
ret
movsxd rcx, dword [0x180037d4c]
lea rax, [rcx + 0x108]
cmp rax, 0x18e00
jbe 0x180002592
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x60
pop rbx
ret
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x88], r15
lea r15, [0x180037d10]
cmp dword [rcx + r15], 0x4550
lea rsi, [rcx + r15]
jne 0x1800025c7
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x1800025c7
mov ecx, dword [rsi + 0x38]
test cl, 1
je 0x1800025e7
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rsi, qword [rsp + 0x78]
xor eax, eax
mov r15, qword [rsp + 0x88]
add rsp, 0x60
pop rbx
ret
movzx eax, word [rsi + 0x14]
lea rdx, [rsi + 0x24]
add rdx, rax
mov qword [rsp + 0x80], rdi
movzx eax, word [rsi + 6]
mov r9, rcx
test eax, eax
je 0x18000262b
mov r8d, eax
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x180002616
mov eax, dword [rdx]
add rax, r9
jmp 0x18000261a
mov eax, dword [rdx]
add eax, ecx
cmp rax, rbx
cmova rbx, rax
add rdx, 0x28
sub r8, 1
jne 0x180002608
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov r8d, dword [rsp + 0x34]
lea edx, [r8 - 1]
lea edi, [r8 - 1]
not edx
add edi, dword [rsi + 0x50]
lea rcx, [r8 - 1]
add rcx, rbx
and rdi, rdx
and rcx, rdx
cmp rdi, rcx
je 0x18000266c
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x180002754
mov rcx, qword [rsi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x70], rbp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x1800026af
lea r9d, [rax + 4]
mov r8d, 0x3000
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x1800026e0
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 0x1800026ed
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18000274d
mov qword [rax + 8], rbp
movzx eax, word [rsi + 0x16]
shr eax, 0xd
and eax, 1
mov qword [rdi + 0x40], 0
mov dword [rdi + 0x20], eax
lea rax, [0x180002510]
mov qword [rdi + 0x28], rax
lea rax, [0x180002520]
mov qword [rdi + 0x30], rax
lea rax, [0x180002530]
mov qword [rdi + 0x38], rax
mov eax, dword [rsp + 0x34]
mov dword [rdi + 0x50], eax
mov edx, dword [rsi + 0x54]
cmp rdx, 0x18e00
jbe 0x18000276f
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdx, rdi
call fcn.1800028a0
xor eax, eax
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x78]
mov r15, qword [rsp + 0x88]
add rsp, 0x60
pop rbx
ret
mov r9d, 4
mov r8d, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
mov rdx, r15
mov rcx, rax
mov rbx, rax
call fcn.180009040
movsxd rax, dword [0x180037d4c]
mov r9, rsi
add rax, rbx
mov qword [rsp + 0x20], rdi
mov qword [rdi], rax
mov qword [rax + 0x30], rbp
call fcn.180001f10
test eax, eax
je 0x180002745
mov rax, qword [rdi]
mov r8, qword [rax + 0x30]
sub r8, qword [rsi + 0x30]
je 0x1800027d2
mov rdx, rdi
call fcn.1800022a0
mov dword [rdi + 0x24], eax
jmp 0x1800027d9
mov dword [rdi + 0x24], 1
mov rdx, rdi
call fcn.180002360
test eax, eax
je 0x180002745
mov rdx, rdi
call fcn.180002100
test eax, eax
je 0x180002745
mov rax, qword [rdi]
mov rsi, qword [rdi + 8]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x180002839
mov rbx, qword [rcx + rsi + 0x18]
test rbx, rbx
je 0x180002839
mov rax, qword [rbx]
test rax, rax
je 0x180002839
nop dword [rax]
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 0x180002820
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x180002882
cmp dword [rdi + 0x20], 0
lea rax, [rcx + rbp]
je 0x180002876
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x180002867
mov ecx, 0x45a
jmp 0x18000273f
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x18000274f
mov qword [rdi + 0x48], rax
mov rax, rdi
jmp 0x18000274f
mov qword [rdi + 0x48], 0
mov rax, rdi
jmp 0x18000274f