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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xacc
push esi
push edi
lea eax, [ebp - 0x24]
push eax
push 0x20019
xor esi, esi
push esi
push 0x4022d8
push reloc.OLEAUT32.dll_SysReAllocString
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a270
push ebx
mov dword [ebp - 0x784], 0x348
mov dword [ebp - 0x10], esi
mov ebx, 0x104
push esi
lea eax, [ebp - 0x784]
push eax
push dword [ebp - 0x10]
push esi
call dword [sym.imp.USER32.dll_EnumDisplayDevicesW]
test eax, eax
je 0x40a266
test byte [ebp - 0x640], 1
je 0x40a25b
test byte [ebp - 0x640], 4
je 0x40a25b
push esi
lea eax, [ebp - 0xacc]
push eax
push esi
lea eax, [ebp - 0x780]
push eax
mov dword [ebp - 0xacc], 0x348
call dword [sym.imp.USER32.dll_EnumDisplayDevicesW]
test eax, eax
je 0x40a25b
push 0x206
lea eax, [ebp - 0x43a]
push esi
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], ebx
mov word [ebp - 0x43c], si
call sub.MSVCRT.dll_memset
add esp, 0xc
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x43c]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x1c]
test eax, eax
jne 0x40a25b
lea eax, [ebp - 0x14]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x43c]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a25b
mov dword [ebp - 0x20], esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x43c]
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0x18], ebx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x20]
test eax, eax
jne 0x40a24a
lea eax, [ebp - 0xc]
push eax
push 0x20019
push esi
lea eax, [ebp - 0x43c]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a242
push 0x206
lea eax, [ebp - 0x232]
push esi
push eax
mov word [ebp - 0x234], si
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0x4022c0
push dword [ebp - 0xc]
mov dword [ebp - 8], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 4], 7
je 0x40a15a
cmp dword [ebp - 4], 1
jne 0x40a239
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x984]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x40a239
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x207
sub ecx, dword [ebp - 8]
cmp dword [ebp + 0xc], esi
lea eax, [ebp + eax*2 - 0x234]
mov word [eax], 0x5c
mov dword [ebp - 8], ecx
jne 0x40a1f0
lea ecx, [ebp - 8]
push ecx
add eax, 2
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0x4022b0
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a239
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x984]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40a239
cmp dword [ebp - 4], 7
je 0x40a1f0
cmp dword [ebp - 4], 1
jne 0x40a239
lea eax, [ebp - 0x28]
push eax
push 0x20019
push esi
push 0x40228c
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a239
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push esi
push 0x402280
push dword [ebp - 0x28]
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x28]
mov edi, eax
neg edi
sbb edi, edi
inc edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, esi
je 0x40a0c2
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, esi
je 0x40a077
inc dword [ebp - 0x10]
cmp edi, esi
je 0x409ff9
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov ecx, dword [ebp + 8]
movzx eax, byte [ecx + 0x16]
movzx ecx, byte [ecx + 0x15]
pop edi
imul eax, ecx
pop esi
leave
ret