Function at 0x405470
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40645a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x1080
call fcn.00405910
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x104c], 0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 4], 0
je 0x405619
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp - 0x10]
call fcn.00405360
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4054ef
lea edx, [ebp - 0x103c]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov ecx, dword [ebp - 0x104c]
or ecx, 1
mov dword [ebp - 0x104c], ecx
mov eax, dword [ebp + 8]
jmp 0x40567a
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x1040]
push edx
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::allocator_char__const__]
mov dword [ebp - 4], 0
lea eax, [ebp - 0x30]
push eax
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x40559d
mov ecx, dword [ebp - 0x30]
add ecx, 0xa
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40559d
mov edx, dword [ebp - 0x30]
push edx
push 0
mov eax, dword [ebp - 0x18]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x18]
push edx
lea eax, [ebp - 0x2c]
push eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x30]
mov byte [eax], 0
mov ecx, dword [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x28]
call dword [0x4070d8]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x34], 0
jne 0x4055e1
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov edx, dword [ebp - 0x104c]
or edx, 1
mov dword [ebp - 0x104c], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp + 8]
jmp 0x40567a
lea eax, [ebp - 0x1044]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov edx, dword [ebp - 0x104c]
or edx, 1
mov dword [ebp - 0x104c], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp + 8]
jmp 0x40567a
cmp dword [ebp + 0x14], 0
jne 0x405626
mov dword [ebp + 0x14], 0x407540
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
push ecx
push 0x1000
lea edx, [ebp - 0x1034]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x1038], eax
lea eax, [ebp - 0x1048]
push eax
lea ecx, [ebp - 0x1034]
push ecx
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov edx, dword [ebp - 0x104c]
or edx, 1
mov dword [ebp - 0x104c], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10