Function at 0x4049b0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x24
push ebx
push edi
mov edi, ecx
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [0x408370]
mov ecx, dword [edi + 0xc4]
lea ebx, [edi + 0xc4]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x404c4e
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
cmp byte [eax + ecx - 1], 0x5c
jne 0x404a0f
dec ecx
lea eax, [esp + 0x1c]
push ecx
push eax
mov ecx, ebx
call sub.MFC42.DLL_CString::Left
push eax
mov ecx, ebx
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
mov eax, dword [edi + 0xcc]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x408478
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x404a50
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
pop edi
xor eax, eax
pop ebx
add esp, 0x24
ret
push ebp
push esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 2
call sub.MFC42.DLL_CString::CString_1
push 0x100
lea ecx, [esp + 0x18]
mov dword [esp + 0x24], 0x100
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [edi + 0xc8]
lea edx, [esp + 0x20]
push edx
push eax
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x34]
push eax
push 0
push ecx
mov ecx, dword [esp + 0x30]
push ecx
call ebp
mov esi, eax
cmp esi, 0xea
jne 0x404ada
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [edi + 0xc8]
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x34]
push eax
push 0
push ecx
mov ecx, dword [esp + 0x30]
push ecx
call ebp
mov esi, eax
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
test esi, esi
jne 0x404bf7
lea edx, [esp + 0x14]
lea ecx, [esp + 0x10]
push edx
call fcn.004059c2
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::MakeUpper
push 0x3b
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find
mov esi, eax
cmp esi, 0xffffffff
je 0x404b7c
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
mov eax, dword [ebx]
mov ecx, dword [esp + 0x24]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x404bd5
inc esi
lea edx, [esp + 0x30]
push esi
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Mid
push eax
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
push 0x3b
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find
mov esi, eax
cmp esi, 0xffffffff
jne 0x404b16
mov eax, dword [ebx]
push eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x404bde
lea ecx, [esp + 0x14]
lea edx, [esp + 0x24]
push ecx
push 0x3b
push ebx
push edx
call sub.MFC42.DLL_operator_3
push eax
lea eax, [esp + 0x38]
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
jmp 0x404c01
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
jmp 0x404c01
push ebx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x18]
mov edi, dword [edi + 0xc8]
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax - 8]
inc ecx
push ecx
push eax
push 1
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
pop ebp
je 0x404c4e
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
pop edi
xor eax, eax
pop ebx
add esp, 0x24
ret
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
pop edi
mov eax, 1
pop ebx
add esp, 0x24
ret