Function at 0x406040
Capabilities:
Access peb ldr_data
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4082c1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc38
push ebx
push esi
mov esi, ecx
mov eax, 0x400
push 0x40c988
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], eax
mov eax, 4
lea ecx, [esp + 0xc]
mov dword [esp + 0xc4c], 1
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
call sub.MFC42.DLL_CString::CString_2
push ecx
lea eax, [esp + 0xc58]
mov bl, 2
mov ecx, esp
mov dword [esp + 0x3c], esp
push eax
mov byte [esp + 0xc50], bl
call sub.MFC42.DLL_CString::CString_1
push ecx
lea edx, [esp + 0xc58]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
mov byte [esp + 0xc54], 3
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 0x38]
mov ecx, esi
push eax
mov byte [esp + 0xc54], bl
call fcn.00404020
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0xc4c], 4
call fcn.00407534
lea ecx, [esp + 0x30]
mov byte [esp + 0xc48], bl
call fcn.004074ce
mov ecx, dword [esp + 8]
push 0x40c988
push ecx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x406149
lea ecx, [esp + 8]
mov byte [esp + 0xc48], 1
call fcn.004074ce
mov byte [esp + 0xc48], 0
jmp 0x4062b7
mov eax, dword [esp + 8]
lea edx, [esp + 0xc]
push edx
xor ebx, ebx
push 1
push ebx
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40629f
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push ebx
push 0x40c844
push ecx
call esi
cmp eax, ebx
je 0x40619b
mov edx, dword [esp + 0xc]
push edx
jmp 0x406299
mov ecx, dword [esp + 0xc58]
lea eax, [esp + 0x40]
push eax
push 0x40c6bc
push ecx
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea edx, [esp + 0x24]
lea eax, [esp + 0x440]
lea ecx, [esp + 0x10]
push edx
mov edx, dword [esp + 0x10]
push eax
push ecx
push ebx
push 0x40c840
push edx
call esi
cmp eax, ebx
jne 0x406294
mov edx, dword [esp + 0xc5c]
lea ecx, [esp + 0x440]
push ecx
push 0x40c6bc
push edx
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea eax, [esp + 0x34]
lea ecx, [esp + 0x840]
lea edx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push ecx
push edx
push ebx
push 0x40c83c
push eax
call esi
cmp eax, ebx
je 0x406223
mov ecx, dword [esp + 0xc]
push ecx
jmp 0x406299
mov eax, dword [esp + 0xc60]
lea edx, [esp + 0x840]
push edx
push 0x40c6bc
push eax
call sub.MFC42.DLL_CString::Format_1
add esp, 0xc
lea ecx, [esp + 0x18]
lea edx, [esp + 0x28]
lea eax, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push eax
push ebx
push str.NEWS
push ecx
call esi
cmp eax, ebx
je 0x406267
mov edx, dword [esp + 0xc]
push edx
jmp 0x406299
mov eax, dword [esp + 0xc64]
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x1c]
mov dword [eax], ecx
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebx
push str.INFO
push edx
call esi
cmp eax, ebx
je 0x4062de
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 8]
mov byte [esp + 0xc48], 1
call fcn.004074ce
mov byte [esp + 0xc48], bl
lea ecx, [esp + 0xc50]
call fcn.004074ce
lea ecx, [esp + 0xc54]
mov dword [esp + 0xc48], 0xffffffff
call fcn.004074ce
xor eax, eax
jmp 0x406336
mov ecx, dword [esp + 0xc68]
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x20]
push eax
mov dword [ecx], edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 8]
mov byte [esp + 0xc48], 1
call fcn.004074ce
lea ecx, [esp + 0xc50]
mov byte [esp + 0xc48], bl
call fcn.004074ce
lea ecx, [esp + 0xc54]
mov dword [esp + 0xc48], 0xffffffff
call fcn.004074ce
mov eax, 1
mov ecx, dword [esp + 0xc40]
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0xc44
ret 0x1c