Function at 0x408770
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.00403a50
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 0x408941
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.00411ba0
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.00411d60
add esp, 0x10
test eax, eax
je 0x4088cf
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 0x4088a5
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.00407110
add esp, 0x44
test eax, eax
jne 0x408941
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 0x408a36
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 0x408a25
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 0x4209a4
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 0x408a25
lea eax, [esp + 0x210]
push 1
push eax
call fcn.00402400
add esp, 8
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebp
call fcn.00408f00
cmp dword [ebp + 4], ebx
jne 0x408a3c
cmp dword [esp + 0x14], ebx
je 0x408a49
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 0x408b7b
lea eax, [esp + 0x8c]
push 0x40
push eax
mov ecx, ebp
call fcn.004082f0
test eax, eax
je 0x408b7b
lea ecx, [esp + 0x8c]
push 1
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.0040b2b0
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 0x408b7b
mov ecx, ebp
call fcn.00408b90
test eax, eax
jne 0x408b0c
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 0x408b7b
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