Function at 0x40f870
Capabilities:
Get cpu information
Get system information on windows
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x108
mov eax, dword [0x452074]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
push edi
mov edi, dword [sym.imp.msvcrt.dll_calloc]
xorps xmm0, xmm0
push 0x1a
push 1
movlpd qword [esp + 0x20], xmm0
movaps xmmword [esp + 0x28], xmm0
movq qword [esp + 0x38], xmm0
mov dword [esp + 0x40], 0
call edi
mov esi, eax
add esp, 8
mov dword [esp + 0x4c], esi
test esi, esi
je 0x40fe4d
push 4
push 1
call edi
push 4
push 1
mov dword [esi + 0xc], eax
call edi
push str.CPUID
mov dword [esi + 4], eax
lea eax, [esi + 0x14]
push 6
push eax
mov dword [esi], eax
call fcn.0041f560
mov eax, dword [0x1a278f8]
add esp, 0x1c
mov dword [esi + 0x10], 0
cmp dword [eax + 8], 0
je 0x40f988
mov eax, dword [eax + 0x50]
xor edi, edi
mov dword [esp + 0x14], eax
mov eax, dword [eax + 0xc]
cmp dword [eax], edi
je 0x40f91b
lea eax, [eax + 4]
inc edi
cmp dword [eax], 0
jne 0x40f912
lea eax, [edi + 1]
mov dword [esp + 0x50], eax
inc eax
push 4
push eax
call dword [sym.imp.msvcrt.dll_calloc]
add esp, 8
mov dword [esp + 0x48], eax
test eax, eax
jne 0x40f941
push str.Failed_to_allocate_memory_for_appending_node_n
jmp 0x40fe52
xor ecx, ecx
test edi, edi
jle 0x40f966
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x48]
nop
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ecx*4]
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, edi
jl 0x40f950
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x50]
mov edi, dword [esp + 0x14]
mov dword [eax + ecx*4 - 4], esi
push dword [edi + 0xc]
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [esp + 0x4c]
add esp, 4
mov dword [edi + 0xc], eax
mov dword [esi + 8], edi
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push dword [esp + 0x68]
push 0x44b344
push 0x200
push str.Total_CPUs
push esi
call fcn.00407f50
add esp, 0x14
lea ecx, [esp + 0x18]
call fcn.00414840
test eax, eax
jns 0x40f9ea
push str.Cannot_obtain_raw_CPU_data__n
push 2
call fcn.0041be90
add esp, 4
push eax
call fcn.00401450
add esp, 8
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0041abcf
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x20]
lea ecx, [esp + 0x18]
call fcn.00414ae0
test eax, eax
jns 0x40fbdd
mov edx, dword [0x1a37aec]
xor eax, eax
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], str.No_error
mov dword [esp + 0x80], 0xffffffff
mov dword [esp + 0x84], str.CPUID_instruction_is_not_supported
mov dword [esp + 0x88], 0xfffffffe
mov dword [esp + 0x8c], str.RDTSC_instruction_is_not_supported
mov dword [esp + 0x90], 0xfffffffd
mov dword [esp + 0x94], str.Memory_allocation_failed
mov dword [esp + 0x98], 0xfffffffc
mov dword [esp + 0x9c], str.File_open_operation_failed
mov dword [esp + 0xa0], 0xfffffffb
mov dword [esp + 0xa4], str.Bad_file_format
mov dword [esp + 0xa8], 0xfffffffa
mov dword [esp + 0xac], str.Not_implemented
mov dword [esp + 0xb0], 0xfffffff9
mov dword [esp + 0xb4], str.Unsupported_processor
mov dword [esp + 0xb8], 0xfffffff8
mov dword [esp + 0xbc], str.RDMSR_instruction_is_not_supported
mov dword [esp + 0xc0], 0xfffffff7
mov dword [esp + 0xc4], str.RDMSR_driver_error__generic_
mov dword [esp + 0xc8], 0xfffffff6
mov dword [esp + 0xcc], str.No_permissions_to_install_RDMSR_driver
mov dword [esp + 0xd0], 0xfffffff5
mov dword [esp + 0xd4], str.Cannot_extract_RDMSR_driver__read_only_media__
mov dword [esp + 0xd8], 0xfffffff4
mov dword [esp + 0xdc], str.Bad_handle
mov dword [esp + 0xe0], 0xfffffff3
mov dword [esp + 0xe4], str.Invalid_MSR
mov dword [esp + 0xe8], 0xfffffff2
mov dword [esp + 0xec], str.Invalid_core_number
mov dword [esp + 0xf0], 0xfffffff1
mov dword [esp + 0xf4], str.Error_on_handle_read
mov dword [esp + 0xf8], 0xfffffff0
mov dword [esp + 0xfc], str.Invalid_given_range
mov dword [esp + 0x100], 0xffffffef
mov dword [esp + 0x104], str.Requested_type_not_found
nop dword [eax]
lea ecx, [eax*8]
cmp edx, dword [esp + ecx + 0x78]
je 0x40fbaa
inc eax
cmp eax, 0x12
jb 0x40fb90
mov eax, str.Unknown_error
jmp 0x40fbae
mov eax, dword [esp + ecx + 0x7c]
push eax
push str.Error_identifying_the_CPU:__s_n
push 2
call fcn.0041be90
add esp, 4
push eax
call fcn.00401450
add esp, 0xc
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0041abcf
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x21ec]
cmp eax, 0xa
ja case.default.0x40fbec
jmp dword [eax*4 + 0x40fe6c]
mov eax, str.Project_ACRN
jmp 0x40fc3e
mov eax, str.FreeBSD_bhyve
jmp 0x40fc3e
mov eax, str.Microsoft_Hyper_V
jmp 0x40fc3e
mov eax, 0x44e0f4
jmp 0x40fc3e
mov eax, str.Parallels
jmp 0x40fc3e
mov eax, str.QEMU
jmp 0x40fc3e
mov eax, str.QNX_Hypervisor
jmp 0x40fc3e
mov eax, str.VirtualBox
jmp 0x40fc3e
mov eax, str.VMware
jmp 0x40fc3e
mov eax, 0x44e130
jmp 0x40fc3e
mov eax, str.Unknown
push 0
push eax
mov edx, str.Hypervisor
mov ecx, esi
call fcn.00407d00
lea eax, [edi + 0x21dc]
mov edx, str.Hypervisor_Signature
push 0
push eax
mov ecx, esi
call fcn.00407d00
add esp, 0x10
movzx eax, byte [esp + 0x20]
push eax
push 0x444d3c
push 0x200
push str.Processor_Count
push esi
mov dword [esp + 0x28], eax
call fcn.00407f50
mov eax, dword [esp + 0x3c]
add esp, 0x14
test eax, eax
js 0x40fca8
push eax
push 0x44b344
push 0x200
push str.L1_Data_Cache_Instances
push esi
call fcn.00407f50
add esp, 0x14
mov eax, dword [esp + 0x2c]
test eax, eax
js 0x40fcc9
push eax
push 0x44b344
push 0x200
push str.L1_Intruction_Cache_Instances
push esi
call fcn.00407f50
add esp, 0x14
mov eax, dword [esp + 0x30]
test eax, eax
js 0x40fcea
push eax
push 0x44b344
push 0x200
push str.L2_Cache_Instances
push esi
call fcn.00407f50
add esp, 0x14
mov eax, dword [esp + 0x34]
test eax, eax
js 0x40fd0b
push eax
push 0x44b344
push 0x200
push str.L3_Cache_Instances
push esi
call fcn.00407f50
add esp, 0x14
mov eax, dword [esp + 0x38]
test eax, eax
js 0x40fd2c
push eax
push 0x44b344
push 0x200
push str.L4_Cache_Instances
push esi
call fcn.00407f50
add esp, 0x14
lea eax, [esp + 0x48]
mov dword [esp + 0x50], 4
push eax
push 0x20019
push 0
push str.HARDWAREDESCRIPTIONSystemCentralProcessor0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40fd8f
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x50]
push eax
push 0
push 0
push str.MHz
push dword [esp + 0x5c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [esp + 0x48]
test eax, eax
je 0x40fd81
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40fd8f
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x4c]
test eax, eax
jg 0x40fd99
mov ecx, 0xc8
call fcn.00417510
push eax
push 0x44b344
push 0x200
push str.CPU_Clock__MHz_
push esi
call fcn.00407f50
add esp, 0x14
cmp byte [esp + 0x20], 0
jbe 0x40fe20
mov eax, dword [esp + 0x24]
xor edi, edi
mov dword [esp + 0x48], eax
push edi
push str.CPU_u
lea eax, [esp + 0x5c]
push 0x20
push eax
call fcn.00401e40
push 0
lea edx, [esp + 0x68]
mov ecx, esi
call fcn.00407bf0
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x2c]
add esp, 0x14
push ecx
mov ecx, eax
call fcn.0040f460
add dword [esp + 0x4c], 0x21f0
add esp, 4
inc edi
sub dword [esp + 0x14], 1
jne 0x40fdc3
cmp byte [esp + 0x20], 0
mov edi, dword [sym.imp.msvcrt.dll_free]
jbe 0x40fe26
push dword [esp + 0x24]
call edi
add esp, 4
jmp 0x40fe26
mov edi, dword [sym.imp.msvcrt.dll_free]
cmp word [esp + 0x1a], 0
jbe 0x40fe37
push dword [esp + 0x1c]
call edi
add esp, 4
mov ecx, dword [esp + 0x10c]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.0041abcf
mov esp, ebp
pop ebp
ret
push str.Failed_to_allocate_memory_for_new_node_n
push 2
call fcn.0041be90
add esp, 4
push eax
call fcn.00401450
add esp, 8
push 0xe
call fcn.0041bdf0
cld
inc eax
add bl, dh
sti
inc eax
add dl, bh
sti
inc eax
add byte [ecx], al
cld
inc eax
add byte [eax], cl
cld
inc eax
add byte [edi], cl
cld
inc eax
add byte [esi], dl
cld
inc eax
add byte [0x240040fc], bl
cld
inc eax
add byte [ebx], ch
cld
inc eax
add byte [edx], dh
cld
inc eax
add ah, cl
int3