Function at 0x402616
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
je 0x4028a2
mov dword [ebp - 0x10], 0x104
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0x412c68
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x402672
xor eax, eax
jmp 0x402e5c
cmp dword [ebp + 0xc], 2
je 0x402682
cmp dword [ebp + 0xc], 3
jne 0x402800
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24c], ecx
cmp dword [ebp - 0x24c], 2
je 0x4026a2
cmp dword [ebp - 0x24c], 3
je 0x40270d
jmp 0x402776
mov dword [ebp - 0x10], 4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push str.SchemeMenuMode.Hotkey
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4026de
mov edx, dword [ebp - 0x14]
and edx, 2
test edx, edx
je 0x4026de
mov dword [ebp - 0x250], 1
jmp 0x4026e8
mov dword [ebp - 0x250], 0
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40270b
push str.AutoApplySchemeName
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00408e50
add esp, 8
jmp 0x402776
mov dword [ebp - 0x10], 4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push str.SchemeMenuMode.Dock
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402749
mov edx, dword [ebp - 0x14]
and edx, 2
test edx, edx
je 0x402749
mov dword [ebp - 0x254], 1
jmp 0x402753
mov dword [ebp - 0x254], 0
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x402776
push str.AutoApplySchemeNameForDock
lea ecx, [ebp - 0x11c]
push ecx
call fcn.00408e50
add esp, 8
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x258], edx
cmp dword [ebp - 0x258], 0
je 0x40279c
cmp dword [ebp - 0x258], 1
je 0x4027a5
cmp dword [ebp - 0x258], 2
je 0x4027ae
jmp 0x4027fb
mov dword [ebp - 8], 0
jmp 0x4027fb
mov dword [ebp - 8], 1
jmp 0x4027fb
mov dword [ebp - 0x10], 0x104
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0
lea edx, [ebp - 0x11c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4027e8
cmp dword [ebp - 0x10], 1
jbe 0x4027e8
mov dword [ebp - 0x25c], 1
jmp 0x4027f2
mov dword [ebp - 0x25c], 0
mov ecx, dword [ebp - 0x25c]
mov dword [ebp - 8], ecx
jmp 0x40288b
cmp dword [ebp + 0xc], 4
jne 0x402864
mov dword [ebp - 0x10], 4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push str.AutoRestoreForResume
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40283e
cmp dword [ebp - 0x14], 0
je 0x40283e
mov dword [ebp - 0x260], 1
jmp 0x402848
mov dword [ebp - 0x260], 0
mov edx, dword [ebp - 0x260]
mov dword [ebp - 8], edx
push 0x412d00
mov eax, dword [ebp + 8]
push eax
call fcn.00408e50
add esp, 8
jmp 0x40288b
cmp dword [ebp + 0xc], 1
jne 0x402884
mov dword [ebp - 8], 1
push 0x412d04
mov ecx, dword [ebp + 8]
push ecx
call fcn.00408e50
add esp, 8
jmp 0x40288b
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
jne 0x4028a2
xor eax, eax
jmp 0x402e5c
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 1
je 0x4028bf
cmp dword [ebp - 0x264], 4
je 0x4028bf
jmp 0x4028e7
lea ecx, [ebp - 0xc]
push ecx
push 0x20019
push 0
push str.SOFTWAREIBMNPdirectDataCommonOriginal_Schemes
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4028e5
xor eax, eax
jmp 0x402e5c
jmp 0x40290d
lea edx, [ebp - 0xc]
push edx
push 0x20019
push 0
push 0x412d3c
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40290d
xor eax, eax
jmp 0x402e5c
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402e48
mov dword [ebp - 0x130], 0
jmp 0x402949
mov eax, dword [ebp - 0x130]
add eax, 1
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x120], 0xa
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x120]
push ecx
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x130]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x402e27
lea edx, [ebp - 0x244]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x12c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x4029f0
lea edx, [ebp - 0x138]
push edx
lea eax, [ebp - 0x240]
push eax
push 0
push 0
push str.Resolution
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4029f0
mov dword [ebp - 0x268], 1
jmp 0x4029fa
mov dword [ebp - 0x268], 0
mov edx, dword [ebp - 0x268]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x402a49
mov eax, dword [ebp - 0x240]
and eax, 0xffff
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x17c], eax
mov eax, dword [ebp - 0x240]
shr eax, 0x10
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x180], eax
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402a9d
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x178]
push eax
push 0
push 0
push str.ColorDepth
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402a9d
mov dword [ebp - 0x26c], 1
jmp 0x402aa7
mov dword [ebp - 0x26c], 0
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 8], edx
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402b04
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x1ac]
push eax
push 0
push 0
push str.DisplayDeviceMode
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402b04
mov dword [ebp - 0x270], 1
jmp 0x402b0e
mov dword [ebp - 0x270], 0
mov edx, dword [ebp - 0x270]
mov dword [ebp - 8], edx
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402b6b
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x1b8]
push eax
push 0
push 0
push str.CRTCConfig
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402b6b
mov dword [ebp - 0x274], 1
jmp 0x402b75
mov dword [ebp - 0x274], 0
mov edx, dword [ebp - 0x274]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x130]
imul eax, eax, 0xbc
mov ecx, dword [ebp + 8]
mov dword [ecx + eax + 0x1b0], 0
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx + 0x1ac]
and ecx, 4
test ecx, ecx
je 0x402c1c
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402c09
lea edx, [ebp - 0x138]
push edx
mov eax, dword [ebp - 0x130]
imul eax, eax, 0xbc
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x1b0]
push edx
push 0
push 0
push str.TVSignalFormat
mov eax, dword [ebp - 0x244]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402c09
mov dword [ebp - 0x278], 1
jmp 0x402c13
mov dword [ebp - 0x278], 0
mov ecx, dword [ebp - 0x278]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
mov dword [eax + edx + 0x1b4], 0
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x1ac]
and eax, 1
test eax, eax
je 0x402cba
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402ca7
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x1b4]
push ecx
push 0
push 0
push str.RefreshRate.LCD
mov edx, dword [ebp - 0x244]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402ca7
mov dword [ebp - 0x27c], 1
jmp 0x402cb1
mov dword [ebp - 0x27c], 0
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x1b8]
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x134], 0
jmp 0x402cff
mov ecx, dword [ebp - 0x248]
shr ecx, 1
mov dword [ebp - 0x248], ecx
mov edx, dword [ebp - 0x134]
add edx, 1
mov dword [ebp - 0x134], edx
cmp dword [ebp - 0x248], 0
je 0x402dda
mov eax, dword [ebp - 0x130]
imul eax, eax, 0xbc
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x110]
mov eax, dword [ebp - 0x134]
mov dword [edx + eax*4 + 0xac], 0
mov ecx, dword [ebp - 0x248]
and ecx, 1
test ecx, ecx
je 0x402dd5
mov edx, dword [ebp - 0x134]
push edx
push str.DeviceForCRTC._d
lea eax, [ebp - 0x23c]
push eax
call fcn.00408df6
add esp, 0xc
mov dword [ebp - 0x138], 4
cmp dword [ebp - 8], 0
je 0x402dc2
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x110]
mov edx, dword [ebp - 0x134]
lea eax, [ecx + edx*4 + 0xac]
push eax
push 0
push 0
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x244]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402dc2
mov dword [ebp - 0x280], 1
jmp 0x402dcc
mov dword [ebp - 0x280], 0
mov eax, dword [ebp - 0x280]
mov dword [ebp - 8], eax
jmp 0x402ce2
mov ecx, dword [ebp - 0x244]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
jne 0x402def
jmp 0x402e27
mov edx, dword [ebp - 0x130]
imul edx, edx, 0xbc
mov eax, dword [ebp + 8]
mov word [eax + edx + 0x134], 0x9c
mov ecx, dword [ebp - 0x130]
imul ecx, ecx, 0xbc
mov edx, dword [ebp + 8]
mov dword [edx + ecx + 0x138], 0x5c0000
jmp 0x40293a
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
je 0x402e46
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x130]
mov dword [ecx + 0x108], edx
jmp 0x402e4f
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret