Function at 0x40119c
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x41155f
call fcn.004111a0
sub esp, 0x40
mov al, byte [ebp + 0xb]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
lea ecx, [ebp - 0x4c]
push ebx
mov byte [ebp - 0xd], bl
mov byte [ebp - 0x4c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
cmp dword [ebp + 8], ebx
mov dword [ebp - 4], ebx
je 0x4011e0
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea ecx, [ebp - 0x4c]
push dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 0x3c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
cmp dword [ebp + 0xc], ebx
mov byte [ebp - 4], 1
je 0x40120f
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea ecx, [ebp - 0x3c]
push dword [ebp + 0xc]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov al, byte [esi]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [ebp - 0x2c]
push dword [eax]
push ebx
push esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
push dword [eax]
lea eax, [ebp - 0x4c]
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x401255
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [ebp - 0x1c]
push ecx
push eax
push dword [esi + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x40126f
mov byte [ebp + 0xb], bl
jmp 0x4012fa
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x18], ebx
cmp eax, ebx
mov dword [ebp - 0x14], 0x406
jne 0x401285
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov esi, dword [ebp + 0x10]
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x18]
push esi
push ecx
push ebx
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4012eb
mov eax, dword [ebp - 0x18]
push 2
pop ecx
cmp eax, ecx
je 0x4012db
push 1
pop edx
cmp eax, edx
je 0x4012db
cmp eax, 4
jne 0x4012c1
mov byte [ebp - 0xd], dl
mov dword [esi + 0x40c], edx
jmp 0x4012eb
cmp eax, 3
jne 0x4012eb
mov eax, dword [ebp - 0x14]
mov byte [ebp - 0xd], 1
mov dword [esi + 0x408], eax
mov dword [esi + 0x40c], ecx
jmp 0x4012eb
mov eax, dword [ebp - 0x14]
mov byte [ebp - 0xd], 1
mov byte [eax + esi], bl
mov dword [esi + 0x40c], ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 0xd]
mov byte [ebp + 0xb], al
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x4c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp + 0xb]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc