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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x425504]
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 0x42c4b4
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths360se_3.exe
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x40ce37
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ce37
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.004157ff
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.00403a7b
mov edi, dword [edi]
push str.3.7.1.2
push edi
call fcn.004158c5
add esp, 0x20
test eax, eax
jge 0x40ccf5
mov dword [ebp - 0x10], 1
jmp 0x40cd01
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 0x425548
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 0x40cd7e
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 0x425548
push eax
call fcn.00403a7b
mov eax, dword [esi + 4]
add esp, 0xc
cmp dword [eax + 4], 6
jle 0x40cf6f
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 0x427840
push eax
push str._s_s_s
mov edi, 0x42bde0
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 0x40cf6f
mov dword [0x42bfe8], 1
mov eax, dword [esi + 4]
push str.360se_bin
push dword [eax + 0x18]
lea eax, [ebp - 4]
push 0x425944
push eax
call fcn.00403a7b
add esp, 0x10
jmp 0x40cf6f
mov eax, dword [esi + 4]
and dword [ebp - 0x10], 0
cmp dword [eax + 4], 6
jg 0x40cf0d
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 0x40cec1
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
test eax, eax
pop ecx
jbe 0x40cec1
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x430]
push str.360se3
push eax
jmp 0x40cf15
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 0x427840
push eax
lea eax, [ebp - 4]
push str._s_s_s
push eax
call fcn.00403a7b
add esp, 0x14
jmp 0x40cf26
push str.360se_bin
push dword [eax + 0x18]
lea eax, [ebp - 4]
push 0x425944
push eax
call fcn.00403a7b
add esp, 0x10
mov edi, 0x42bbd8
mov eax, edi
test eax, eax
je 0x40cf6f
cmp word [0x42bbd8], 0
je 0x40cf6f
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push edi
call ebx
cmp word [eax*2 + 0x42bbd6], 0x5c
pop ecx
jne 0x40cf5d
push edi
call ebx
and word [eax*2 + 0x42bbd6], 0
pop ecx
push edi
lea eax, [ebp - 4]
push 0x425548
push eax
call fcn.00403a7b
add esp, 0xc
mov ecx, esi
call fcn.00411aa6
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.00412199
mov eax, dword [esi + 4]
mov ebx, str.360se
push ebx
lea edi, [esi + 0x10]
push dword [eax + 0x18]
push 0x425944
push edi
call fcn.00403a7b
push dword [edi]
call fcn.00415a35
mov eax, dword [esi + 4]
add esp, 0x14
lea edi, [esi + 0xc]
push 0x427798
push ebx
push dword [eax + 0x18]
push str._s_s_s
push edi
call fcn.00403a7b
add esp, 0x14
mov ecx, esi
push dword [edi]
call fcn.0040cbc5
push dword [edi]
push 1
push str.NotJoinPrivate
push str.option
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, esi
mov dword [esi + 0x30], eax
call fcn.00411b3a
lea ecx, [ebp - 4]
call fcn.00403e55
pop edi
pop esi
pop ebx
leave
ret