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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x684
push ebx
push esi
mov esi, dword [0x4339ac]
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
push ebx
push ebx
push 0xb
push dword [esi + 0x3988]
mov dword [esi + 0x3990], ebx
call edi
push ebx
push ebx
push 0x1009
push dword [esi + 0x3988]
call edi
lea eax, [esi + 0x454]
push eax
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4263c4
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str.BaseData
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
lea eax, [ebp - 0x14]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
lea eax, [ebp - 0x47c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x408be3
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x378]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ebx
push ebx
jmp 0x4086f4
inc dword [ebp - 0x1c]
cmp eax, ebx
jne 0x4086df
lea eax, [ebp - 0xc]
push eax
push 0xf003f
push ebx
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4086df
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.PGNO
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4086d6
mov eax, dword [esi + 0x79c]
cmp eax, 0x20
je 0x408633
cmp dword [ebp - 0x170], eax
jne 0x4086d6
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.DGNO
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4086d6
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.TYPE
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4086d6
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.NAME
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4086d6
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.COMT
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
inc dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x4085c2
mov eax, dword [esi + 0x3998]
cmp eax, ebx
je 0x408728
push eax
mov eax, dword [0x4339ac]
push ebx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 8], ebx
mov dword [esi + 0x3998], ebx
je 0x408bda
mov eax, dword [ebp - 8]
imul eax, eax, 0x31c
push eax
mov eax, dword [0x4339ac]
push 8
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [esi + 0x3998], eax
je 0x408bda
mov eax, dword [ebp - 8]
mov dword [esi + 0x3990], eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
lea eax, [ebp - 0x14]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
lea eax, [ebp - 0x47c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x408be3
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x378]
push eax
push ebx
push dword [ebp - 0x14]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x408bda
mov dword [ebp - 0x18], ebx
inc dword [ebp - 0x1c]
cmp eax, ebx
jne 0x408baa
lea eax, [ebp - 0xc]
push eax
push 0xf003f
push ebx
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408baa
lea eax, [ebp - 0x378]
push eax
lea eax, [ebp - 0x47c]
push eax
lea eax, [ebp - 0x684]
push 0x42c570
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.PGNO
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408ba1
mov eax, dword [esi + 0x79c]
cmp eax, 0x20
mov ecx, dword [ebp - 0x170]
mov dword [ebp - 0x24], ecx
je 0x408868
cmp ecx, eax
jne 0x408ba1
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.DGNO
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408ba1
mov eax, dword [ebp - 0x170]
push eax
mov dword [ebp - 0x20], eax
call fcn.004081e0
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.TYPE
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408ba1
mov eax, dword [ebp - 0x170]
cmp eax, 3
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], ebx
jne 0x408919
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push 0x42c56c
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x170]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.NAME
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408ba1
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x580]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.COMT
push dword [ebp - 0xc]
mov dword [ebp - 4], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x408975
mov byte [ebp - 0x580], bl
mov eax, dword [ebp - 8]
push dword [ebp - 0x24]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x274]
push 0x4263cc
push eax
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x5c], ebx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x274]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push eax
push ebx
push 0x1007
push dword [esi + 0x3988]
call edi
mov ecx, dword [esi + 0x3998]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
mov dword [eax + ecx], edx
lea ecx, [ebp - 0x684]
push ecx
mov ecx, dword [esi + 0x3998]
lea eax, [ecx + eax + 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 8]
xor eax, eax
inc eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x274]
push 0x4263cc
push eax
mov dword [ebp - 0x60], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x274]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push eax
push ebx
push 0x1006
push dword [esi + 0x3988]
call edi
mov eax, dword [esi + 0x3998]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x18]
push dword [ebp - 0x20]
mov dword [eax + edx + 4], ecx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x274]
push str._04X
push eax
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x5c], 2
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x274]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push eax
push ebx
push 0x1006
push dword [esi + 0x3988]
call edi
mov eax, dword [esi + 0x3998]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x18]
mov dword [eax + edx + 8], ecx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x30]
push dword [eax*4 + 0x431c28]
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x5c], 3
push 0x42c560
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp dword [ebp - 0x28], ebx
je 0x408ad5
push str._HL_
lea eax, [ebp - 0x274]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x274]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push eax
push ebx
push 0x1006
push dword [esi + 0x3988]
call edi
mov eax, dword [esi + 0x3998]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
mov dword [eax + edx + 0xc], ecx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x170]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push eax
push ebx
push 0x1006
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x5c], 4
push dword [esi + 0x3988]
call edi
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x170]
push eax
mov eax, dword [esi + 0x3998]
lea eax, [eax + ecx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x580]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push eax
push ebx
push 0x1006
mov dword [ebp - 0x64], 1
mov dword [ebp - 0x5c], 5
push dword [esi + 0x3988]
call edi
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x580]
push eax
mov eax, dword [esi + 0x3998]
lea eax, [eax + ecx + 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
inc dword [ebp - 8]
add dword [ebp - 0x18], 0x31c
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 4], 0x104
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x4087cf
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0xffffffffffffffff
push dword [esi + 0x3988]
call fcn.0041d130
push ebx
push 1
push 0xb
push dword [esi + 0x3988]
call edi
push dword [esi + 0x3988]
call dword [sym.imp.USER32.dll_UpdateWindow]
pop edi
pop esi
pop ebx
leave
ret