Function at 0x405a20
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x180
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], ebx
rep stosd dword es:[edi], eax
mov ecx, 0x35
lea edi, [esp + 0x54]
mov dword [esp + 0x50], ebx
mov esi, str.SOFTWARENVIDIA_CorporationGlobalNVTweakState
rep stosd dword es:[edi], eax
mov ecx, 0x18
lea edi, [esp + 0x128]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [esp + 0x18]
mov esi, 1
push eax
push esi
lea ecx, [esp + 0x130]
push ebx
push ecx
push 0x80000002
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x60], 0x30
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x405ab6
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x1c]
push edx
push ecx
push ebx
push ebx
push str.SmartDimmerAPI
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [0x4242e0]
lea eax, [esp + 0x50]
push 0xd8
push eax
push 0x116
push 0x95510933
push ecx
call fcn.004049f0
add esp, 0x14
test eax, eax
je 0x405ae9
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x180
ret
call fcn.00405130
test eax, eax
je 0x405afe
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x180
ret
cmp dword [esp + 0x10c], ebx
je 0x405bbc
cmp dword [esp + 0x1c], ebx
jne 0x405b1b
cmp dword [esp + 0x20], ebx
je 0x405bbc
xor edx, edx
lea eax, [esp + 0xc]
mov dword [esp + 0xd], edx
push eax
mov dword [esp + 0x15], edx
mov byte [esp + 0x10], bl
mov word [esp + 0x19], dx
mov byte [esp + 0x1b], dl
call sub.KERNEL32.dll_GetSystemPowerStatus
mov eax, dword [esp + 0x190]
mov ecx, 4
cmp eax, ecx
ja case.default.0x405b50
jmp dword [eax*4 + 0x405ed4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x41f938]
cmp eax, ebx
mov dword [esp + 0x120], ecx
jne 0x405b78
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x180
ret
mov cl, byte [esp + 0xc]
mov edx, dword [esp + 0x11c]
mov eax, dword [esp + 0x30]
cmp cl, 1
je 0x405b90
mov eax, dword [esp + 0x34]
and eax, 0xffff
cmp edx, eax
jb 0x405bbc
mov dword [esp + 0x11c], eax
mov eax, dword [0x4243a8]
cmp eax, ebx
mov dword [0x41f948], ebx
je case.default.0x405b50
cmp cl, 1
jne case.default.0x405b50
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x180
ret
mov eax, dword [esp + 0x20]
mov edx, dword [0x41f934]
cmp eax, ebx
mov al, byte [esp + 0xc]
mov dword [esp + 0x120], edx
je 0x405c76
cmp al, 1
jne 0x405c02
mov eax, dword [esp + 0x30]
mov dword [0x41f948], esi
shr eax, 0x10
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
mov al, byte [esp + 0xe]
cmp al, 0x4b
jbe 0x405c23
mov ecx, dword [esp + 0x34]
mov dword [0x41f948], esi
shr ecx, 0x10
mov dword [esp + 0x11c], ecx
jmp case.default.0x405b50
cmp al, 0x32
jbe 0x405c40
mov edx, dword [esp + 0x38]
mov dword [0x41f948], esi
shr edx, 0x10
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
cmp al, 0x19
jbe 0x405c5d
mov eax, dword [esp + 0x3c]
mov dword [0x41f948], esi
shr eax, 0x10
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
mov ecx, dword [esp + 0x40]
mov dword [0x41f948], esi
shr ecx, 0x10
mov dword [esp + 0x11c], ecx
jmp case.default.0x405b50
cmp al, 1
jne 0x405c90
mov edx, dword [esp + 0x28]
mov dword [0x41f948], esi
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
mov eax, dword [esp + 0x2c]
mov dword [0x41f948], esi
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
mov eax, dword [0x41f948]
mov dword [esp + 0x120], ebx
cmp eax, ebx
je 0x405d42
mov eax, dword [esp + 0x20]
cmp eax, ebx
mov al, byte [esp + 0xc]
je 0x405d25
cmp al, 1
jne 0x405cd3
mov ecx, dword [esp + 0x30]
jmp 0x405e91
mov al, byte [esp + 0xe]
cmp al, 0x4b
jbe 0x405cee
mov edx, dword [esp + 0x34]
shr edx, 0x10
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
cmp al, 0x32
jbe 0x405d05
mov eax, dword [esp + 0x38]
shr eax, 0x10
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
cmp al, 0x19
jbe 0x405d12
mov ecx, dword [esp + 0x3c]
jmp 0x405e91
mov edx, dword [esp + 0x40]
shr edx, 0x10
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
cmp al, 1
jne 0x405d39
mov eax, dword [esp + 0x28]
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
mov ecx, dword [esp + 0x2c]
jmp 0x405e94
mov eax, dword [0x4243a8]
cmp eax, ebx
mov al, byte [esp + 0xc]
je 0x405d63
cmp al, 1
jne 0x405d63
mov edx, dword [esp + 0x28]
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
cmp dword [esp + 0x20], ebx
je 0x405d91
cmp al, 1
jne 0x405d82
mov eax, dword [esp + 0x30]
and eax, 0xffff
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
mov ecx, dword [esp + 0x34]
and ecx, 0xffff
jmp 0x405e94
cmp al, 1
jne 0x405da5
mov edx, dword [esp + 0x28]
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
mov eax, dword [esp + 0x34]
and eax, 0xffff
mov dword [esp + 0x11c], eax
jmp case.default.0x405b50
mov eax, dword [0x41f948]
mov dword [esp + 0x120], ebx
cmp eax, ebx
jne 0x405dd6
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x180
ret
cmp dword [esp + 0x20], ebx
je 0x405bbc
cmp byte [esp + 0xc], 1
jne 0x405e02
cmp dword [0x4243bc], esi
je 0x405bbc
mov ecx, dword [esp + 0x30]
mov dword [0x4243bc], esi
jmp 0x405e91
mov al, byte [esp + 0xe]
cmp al, 0x4b
jbe 0x405e32
mov ecx, dword [0x4243bc]
mov eax, 2
cmp ecx, eax
je 0x405bbc
mov edx, dword [esp + 0x34]
mov dword [0x4243bc], eax
shr edx, 0x10
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
cmp al, 0x32
jbe 0x405e4f
mov ecx, dword [0x4243bc]
mov eax, 3
cmp ecx, eax
je 0x405bbc
mov ecx, dword [esp + 0x38]
jmp 0x405e8c
cmp al, 0x19
jbe 0x405e75
cmp dword [0x4243bc], ecx
je 0x405bbc
mov edx, dword [esp + 0x3c]
mov dword [0x4243bc], ecx
shr edx, 0x10
mov dword [esp + 0x11c], edx
jmp case.default.0x405b50
mov ecx, dword [0x4243bc]
mov eax, 5
cmp ecx, eax
je 0x405bbc
mov ecx, dword [esp + 0x40]
mov dword [0x4243bc], eax
shr ecx, 0x10
mov dword [esp + 0x11c], ecx
mov eax, dword [0x4242e0]
lea edx, [esp + 0x50]
push 0xd8
push edx
push 0x116
push 0x95510933
push eax
call fcn.00404a50
add esp, 0x14
test eax, eax
je 0x405bbc
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x180
ret