Function at 0x408b70
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x81c
mov eax, 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]
push ebx
push ebp
mov ebp, dword [esp + 0x828]
push esi
xor ebx, ebx
mov esi, dword [ebp + 4]
push edi
mov dword [esp + 0x10], ebx
mov edi, dword [eax]
cmp esi, ebx
je 0x408bbe
mov al, byte [esi - 1]
test al, al
je 0x408bbe
cmp al, 0xff
je 0x408bbe
push 1
mov ecx, ebp
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_]
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov ecx, ebp
push eax
push esi
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 eax, dword [ebp + 8]
cmp eax, edi
jae 0x408bc7
mov edi, eax
cmp edi, ebx
jbe 0x408bfb
mov ecx, dword [ebp + 4]
sub eax, edi
push eax
lea edx, [ecx + edi*2]
push edx
push ecx
call fcn.004073e0
mov esi, dword [ebp + 8]
add esp, 0xc
sub esi, edi
mov ecx, ebp
push ebx
push esi
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 0x408bfb
mov eax, dword [ebp + 4]
mov dword [ebp + 8], esi
mov word [eax + esi*2], bx
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push ebx
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x2e]
mov word [esp + 0x2c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], 0x400
cmp eax, ebx
je 0x408dc7
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x2c]
push edx
lea edx, [esp + 0x28]
push ecx
push edx
push ebx
push str.TEMP
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408dbc
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
mov ecx, ebp
push 1
push esi
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 0x408ca7
mov eax, dword [ebp + 4]
cmp esi, ebx
lea ecx, [esp + 0x2c]
jbe 0x408c9d
mov edx, esi
mov di, word [ecx]
add ecx, 2
mov word [eax], di
add eax, 2
dec edx
jne 0x408c8e
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], esi
mov word [ecx + esi*2], bx
mov ebx, dword [0x427f70]
push ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x20], edi
jne 0x408ccc
xor esi, esi
jmp 0x408d73
mov eax, dword [ebp + 8]
test eax, eax
jbe 0x408d6b
cmp edi, eax
ja 0x408d6b
mov edx, 1
mov esi, dword [ebp + 4]
sub edx, edi
add eax, edx
mov dword [esp + 0x14], eax
push eax
mov ax, word [ebx]
push eax
push esi
call fcn.00408b50
add esp, 0xc
test eax, eax
je 0x408d6b
test edi, edi
mov edx, ebx
mov ecx, eax
jbe 0x408d62
mov bx, word [ecx]
cmp bx, word [edx]
jne 0x408d1c
add ecx, 2
add edx, 2
dec edi
je 0x408d62
jmp 0x408d09
mov cx, word [ecx]
cmp cx, word [edx]
sbb edx, edx
and edx, 0xfffffffe
inc edx
mov dword [esp + 0x28], edx
je 0x408d62
mov ebx, dword [esp + 0x18]
mov ecx, eax
sub ecx, esi
or edx, 0xffffffff
sar ecx, 1
sub edx, ecx
mov ecx, dword [esp + 0x14]
add ecx, edx
lea esi, [eax + 2]
mov ax, word [ebx]
push ecx
push eax
push esi
mov dword [esp + 0x20], ecx
call fcn.00408b50
add esp, 0xc
test eax, eax
je 0x408d6b
mov edi, dword [esp + 0x20]
jmp 0x408d01
sub eax, dword [ebp + 4]
sar eax, 1
mov esi, eax
jmp 0x408d73
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 esi, dword [ecx]
mov edx, 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]
cmp esi, dword [edx]
je 0x408dbc
lea eax, [esp + 0x2c]
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jbe 0x408dbc
mov ecx, dword [0x427f70]
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push ecx
call ebx
lea edx, [esp + 0x30]
mov edi, eax
push edx
call ebx
add esp, 8
mov ecx, ebp
push eax
lea eax, [esp + 0x30]
push eax
push edi
push esi
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__::replace_unsigned_int__unsigned_int__unsigned_short_int_const___unsigned_int_]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret