Function at 0x404630
Capabilities:
Get common file path
Get program files directory
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x1228]
mov eax, 0x1228
call fcn.0041d6e0
push 0xffffffffffffffff
push 0x421db9
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x435700]
xor eax, ebp
mov dword [ebp + 0x1224], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1230]
xor ebx, ebx
xor edi, edi
push 0x428ef0
lea ecx, [ebp]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x18], edi
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea ecx, [ebp - 0x14]
push ecx
push str.SOFTWARESweetIMToolbarsInternet_Explorer
mov byte [ebp - 4], 1
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
cmp eax, ebx
jne 0x40478f
mov esi, dword [ebp - 0x14]
cmp esi, ebx
je 0x40478f
push 0x1000
lea edx, [ebp + 0x1c]
push ebx
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp + 0x1c]
push ecx
lea edx, [ebp - 0x24]
push edx
push ebx
push str.InstallDir
push esi
mov dword [ebp - 0x20], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x40477b
lea eax, [ebp + 0x1c]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404700
sub eax, edx
lea edi, [ebp + 0x1c]
sar eax, 1
add edi, 0xfffffffe
cmp word [ebp + eax*2 + 0x1a], 0x5c
jne 0x404740
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x404720
mov ecx, 8
mov esi, 0x429700
rep movsd dword es:[edi], dword [esi]
jmp 0x40475a
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x404740
mov ecx, 8
mov esi, str.mgToolbarIE.dll
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebp + 0x1c]
push eax
call sub.mgcommon.dll__IsFileExist_4
cmp eax, ebx
je 0x40477b
lea ecx, [ebp + 0x1c]
push ecx
lea ecx, [ebp]
call dword [0x4230d4]
mov dword [ebp - 0x18], 1
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x14], ebx
cmp edi, ebx
jne 0x4047fb
lea eax, [ebp + 0x101c]
push eax
push ebx
push ebx
push 0x26
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x4047b9
push str.SweetIMToolbarsInternet_ExplorermgToolbarIE.dll
lea ecx, [ebp + 0x101c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x4047d5
mov ecx, str.C:Program_FilesSweetIMToolbarsInternet_ExplorermgToolbarIE.dll
lea edx, [ebp + 0x101c]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x4047c4
lea edx, [ebp + 0x101c]
push edx
call sub.mgcommon.dll__IsFileExist_4
cmp eax, ebx
je 0x4047f7
lea eax, [ebp + 0x101c]
push eax
lea ecx, [ebp]
call dword [0x4230d4]
jmp 0x4047fb
cmp edi, ebx
je 0x404820
cmp dword [ebp + 0x18], 8
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp + 4]
mov dword [ecx + 0x33c], 1
jae 0x404814
lea eax, [ebp + 4]
add ecx, 0x320
push eax
call fcn.004051d0
lea ecx, [ebp]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1224]
xor ecx, ebp
call fcn.0041d649
add ebp, 0x1228
mov esp, ebp
pop ebp
ret 4