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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r15
sub rsp, 0x50
xor ebx, ebx
lea rcx, [rax - 0x44]
xor edx, edx
and dword [rax - 0x48], ebx
lea r8d, [rbx + 0x2c]
xor ebp, ebp
call fcn.140032db0
movsxd rax, dword [0x1400647bc]
lea rcx, [0x140064780]
lea rdi, [rax + rcx]
mov ecx, 0x5a4d
xor esi, esi
cmp word [0x140064780], cx
jne 0x140009e72
cmp dword [rdi], 0x4550
jne 0x140009e72
mov r15d, 0x1fa00
cmp dword [rdi + 0x54], r15d
ja 0x140009e68
add rax, 0x108
cmp rax, r15
ja 0x140009e68
mov eax, 0x8664
cmp word [rdi + 4], ax
je 0x140009c82
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140009eac
movzx eax, word [rdi + 6]
movzx ecx, word [rdi + 0x14]
test eax, eax
je 0x140009cb9
lea rdx, [rcx + rdi + 0x24]
mov r8, rax
mov eax, dword [rdx]
cmp dword [rdx + 4], ebx
jne 0x140009ca2
mov ecx, dword [rdi + 0x38]
jmp 0x140009ca5
mov ecx, dword [rdx + 4]
add rcx, rax
cmp rcx, rbp
cmova rbp, rcx
add rdx, 0x28
sub r8, 1
jne 0x140009c96
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov r11d, dword [rsp + 0x24]
mov eax, dword [rdi + 0x50]
lea edx, [r11 - 1]
lea r12d, [rax + r11 - 1]
lea rcx, [r11 + rbp - 1]
not edx
and r12, rdx
and rcx, rdx
cmp r12, rcx
jne 0x140009c72
mov rcx, qword [rdi + 0x30]
mov ebp, 4
mov r8d, 0x3000
mov r9d, ebp
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x140009d30
mov r9d, ebp
mov r8d, 0x3000
mov rdx, r12
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x140009d30
mov ecx, SafeArrayGetDim
jmp 0x140009e77
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
lea r8d, [rdx + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140009d26
mov qword [rax + 8], rsi
mov eax, dword [rsp + 0x24]
mov r9d, ebp
mov dword [rbx + 0x24], eax
mov edx, dword [rdi + 0x54]
mov r8d, 0x1000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbp, rax
test rax, rax
je 0x140009d26
mov r8d, dword [rdi + 0x54]
lea rdx, [0x140064780]
mov rcx, rax
call fcn.1400337a0
movsxd rax, dword [0x1400647bc]
lea rcx, [0x140064780]
add rax, rbp
mov r9, rbx
mov r8, rdi
mov qword [rbx], rax
mov rdx, r15
mov qword [rax + 0x30], rsi
call fcn.1400094fc
test eax, eax
je 0x140009e7d
mov rax, qword [rbx]
mov rdx, qword [rax + 0x30]
sub rdx, qword [rdi + 0x30]
je 0x140009dd3
mov rcx, rbx
call fcn.140009618
mov dword [rbx + 0x20], eax
jmp 0x140009dda
mov dword [rbx + 0x20], 1
mov rcx, rbx
call fcn.1400096d8
test eax, eax
je 0x140009e7d
mov rcx, rbx
call fcn.140009958
test eax, eax
je 0x140009e7d
mov rax, qword [rbx]
cmp dword [rax + 0xd0], 0
je 0x140009e35
mov ecx, dword [rax + 0xd0]
mov rax, qword [rbx + 8]
mov rdi, qword [rcx + rax + 0x18]
test rdi, rdi
je 0x140009e35
jmp 0x140009e2d
mov rcx, qword [rbx + 8]
xor r8d, r8d
lea edx, [r8 + 1]
call rax
add rdi, 8
mov rax, qword [rdi]
test rax, rax
jne 0x140009e1c
mov rax, qword [rbx]
cmp dword [rax + 0x28], 0
je 0x140009e63
mov rcx, qword [rbx + 8]
mov eax, dword [rax + 0x28]
xor r8d, r8d
lea edx, [r8 + 1]
add rax, rcx
call rax
test eax, eax
jne 0x140009e5c
mov ecx, 0x45a
jmp 0x140009e77
mov dword [rbx + 0x1c], 1
mov rax, rbx
jmp 0x140009eae
mov ecx, SafeArrayGetDim
jmp 0x140009c77
mov ecx, 0xc1
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x140009e93
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
test rbx, rbx
je 0x140009eac
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r12
pop rdi
ret