Function at 0x40c77c
Capabilities:
Check if file exists
Get common file path
Get program files directory
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x424504]
and word [ebp - 0x228], 0
push ebx
push esi
mov esi, ecx
mov ebx, 0x81
push edi
mov dword [ebp - 4], eax
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x226]
mov dword [ebp - 0xc], 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x104
push eax
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x42b2ec
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths360se_3.exe
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x40c98e
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40c98e
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.004149f1
add esp, 0x14
lea edi, [esi + 8]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push str._d._d._d._d
push edi
call fcn.00403a35
mov edi, dword [edi]
push str.3.3.0.2
push edi
call fcn.00414ab7
add esp, 0x20
test eax, eax
jge 0x40c860
mov dword [ebp - 0x10], 1
jmp 0x40c86c
xor ecx, ecx
test eax, eax
setne cl
inc ecx
inc ecx
mov dword [ebp - 0x10], ecx
and word [ebp - 0x430], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x42e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x228]
push eax
push 0x424548
lea eax, [ebp - 0x430]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
add esp, 0x10
lea eax, [ebp - 0x430]
push eax
call edi
lea eax, [ebp - 0x228]
push eax
call edi
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
lea eax, [ebp - 0x228]
push eax
call edi
cmp word [ebp + eax*2 - 0x22a], 0x5c
pop ecx
jne 0x40c8e9
lea eax, [ebp - 0x228]
push eax
call edi
and word [ebp + eax*2 - 0x22a], 0
pop ecx
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 4]
push 0x424548
push eax
call fcn.00403a35
mov eax, dword [esi + 4]
add esp, 0xc
cmp dword [eax + 4], 6
jle 0x40ca7d
and word [ebp - 0x638], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x636]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
lea eax, [ebp - 0x638]
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.360se3
lea eax, [ebp - 0x638]
push 0x4267e8
push eax
push str._s_s_s
mov edi, 0x42ac20
push 0x103
push edi
call dword [sym.imp.MSVCRT.dll__snwprintf]
lea eax, [ebp - 0x430]
push edi
push eax
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 0x20
test eax, eax
jne 0x40ca7d
mov dword [0x42ae28], 1
mov eax, dword [esi + 4]
push str.360se_bin
jmp 0x40ca69
mov eax, dword [esi + 4]
and dword [ebp - 0x10], 0
cmp dword [eax + 4], 6
jg 0x40ca64
and word [ebp - 0x430], 0
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x42e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 1
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0xc]
push eax
push str.Path
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths360safe.exe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 8], 0x104
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x40ca18
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
test eax, eax
pop ecx
jbe 0x40ca18
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x430]
push str.360se3
push eax
jmp 0x40ca6c
xor edx, edx
mov ecx, ebx
xor eax, eax
lea edi, [ebp - 0x636]
mov word [ebp - 0x638], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x638]
push 0x26
push eax
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.360se3
lea eax, [ebp - 0x638]
push 0x4267e8
push eax
lea eax, [ebp - 4]
push str._s_s_s
push eax
call fcn.00403a35
add esp, 0x14
jmp 0x40ca7d
push str.360se_bin
push dword [eax + 0x18]
lea eax, [ebp - 4]
push 0x424924
push eax
call fcn.00403a35
add esp, 0x10
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 8], ecx
push dword [ebp - 4]
mov ecx, dword [esi + 4]
call fcn.004113a8
mov eax, dword [esi + 4]
mov edi, str.360se
push edi
lea ebx, [esi + 0x10]
push dword [eax + 0x18]
push 0x424924
push ebx
call fcn.00403a35
push dword [ebx]
call fcn.00414c27
mov eax, dword [esi + 4]
add esp, 0x14
lea ebx, [esi + 0xc]
push 0x426740
push edi
push dword [eax + 0x18]
push str._s_s_s
push ebx
call fcn.00403a35
add esp, 0x14
mov ecx, esi
push dword [ebx]
call fcn.0040c730
lea ecx, [ebp - 4]
call fcn.00403e0f
pop edi
pop esi
pop ebx
leave
ret