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

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push r13
push r14
push r15
sub rsp, 0x50
mov eax, 0x5a4d
mov rdi, rcx
cmp word [0x140018840], ax
jne 0x140004353
movsxd rcx, dword [0x14001887c]
lea rax, [rcx + 0x108]
cmp rax, 0x27a58
ja 0x140004353
lea rsi, [0x140018840]
add rsi, rcx
cmp dword [rsi], 0x4550
jne 0x140004353
test byte [rsi + 0x38], 1
jne 0x140004353
mov eax, 0x8664
cmp word [rsi + 4], ax
jne 0x140004353
lea rcx, [r11 - 0x48]
call qword [sym.imp.KERNEL32.DLL_GetNativeSystemInfo]
mov r9d, dword [rsp + 0x24]
xor r15d, r15d
mov eax, dword [rsi + 0x50]
mov ecx, r15d
movzx r8d, word [rsi + 0x14]
add r8, 0x24
lea rdx, [r9 - 1]
lea rbx, [r9 - 1]
not rdx
add rbx, rax
and rbx, rdx
cmp r15w, word [rsi + 6]
jae 0x1400040e7
movzx r10d, word [rsi + 6]
add r8, rsi
cmp dword [r8 + 4], r15d
mov eax, dword [rsi + 0x38]
cmovne eax, dword [r8 + 4]
add eax, dword [r8]
lea r8, [r8 + 0x28]
cmp rax, rcx
cmovbe rax, rcx
mov rcx, rax
sub r10, 1
jne 0x1400040c4
lea rax, [r9 - 1]
add rax, rcx
and rax, rdx
cmp rbx, rax
jne 0x140004353
mov rcx, qword [rsi + 0x30]
mov ebp, 0x3000
mov r8d, ebp
mov r9d, 4
mov rdx, rbx
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
lea r14, [rdi + 8]
mov r10, rax
mov qword [r14], rax
test rax, rax
jne 0x140004145
lea r9d, [rax + 4]
mov r8d, ebp
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov qword [r14], rax
mov r10, rax
test rax, rax
je 0x140004353
lea rcx, [r10 + rbx]
movabs r13, 0xffffffff00000000
mov rax, r10
jmp 0x14000419f
mov rdx, qword [rdi + 0x38]
cmp rdx, qword [rdi + 0x40]
je 0x14000416c
mov qword [rdx], r10
add qword [rdi + 0x38], 8
jmp 0x140004178
mov r8, r14
lea rcx, [rdi + 0x30]
call fcn.14001078c
mov r9d, 4
mov r8d, ebp
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov qword [r14], rax
mov r10, rax
test rax, rax
je 0x140004353
lea rcx, [rax + rbx]
and rcx, r13
and rax, r13
cmp rax, rcx
jb 0x140004158
movzx eax, word [rsi + 0x16]
shr ax, 0xd
and al, 1
mov byte [rdi + 0x2c], al
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x28], eax
mov edx, dword [rsi + 0x54]
cmp rdx, 0x27a58
ja 0x140004353
mov r9d, 4
mov r8d, 0x1000
mov rcx, r10
call qword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
lea rdx, [0x140018840]
mov rcx, rax
mov rbx, rax
call sub.VCRUNTIME140.dll_memcpy
movsxd rdx, dword [0x14001887c]
mov rcx, rdi
mov rax, qword [r14]
add rdx, rbx
mov qword [rdi], rdx
mov qword [rdx + 0x30], rax
mov r9d, dword [rsi + 0x38]
call fcn.140004a40
test al, al
je 0x140004353
mov rax, qword [rdi]
mov r8, qword [rax + 0x30]
sub r8, qword [rsi + 0x30]
je 0x1400042be
mov rax, qword [rax + 0xb0]
mov rcx, rax
shr rcx, 0x20
test ecx, ecx
je 0x1400042be
mov rcx, qword [r14]
mov edx, eax
add rdx, rcx
mov eax, dword [rdx]
test eax, eax
je 0x1400042be
mov esi, 0xfff
mov r9d, dword [rdx + 4]
lea r11, [rdx + 8]
mov r10d, eax
mov ebx, r15d
add r10, rcx
lea rax, [r9 - 8]
test rax, 0xfffffffffffffffe
jbe 0x1400042b2
movzx eax, word [r11]
mov ecx, eax
shr ecx, 0xc
cmp ecx, 3
je 0x140004290
cmp ecx, 0xa
jne 0x140004297
and rax, rsi
add qword [rax + r10], r8
jmp 0x140004297
and rax, rsi
add dword [rax + r10], r8d
mov r9d, dword [rdx + 4]
inc ebx
add r11, 2
mov eax, ebx
lea rcx, [r9 - 8]
shr rcx, 1
cmp rax, rcx
jb 0x140004274
mov rcx, qword [r14]
mov eax, r9d
add rdx, rax
mov eax, dword [rdx]
test eax, eax
jne 0x140004257
mov rcx, rdi
call fcn.14000493c
test al, al
je 0x140004353
mov rcx, rdi
call fcn.140004680
test al, al
je 0x140004353
mov rax, qword [rdi]
cmp dword [rax + 0xd4], r15d
jbe 0x140004315
mov ebx, dword [rax + 0xd0]
add rbx, qword [r14]
je 0x140004315
mov rbx, qword [rbx + 0x18]
test rbx, rbx
je 0x140004315
jmp 0x14000430d
mov rcx, qword [rdi + 8]
lea rbx, [rbx + 8]
xor r8d, r8d
lea edx, [r8 + 1]
call rax
mov rax, qword [rbx]
test rax, rax
jne 0x1400042fc
mov rcx, rdi
call fcn.140004484
mov rax, qword [rdi]
cmp dword [rax + 0x28], r15d
je 0x140004353
mov r9d, dword [rax + 0x28]
mov rcx, qword [rdi + 8]
add r9, rcx
mov qword [rdi + 0x88], r9
cmp byte [rdi + 0x2c], r15b
je 0x14000434f
xor r8d, r8d
lea edx, [r8 + 1]
call r9
test eax, eax
setne al
jmp 0x140004355
mov al, 1
jmp 0x140004355
xor al, al
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret