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

Disassembly:
push rbx
push r12
push r13
sub rsp, 0x50
xor ebx, ebx
mov r13, rdx
mov r12, rcx
cmp rdx, 0x40
jae 0x18000410f
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
mov eax, 0x5a4d
cmp word [rcx], ax
je 0x180004130
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
movsxd rcx, dword [rcx + 0x3c]
lea rax, [rcx + 0x108]
cmp rdx, rax
jb 0x1800040f8
cmp dword [rcx + r12], 0x4550
mov qword [rsp + 0x78], rsi
lea rsi, [rcx + r12]
jne 0x180004165
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x180004165
mov eax, dword [rsi + 0x38]
test al, 1
je 0x180004181
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rsi, qword [rsp + 0x78]
xor eax, eax
add rsp, 0x50
pop r13
pop r12
pop rbx
ret
movzx ecx, word [rsi + 0x14]
mov r9, rax
movzx eax, word [rsi + 6]
mov qword [rsp + 0x80], rdi
test eax, eax
je 0x1800041c2
lea rcx, [rcx + rsi + 0x24]
mov r8d, eax
mov edx, dword [rcx + 4]
test edx, edx
jne 0x1800041ae
mov eax, dword [rcx]
add rax, r9
jmp 0x1800041b2
mov eax, dword [rcx]
add eax, edx
cmp rax, rbx
cmova rbx, rax
add rcx, 0x28
dec r8
jne 0x1800041a0
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov r11d, dword [rsp + 0x24]
mov eax, dword [rsi + 0x50]
lea edx, [r11 - 1]
lea edi, [rax + r11 - 1]
lea rcx, [r11 + rbx - 1]
not edx
and rdi, rdx
and rcx, rdx
cmp rdi, rcx
je 0x180004202
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1800042fc
mov rcx, qword [rsi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rdi
mov qword [rsp + 0x70], rbp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
jne 0x180004245
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 0x180004276
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx + 0x60]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x180004283
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 0x1800042f5
mov qword [rax + 8], rbp
movzx eax, word [rsi + 0x16]
mov qword [rdi + 0x50], 0
shr eax, 0xd
and eax, 1
mov dword [rdi + 0x20], eax
lea rax, [0x180004090]
mov qword [rdi + 0x28], rax
lea rax, [0x1800040a0]
mov qword [rdi + 0x30], rax
lea rax, [0x1800040b0]
mov qword [rdi + 0x38], rax
lea rax, [0x1800040c0]
mov qword [rdi + 0x40], rax
lea rax, [0x1800040d0]
mov qword [rdi + 0x48], rax
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x60], eax
mov edx, dword [rsi + 0x54]
cmp r13, rdx
jae 0x180004313
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.180004530
xor eax, eax
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop r13
pop r12
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, r12
mov rcx, rax
mov rbx, rax
call fcn.180009310
movsxd rax, dword [r12 + 0x3c]
mov r9, rdi
add rax, rbx
mov r8, rsi
mov rdx, r13
mov qword [rdi], rax
mov rcx, r12
mov qword [rax + 0x30], rbp
call fcn.180003a70
test eax, eax
je 0x1800042ed
mov rax, qword [rdi]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rsi + 0x30]
je 0x180004378
mov rcx, rdi
call fcn.180003e20
mov dword [rdi + 0x24], eax
jmp 0x18000437f
mov dword [rdi + 0x24], 1
mov rcx, rdi
call fcn.180003ef0
test eax, eax
je 0x1800042ed
mov rcx, rdi
call fcn.180003ba0
test eax, eax
je 0x1800042ed
mov rax, qword [rdi]
mov rsi, qword [rdi + 8]
mov ecx, dword [rax + 0xd0]
test ecx, ecx
je 0x1800043db
mov rbx, qword [rcx + rsi + 0x18]
test rbx, rbx
je 0x1800043db
mov rax, qword [rbx]
test rax, rax
je 0x1800043db
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx + 8]
add rbx, 8
test rax, rax
jne 0x1800043c2
mov rax, qword [rdi]
mov ecx, dword [rax + 0x28]
test ecx, ecx
je 0x180004425
cmp dword [rdi + 0x20], 0
lea rax, [rbp + rcx]
je 0x180004419
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
jne 0x18000440a
mov ecx, 0x45a
jmp 0x1800042e7
mov dword [rdi + 0x1c], 1
mov rax, rdi
jmp 0x1800042f7
mov qword [rdi + 0x58], rax
mov rax, rdi
jmp 0x1800042f7
mov qword [rdi + 0x58], 0
mov rax, rdi
jmp 0x1800042f7