Function at 0x405620
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, 0x201c
call fcn.00406960
mov eax, dword [ecx + 4]
push ebx
push esi
push edi
test eax, eax
je 0x40580c
mov eax, dword [esp + 0x2030]
push eax
call fcn.00405530
mov edi, eax
test edi, edi
jne 0x4056ac
mov esi, dword [esp + 0x202c]
mov cl, byte [esp + 0xf]
push eax
mov byte [esi], cl
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ebx, dword [esp + 0x2038]
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov edi, eax
mov ecx, esi
push 1
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x405895
mov edx, dword [esi + 4]
push edi
push ebx
push edx
call fcn.00404010
add esp, 0xc
mov ecx, esi
push edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x201c
ret 0x10
mov al, byte [esp + 0xf]
push ebp
push 0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ebp, dword [esp + 0x2038]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x28]
push ecx
push 0
push edx
push 0
push ebp
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x405739
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
shr eax, 1
cmp eax, ecx
ja 0x40570a
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov edx, dword [ecx]
lea ecx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::erase_unsigned_int__unsigned_int_]
jmp 0x405719
sub eax, ecx
push 0
push eax
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::append_unsigned_int__unsigned_short_int_]
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x405726
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
push 0
push ebp
push edi
call ebx
mov esi, eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
pop ebp
cmp esi, ebx
mov esi, dword [esp + 0x202c]
jne 0x4057b8
mov al, byte [esp + 0x14]
push ebx
mov ecx, esi
mov byte [esi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
lea eax, [esp + 0x14]
mov edx, dword [ecx]
mov ecx, esi
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x405895
mov al, byte [ecx - 1]
test al, al
je 0x40579e
cmp al, 0xff
je 0x40579e
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
add esp, 0x201c
ret 0x10
add ecx, 0xfffffffe
push ecx
call fcn.00406806
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x201c
ret 0x10
mov edi, dword [esp + 0x2038]
mov cl, byte [esp + 0xf]
push edi
mov byte [esi], cl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov ecx, esi
push eax
push edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x405895
mov al, byte [ecx - 1]
test al, al
je 0x40579e
cmp al, 0xff
je 0x40579e
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
add esp, 0x201c
ret 0x10
mov eax, dword [esp + 0x2038]
test eax, eax
jne 0x40581c
mov eax, 0x40a9e4
mov edx, dword [ecx + 8]
lea ecx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x2038]
push 0x1000
push ecx
push eax
mov eax, dword [esp + 0x2040]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov esi, dword [esp + 0x202c]
mov cl, byte [esp + 0xf]
push 0
mov byte [esi], cl
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov edi, eax
mov ecx, esi
push 1
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x405895
mov ecx, dword [esi + 4]
lea eax, [esp + 0x28]
push edi
push eax
push ecx
call fcn.00404010
mov edx, dword [esi + 4]
mov dword [esi + 8], edi
add esp, 0xc
mov word [edx + edi*2], 0
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x201c
ret 0x10