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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov dword [ebp - 0x630], 0
cmp dword [0x420a88], 0
je 0x4099ca
cmp dword [ebp + 0x14], 0xffffffff
jne 0x4099ca
mov eax, dword [ebp + 0x18]
and eax, 0xff
push eax
push 0x420be4
push 0x420be8
push 0x420bec
push 0x420bf0
push 0x420bf4
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00406c95
add esp, 0xc
push eax
push 0x420bf8
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00406c95
add esp, 0xc
push eax
push 0
mov edx, dword [ebp + 0x14]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040652e
add esp, 0x2c
mov dword [ebp + 0x14], eax
lea ecx, [ebp - 0x634]
push ecx
push 0x20019
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x638], eax
cmp dword [ebp - 0x638], 0
je 0x4099fd
mov eax, dword [ebp + 0x14]
jmp 0x409c55
push 0x104
lea ecx, [ebp - 0x208]
push ecx
mov edx, dword [ebp - 0x630]
push edx
mov eax, dword [ebp - 0x634]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x409c45
lea ecx, [ebp - 0x20c]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x208]
push edx
mov eax, dword [ebp - 0x634]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409c31
mov dword [ebp - 0x41c], 0x104
lea ecx, [ebp - 0x41c]
push ecx
lea edx, [ebp - 0x524]
push edx
lea eax, [ebp - 0x208]
push eax
mov ecx, dword [ebp - 0x634]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x409c24
mov dword [ebp - 0x41c], 0x104
lea edx, [ebp - 0x41c]
push edx
lea eax, [ebp - 0x310]
push eax
push 0
push 0
push str.StubPath
mov ecx, dword [ebp - 0x20c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x409c24
movsx edx, byte [ebp - 0x310]
test edx, edx
je 0x409c24
push 0
lea eax, [ebp - 0x310]
push eax
call fcn.00403360
add esp, 8
mov dword [ebp - 0x420], eax
lea ecx, [ebp - 0x418]
push ecx
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp - 0x420]
push eax
call fcn.004038ca
add esp, 0xc
mov dword [ebp - 0x314], eax
mov ecx, dword [ebp - 0x314]
push ecx
push 0xffffffffffffffff
push 0
push 1
push 0x1002
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
push eax
call dword [sym.imp.COMCTL32.dll_ImageList_ReplaceIcon]
mov dword [ebp - 0x62c], eax
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0x104]
push ecx
mov edx, dword [ebp - 0x420]
push edx
lea eax, [ebp - 0x524]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406381
add esp, 0x14
and eax, 0xff
test eax, eax
je 0x409c24
cmp dword [ebp + 0x14], 0xffffffff
jne 0x409bc7
mov edx, dword [ebp + 0x18]
and edx, 0xff
push edx
push 0x420bfc
push 0x420c00
push 0x420c04
push 0x420c08
push 0x420c0c
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00406c95
add esp, 0xc
push eax
push 0x420c10
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00406c95
add esp, 0xc
push eax
push 0
mov ecx, dword [ebp + 0x14]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0040652e
add esp, 0x2c
mov dword [ebp + 0x14], eax
mov eax, dword [ebp + 0x18]
and eax, 0xff
push eax
lea ecx, [ebp - 0x628]
push ecx
lea edx, [ebp - 0x418]
push edx
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x420]
push ecx
lea edx, [ebp - 0x208]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00406c95
add esp, 0xc
push eax
lea edx, [ebp - 0x524]
push edx
push 2
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x62c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040652e
add esp, 0x2c
mov eax, dword [ebp - 0x20c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x630]
add ecx, 1
mov dword [ebp - 0x630], ecx
jmp 0x4099fd
mov edx, dword [ebp - 0x634]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x14]
mov esp, ebp
pop ebp
ret