Function at 0x407b10
Capabilities:
Check if file exists
Delete registry value
Print debug messages
Read .ini file

Disassembly:
sub esp, 0x818
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00403a40
xor ebx, ebx
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], bl
mov byte [esp + 0x8c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x8d]
mov byte [esp + 0x418], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x103
xor eax, eax
lea edi, [esp + 0x419]
mov byte [esp + 0x314], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x315]
lea esi, [ebp + 0x14]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push esi
push str._m_szLocalProfile:_s_.
lea eax, [esp + 0x31c]
push 0x104
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x10
lea ecx, [esp + 0x314]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x407ce1
mov ecx, 0xf
lea edi, [esp + 0xcd]
mov byte [esp + 0xcc], bl
lea edx, [esp + 0xcc]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x40
push edx
stosb byte es:[edi], al
call fcn.00411c40
xor eax, eax
mov ecx, 8
mov dword [esp + 0x21], eax
lea edi, [esp + 0x31]
mov dword [esp + 0x25], eax
mov byte [esp + 0x30], bl
mov dword [esp + 0x29], eax
mov byte [esp + 0x20], bl
mov word [esp + 0x2d], ax
lea edx, [esp + 0x20]
rep stosd dword es:[edi], eax
xor ecx, ecx
push 0x10
mov dword [esp + 0x24], ecx
mov byte [esp + 0x33], al
mov dword [esp + 0x28], ecx
push edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
call fcn.00411e00
add esp, 0x10
test eax, eax
je 0x407c6f
lea eax, [esp + 0x28]
xor edi, edi
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [esp + edi + 0x18]
push ecx
push str._02x
push edx
call sub.MSVCRT.dll_sprintf
mov ecx, dword [esp + 0x1c]
add esp, 0xc
inc edi
add ecx, 2
cmp edi, 0x10
mov dword [esp + 0x10], ecx
jl 0x407c45
push ebx
call sub.MSVCRT.dll_time
push eax
lea eax, [esp + 0xd4]
lea ecx, [esp + 0x30]
push eax
push ecx
push str.http:__t.sogou.com_update_platform_update.php_appnamesogoudownloaduncx400443_18guid_sv_st_d
lea edx, [esp + 0x42c]
push 0x40f
push edx
call sub.MSVCRT.dll__snprintf
push str.Profile.ini
lea eax, [ebp + 0x118]
push str.SogouDownLoad
push eax
push str._s_s_s
push 0x103
push esi
call sub.MSVCRT.dll__snprintf
lea ecx, [ebp + 8]
lea edx, [esp + 0x44c]
push ecx
push 0xa
push esi
push edx
call fcn.004071b0
add esp, 0x44
test eax, eax
jne 0x407ce1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x818
ret
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp + 0x21c], eax
mov eax, dword [ebp + 0x220]
cmp eax, ebx
je 0x407dd6
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x211]
mov byte [esp + 0x210], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x210]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x407dc5
lea ecx, [esp + 0x210]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10d]
mov byte [esp + 0x10c], bl
rep stosd dword es:[edi], eax
push 0x4209a8
push str.UpdateService
stosw word es:[edi], ax
push 0x420694
lea edx, [esp + 0x118]
push 0x104
push edx
stosb byte es:[edi], al
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x14
lea eax, [esp + 0x10c]
lea ecx, [esp + 0x210]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [esp + 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x407dc5
lea eax, [esp + 0x210]
push 1
push eax
call fcn.004023f0
add esp, 8
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebp
call fcn.004082a0
cmp dword [ebp + 4], ebx
jne 0x407ddc
cmp dword [esp + 0x14], ebx
je 0x407de9
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x818
ret
push esi
lea edx, [esp + 0x50]
push 0x40
push edx
push ebx
push str.version
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x407f1b
lea eax, [esp + 0x8c]
push 0x40
push eax
mov ecx, ebp
call fcn.00407690
test eax, eax
je 0x407f1b
lea ecx, [esp + 0x8c]
push 1
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.0040a650
mov esi, eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x118], bl
push str.SogouDownLoad
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x9c]
lea ecx, [esp + 0x5c]
push eax
push ecx
push str.__s_Update_Service_new_version:__s__local_version:__s.
lea edx, [esp + 0x128]
push 0x104
push edx
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x24
lea eax, [esp + 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp esi, ebx
jle 0x407f1b
mov ecx, ebp
call fcn.00407f30
test eax, eax
jne 0x407eac
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x818
ret
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10d]
mov byte [esp + 0x10c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.SogouDownLoad
push str.__s_Update_Service_update_success.
lea ecx, [esp + 0x114]
push 0x104
push ecx
stosb byte es:[edi], al
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x10
lea edx, [esp + 0x10c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.UpdateServiceLog
push str.SOFTWARESogouComponentsDOWNLOAD
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueA]
cmp dword [ebp + 4], ebx
je 0x407f1b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x818
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x818
ret