Function at 0x404971
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e8
push edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesIBMPMSVCParametersInterfaceVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], 4
cmp dword [ebp - 0x14], 0
je 0x4049e1
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4049e1
mov dword [ebp - 0x1c0], 1
jmp 0x4049eb
mov dword [ebp - 0x1c0], 0
mov ecx, dword [ebp - 0x1c0]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], 0
je 0x404a19
cmp dword [ebp - 4], 0x100
jb 0x404a19
mov dword [ebp - 0x1c4], 1
jmp 0x404a23
mov dword [ebp - 0x1c4], 0
mov eax, dword [ebp - 0x1c4]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x404a5d
lea ecx, [ebp - 0x10]
push ecx
push 0x20019
push 0
push 0x413420
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404a5d
mov dword [ebp - 0x1c8], 1
jmp 0x404a67
mov dword [ebp - 0x1c8], 0
mov edx, dword [ebp - 0x1c8]
mov dword [ebp - 0x14], edx
mov dword [ebp - 8], 4
cmp dword [ebp - 0x14], 0
je 0x404aa5
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404aa5
mov dword [ebp - 0x1cc], 1
jmp 0x404aaf
mov dword [ebp - 0x1cc], 0
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], 0
je 0x404ade
mov edx, dword [ebp - 4]
and edx, 0x40
test edx, edx
je 0x404ade
mov dword [ebp - 0x1d0], 1
jmp 0x404ae8
mov dword [ebp - 0x1d0], 0
mov eax, dword [ebp - 0x1d0]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x404b00
mov ecx, dword [ebp - 0xc]
or ecx, 2
mov dword [ebp - 0xc], ecx
lea edx, [ebp - 0x10]
push edx
push 0x20019
push 0
push str.SOFTWAREIBMNPDirectInstallInfo
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 4
cmp dword [ebp - 0x18], 0
je 0x404b61
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push str.NPDWIZ
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404b61
cmp dword [ebp - 4], 0
je 0x404b61
mov dword [ebp - 0x1d4], 1
jmp 0x404b6b
mov dword [ebp - 0x1d4], 0
mov eax, dword [ebp - 0x1d4]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x404b9d
mov dword [ebp - 8], 4
lea ecx, [ebp - 8]
push ecx
push 0x412c00
push 0
push 0
push str.SupportParameters
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x18], 0
je 0x404bb6
mov ecx, dword [ebp - 0xc]
or ecx, 4
mov dword [ebp - 0xc], ecx
push str.Oemdspif.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x416f60], eax
cmp dword [0x416f60], 0
je 0x404c38
push str.GetDisplayDeviceCapability
mov edx, dword [0x416f60]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4176cc], eax
cmp dword [0x4176cc], 0
je 0x404c16
push 0x416f64
call dword [0x4176cc]
test eax, eax
jne 0x404c16
mov eax, dword [0x416f64]
and eax, 1
test eax, eax
je 0x404c16
mov dword [ebp - 0x1d8], 1
jmp 0x404c20
mov dword [ebp - 0x1d8], 0
mov ecx, dword [ebp - 0x1d8]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
je 0x404c38
mov edx, dword [ebp - 0xc]
or edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
and eax, 2
test eax, eax
je 0x404d10
mov ecx, dword [ebp - 0xc]
and ecx, 4
test ecx, ecx
je 0x404d10
mov edx, dword [ebp - 0xc]
and edx, 1
test edx, edx
je 0x404d10
mov dword [ebp - 0xb0], 0x94
mov dword [ebp - 0xac], 0
mov ecx, 0x23
xor eax, eax
lea edi, [ebp - 0xa8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xa0], 2
jne 0x404d10
cmp dword [ebp - 0xac], 5
jb 0x404d10
push 0x104
lea ecx, [ebp - 0x1b4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str._tpfnf7.dll
push 0x5c
lea edx, [ebp - 0x1b4]
push edx
call fcn.004090a0
add esp, 8
push eax
call fcn.00408e50
add esp, 8
lea eax, [ebp - 0x1b4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x416f5c], eax
cmp dword [0x416f5c], 0
jne 0x404cf9
mov dword [ebp - 0xc], 0
mov ecx, dword [0x416f5c]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x416f5c], 0
call fcn.004014e0
mov dword [ebp - 0x1dc], eax
cmp dword [ebp - 0x1dc], 0x3731
ja 0x404d59
cmp dword [ebp - 0x1dc], 0x3730
jae 0x404d73
cmp dword [ebp - 0x1dc], 0x314b
je 0x404d73
cmp dword [ebp - 0x1dc], 0x3154
jbe 0x404d7f
cmp dword [ebp - 0x1dc], 0x3157
jbe 0x404d73
jmp 0x404d7f
cmp dword [ebp - 0x1dc], 0x3734
jb 0x404d7f
cmp dword [ebp - 0x1dc], 0x3735
jbe 0x404d73
jmp 0x404d7f
mov dword [ebp - 4], 1
jmp 0x404ec1
mov dword [ebp - 4], 0
push str.GetDisplayDriverName
mov edx, dword [0x416f60]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4176e0], eax
cmp dword [0x4176e0], 0
je 0x404ec1
push 0x416f68
call dword [0x4176e0]
test eax, eax
jne 0x404ec1
mov dword [ebp - 0x1bc], 0x416f68
jmp 0x404dd8
mov eax, dword [ebp - 0x1bc]
add eax, 1
mov dword [ebp - 0x1bc], eax
mov ecx, dword [ebp - 0x1bc]
movsx edx, byte [ecx]
test edx, edx
je 0x404ea6
cmp dword [0x41459c], 1
jle 0x404e11
push 0x103
mov eax, dword [ebp - 0x1bc]
movsx ecx, byte [eax]
push ecx
call fcn.0040921c
add esp, 8
mov dword [ebp - 0x1e0], eax
jmp 0x404e32
mov edx, dword [ebp - 0x1bc]
movsx eax, byte [edx]
mov ecx, dword [str.________________________________H]
xor edx, edx
mov dx, word [ecx + eax*2]
and edx, 0x103
mov dword [ebp - 0x1e0], edx
cmp dword [ebp - 0x1e0], 0
je 0x404ea1
cmp dword [0x41459c], 1
jle 0x404e60
push 2
mov eax, dword [ebp - 0x1bc]
movsx ecx, byte [eax]
push ecx
call fcn.0040921c
add esp, 8
mov dword [ebp - 0x1e4], eax
jmp 0x404e7e
mov edx, dword [ebp - 0x1bc]
movsx eax, byte [edx]
mov ecx, dword [str.________________________________H]
xor edx, edx
mov dx, word [ecx + eax*2]
and edx, 2
mov dword [ebp - 0x1e4], edx
cmp dword [ebp - 0x1e4], 0
je 0x404ea1
mov eax, dword [ebp - 0x1bc]
movsx ecx, byte [eax]
push ecx
call fcn.00409150
add esp, 4
mov edx, dword [ebp - 0x1bc]
mov byte [edx], al
jmp 0x404dc9
push str.INTEL
push 0x416f68
call fcn.004090d0
add esp, 8
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push 0x4134fc
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 8], 4
cmp dword [ebp - 0x1b8], 0
je 0x404f22
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push edx
push 0
push 0
push str.GetResetDisplayDevices
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404f22
mov dword [ebp - 0x1e8], 1
jmp 0x404f2c
mov dword [ebp - 0x1e8], 0
mov ecx, dword [ebp - 0x1e8]
mov dword [ebp - 0x1b8], ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
je 0x404f53
mov eax, dword [ebp - 0xc]
or eax, 0x80000000
mov dword [ebp - 0xc], eax
cmp dword [0x416f60], 0
je 0x404f69
mov ecx, dword [0x416f60]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x416f60], 0
mov eax, dword [ebp - 0xc]
pop edi
mov esp, ebp
pop ebp
ret