Function at 0x421730
Capabilities:
Get common file path
Get file version info
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
mov eax, dword [0x5c3040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x28]
push edi
mov dword [ebp - 0x410], ecx
mov ecx, dword [ebp + 0x14]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
movzx eax, word [ebp + 0x10]
push ecx
mov dword [esi + 8], eax
lea eax, [esi + 0x14]
push 0x80
push eax
call fcn.0052c1a3
mov ax, word [ebp + 0x18]
add esp, 0xc
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov word [esi + 0x94], ax
mov ax, word [ebp + 0x1c]
mov word [esi + 0x96], ax
lea eax, [ebp - 0x408]
push eax
push 0x20119
push 0
push str.SystemCurrentControlSetControlProductOptions
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x408], 0
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4218e2
lea eax, [ebp - 0x40c]
mov byte [ebp - 0x404], 0
push eax
lea eax, [ebp - 0x404]
mov dword [ebp - 0x40c], 0x400
push eax
push 0
push 0
push str.ProductType
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4218da
lea eax, [ebp - 0x404]
push str.LANMANNT
push eax
call fcn.005345ef
add esp, 8
cmp dword [ebp + 0x24], 0
je 0x421852
test eax, eax
jne 0x42182a
or dword [esi + 0x130], 4
jmp 0x4218da
lea eax, [ebp - 0x404]
push str.LANSECNT
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x4218da
or dword [esi + 0x130], 8
jmp 0x4218da
test eax, eax
jne 0x421869
or dword [esi + 0x130], 4
mov dword [esi + 0x140], 3
jmp 0x4218da
lea eax, [ebp - 0x404]
push str.SERVERNT
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x42188d
mov dword [esi + 0x140], 2
jmp 0x4218da
lea eax, [ebp - 0x404]
push str.LANSECNT
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x4218b8
or dword [esi + 0x130], 8
mov dword [esi + 0x140], 3
jmp 0x4218da
lea eax, [ebp - 0x404]
push str.WinNT
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x4218da
mov dword [esi + 0x140], 1
push dword [ebp - 0x408]
call edi
lea eax, [ebp - 0x408]
mov dword [ebp - 0x408], 0
push eax
push 0x20119
push 0
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x421993
mov byte [ebp - 0x404], al
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x404]
mov dword [ebp - 0x40c], 0x400
push eax
push 0
push 0
push str.EditionID
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x42198b
lea eax, [ebp - 0x404]
push eax
call fcn.00534443
lea eax, [ebp - 0x404]
push str.CORECONNECTED
push eax
call fcn.005347a8
add esp, 0xc
test eax, eax
jne 0x421981
lea eax, [ebp - 0x404]
push str.CONNECTEDCORE
push eax
call fcn.005347a8
add esp, 8
test eax, eax
je 0x42198b
or dword [esi + 0x134], 0x800000
push dword [ebp - 0x408]
call edi
push 0x57
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x421a25
mov dword [ebp - 0x408], eax
lea eax, [ebp - 0x408]
push eax
push 0x20119
push 0
push str.SystemWPAMediaCenter
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x421a2f
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x414], eax
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x418], 4
push eax
lea eax, [ebp - 0x414]
push eax
push 0
push str.Installed
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x421a1b
cmp dword [ebp - 0x40c], eax
je 0x421a1b
or dword [esi + 0x130], 0x4000
push dword [ebp - 0x408]
call edi
jmp 0x421a2f
or dword [esi + 0x130], 0x4000
push 0x56
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x421ac1
mov dword [ebp - 0x408], eax
lea eax, [ebp - 0x408]
push eax
push 0x20119
push 0
push str.SystemWPATabletPC
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x421acb
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x418], eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x414], 4
push eax
lea eax, [ebp - 0x418]
push eax
push 0
push str.Installed
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x421ab7
cmp dword [ebp - 0x40c], eax
je 0x421ab7
or dword [esi + 0x130], 0x8000
push dword [ebp - 0x408]
call edi
jmp 0x421acb
or dword [esi + 0x130], 0x8000
push 0x58
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x421ae1
or dword [esi + 0x130], 0x10000
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x421af7
or dword [esi + 0x130], 0x20000
mov eax, dword [ebp + 0x20]
xor ecx, ecx
sub eax, 1
je 0x421b17
sub eax, 1
je 0x421b10
sub eax, 1
jne 0x421b1c
lea ecx, [eax + 5]
jmp 0x421b1c
mov ecx, 4
jmp 0x421b1c
mov ecx, 3
mov eax, dword [esi]
mov dword [esi + 0x98], eax
mov eax, dword [esi + 4]
mov dword [esi + 0x9c], eax
mov eax, dword [esi + 8]
mov dword [esi + 0xa0], eax
lea eax, [esi + 0x14]
push eax
lea eax, [esi + 0xac]
mov dword [esi + 0xc], ecx
push 0x80
push eax
mov dword [esi + 0xa4], ecx
call fcn.0052c1a3
movzx eax, word [esi + 0x94]
add esp, 0xc
mov ecx, dword [ebp - 0x410]
mov word [esi + 0x12c], ax
movzx eax, word [esi + 0x96]
push esi
mov word [esi + 0x12e], ax
call fcn.00420770
cmp dword [esi + 0x98], 4
jne 0x421bd5
cmp word [esi + 0x12c], 6
jne 0x421bd5
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x40c], 0
push eax
push 0x101
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x421bd5
push dword [ebp - 0x40c]
mov eax, 1
mov word [esi + 0x12e], ax
mov word [esi + 0x96], ax
call edi
cmp dword [esi + 0x98], 5
jne 0x421c8f
cmp dword [esi + 0x9c], 0
je 0x421c8f
cmp word [esi + 0x12c], 1
jne 0x421c8f
lea eax, [ebp - 0x408]
mov dword [ebp - 0x408], 0
push eax
push 0x101
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x421c8f
mov byte [ebp - 0x404], al
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x404]
mov dword [ebp - 0x410], 0x400
push eax
push 0
push 0
push str.SubVersionNumber
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x421c87
lea eax, [ebp - 0x404]
push 0x5a77c0
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x421c87
mov eax, 1
mov word [esi + 0x12e], ax
mov word [esi + 0x96], ax
push dword [ebp - 0x408]
call edi
lea eax, [ebp - 0x408]
mov dword [ebp - 0x408], 0
push eax
push 0x101
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x421d8c
mov byte [ebp - 0x404], al
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x404]
mov dword [ebp - 0x410], 0x400
push eax
push 0
push 0
push str.CurrentType
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x421d84
lea eax, [ebp - 0x404]
push str.Uniprocessor_Free
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x421d1a
or dword [esi + 0x130], 0x400
jmp 0x421d84
lea eax, [ebp - 0x404]
push str.Uniprocessor_Checked
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x421d3e
or dword [esi + 0x130], 0x800
jmp 0x421d84
lea eax, [ebp - 0x404]
push str.Multiprocessor_Free
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x421d62
or dword [esi + 0x130], 0x1000
jmp 0x421d84
lea eax, [ebp - 0x404]
push str.Multiprocessor_Checked
push eax
call fcn.005345ef
add esp, 8
test eax, eax
jne 0x421d84
or dword [esi + 0x130], 0x2000
push dword [ebp - 0x408]
call edi
lea eax, [ebp - 0x408]
mov dword [esi + 0x144], 0
push eax
push 0x20119
push 0
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x408], 0
call ebx
test eax, eax
jne 0x421df3
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], 4
push eax
lea eax, [esi + 0x144]
push eax
push 0
push 0
push 0x5a77f4
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x408]
call edi
lea eax, [ebp - 0x408]
mov dword [esi + 0x14c], 0
push eax
push 0x20119
push 0
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x408], 0
call ebx
test eax, eax
jne 0x421e86
mov byte [ebp - 0x404], al
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x404]
mov dword [ebp - 0x410], 0x400
push eax
push 0
push 0
push str.EditionID
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x421e7e
lea eax, [ebp - 0x404]
push str.ACor
push eax
call fcn.005347a8
add esp, 8
test eax, eax
je 0x421e7e
mov dword [esi + 0x14c], 1
push dword [ebp - 0x408]
call edi
cmp dword [ebp + 0x20], 0
jne 0x421ec5
or dword [esi + 0x134], 0x200000
mov dword [esi + 0xc], 4
mov dword [esi + 0x98], 3
mov dword [esi + 0x9c], 0xa
mov dword [esi + 0xa0], 0
mov dword [esi + 0xa4], 2
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xorps xmm0, xmm0
mov eax, 0xffff
mov dword [ebp - 0x440], 0
movups xmmword [ebp - 0x460], xmm0
push str.KERNEL32.DLL
movups xmmword [ebp - 0x43c], xmm0
mov word [ebp - 0x460], ax
movups xmmword [ebp - 0x450], xmm0
mov dword [ebp - 0x41c], 0
movups xmmword [ebp - 0x42c], xmm0
mov word [ebp - 0x43c], ax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x421f8e
push str.GetNativeSystemInfo
push eax
call ebx
test eax, eax
je 0x421f46
lea ecx, [ebp - 0x43c]
push ecx
call eax
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
jmp 0x421f6f
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
movups xmm0, xmmword [ebp - 0x43c]
movups xmmword [ebp - 0x460], xmm0
movups xmm0, xmmword [ebp - 0x42c]
movups xmmword [ebp - 0x450], xmm0
mov ecx, dword [ebp - 0x43c]
call fcn.0041fff0
mov ecx, dword [ebp - 0x460]
mov dword [esi + 0xa8], eax
call fcn.0041fff0
mov dword [esi + 0x10], eax
push str.NTDLL.DLL
call edi
test eax, eax
je 0x42203e
push str.RtlGetVersion
push eax
call ebx
mov edi, eax
test edi, edi
je 0x42203e
push 0x118
lea eax, [ebp - 0x11c]
push 0
push eax
call fcn.00526a30
add esp, 0xc
mov dword [ebp - 0x120], 0x11c
lea eax, [ebp - 0x120]
push eax
call edi
test eax, eax
jne 0x42203e
mov eax, dword [ebp - 0x114]
push 0
mov dword [esi + 0xa0], eax
mov eax, dword [ebp - 0x11c]
push 0
mov dword [esi + 0x98], eax
mov eax, dword [ebp - 0x118]
push 0x80
mov dword [esi + 0x9c], eax
lea eax, [esi + 0xac]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x10c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esi + 0xac]
call fcn.004225b0
mov word [esi + 0x12c], ax
xor eax, eax
mov word [esi + 0x12e], ax
lea edi, [esi + 0x150]
mov dword [esi + 0x158], 0
mov dword [edi], 0
push str.NTDLL.DLL
mov dword [edi + 4], 0
mov dword [esi + 0x15c], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x4220c2
push str.RtlGetDeviceFamilyInfoEnum
push eax
call ebx
test eax, eax
je 0x4220c2
lea ecx, [esi + 0x15c]
push ecx
lea ecx, [esi + 0x158]
push ecx
push edi
call eax
mov ecx, dword [edi + 4]
mov eax, ecx
mov edx, dword [edi]
shr eax, 0x10
mov dword [esi + 0x98], eax
movzx eax, cx
mov dword [esi + 0x9c], eax
mov eax, edx
shrd eax, ecx, 0x10
movzx eax, ax
mov dword [esi + 0xa0], eax
movzx eax, dx
mov dword [esi + 0x144], eax
cmp dword [esi + 0xa4], 4
jne 0x4220e4
cmp dword [esi + 0x98], 6
jne 0x4220e4
cmp dword [esi + 0x9c], 3
jne 0x4220e4
mov eax, 1
jmp 0x4220e6
xor eax, eax
test eax, eax
je 0x4221d6
push 0x104
lea eax, [ebp - 0x108]
mov byte [ebp - 0x108], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4221d6
push str.HAL.DLL
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.0052c1fd
add esp, 0xc
mov dword [ebp - 0x410], 0
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
mov ebx, eax
test ebx, ebx
je 0x4221d6
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4221d6
push edi
push ebx
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
test eax, eax
je 0x4221c6
lea eax, [ebp - 0x414]
mov dword [ebp - 0x414], 0
push eax
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x40c], 0
push eax
push 0x5a7330
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x4221c6
mov eax, dword [ebp - 0x40c]
cmp dword [eax + 0xc], 0x25804287
jb 0x4221c6
or dword [esi + 0x134], 0x400000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00524763
mov esp, ebp
pop ebp
ret 0x24