Function at 0x4120d7
Capabilities:
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 [0x42e50c]
and word [ebp - 0x228], 0
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 4], eax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x226]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ebx, 0x103
lea eax, [ebp - 0x228]
push ebx
push eax
mov ecx, esi
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], 0x104
call fcn.00412013
test eax, eax
je 0x41237e
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.0041cecf
add esp, 0x14
lea edi, [esi + 8]
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push dword [ebp - 0xc]
push str._d._d._d._d
push edi
call fcn.0040959f
mov edi, dword [edi]
push str.4.0.3.6
push edi
call fcn.0041cf95
add esp, 0x20
test eax, eax
jge 0x412194
mov dword [ebp - 8], 1
jmp 0x4121a0
xor ecx, ecx
test eax, eax
setne cl
inc ecx
inc ecx
mov dword [ebp - 8], ecx
and word [ebp - 0x430], 0
mov ecx, 0x81
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 0x42eb18
lea eax, [ebp - 0x430]
push ebx
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 0x41221c
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 0x42eb18
push eax
call fcn.0040959f
mov eax, dword [esi + 4]
add esp, 0xc
cmp dword [eax + 4], 6
jle 0x4122cb
and word [ebp - 0x638], 0
mov ecx, 0x81
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 0x4313c0
push eax
push str._s_s_s
mov edi, 0x436e84
push ebx
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 0x4122cb
mov dword [0x43708c], 1
mov eax, dword [esi + 4]
push str.360se_bin
push dword [eax + 0x18]
lea eax, [ebp - 4]
push 0x42f9cc
push eax
call fcn.0040959f
add esp, 0x10
mov ebx, dword [ebp - 8]
mov ecx, esi
call fcn.00417b01
mov eax, dword [esi + 4]
mov dword [eax + 8], ebx
push dword [ebp - 4]
mov ecx, dword [esi + 4]
mov dword [esi + 0x80], ebx
call fcn.0041957a
mov eax, dword [esi + 4]
mov edi, str.360se
push edi
lea ebx, [esi + 0x14]
push dword [eax + 0x18]
push 0x42f9cc
push ebx
call fcn.0040959f
push dword [ebx]
call fcn.0041d105
mov eax, dword [esi + 4]
add esp, 0x14
lea ebx, [esi + 0x10]
push 0x431398
push edi
push dword [eax + 0x18]
push str._s_s_s
push ebx
call fcn.0040959f
mov eax, dword [esi + 4]
add esp, 0x14
push str.360se_s.ini
push edi
push dword [eax + 0x18]
lea eax, [esi + 0xc]
push str._s_s_s
push eax
call fcn.0040959f
add esp, 0x14
mov ecx, esi
push dword [ebx]
call fcn.00411fc7
push dword [ebx]
push 1
push str.NotJoinPrivate
push str.option
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, esi
mov dword [esi + 0x34], eax
call fcn.00417b95
lea ecx, [ebp - 4]
call fcn.00404c0d
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [esi + 4]
xor ebx, ebx
cmp dword [eax + 4], 6
jg 0x412455
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x42e]
mov word [ebp - 0x430], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], 1
push eax
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x14]
push eax
push str.Path
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths360safe.exe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x412408
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
test eax, eax
pop ecx
jbe 0x412408
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x430]
push str.360se3
push eax
jmp 0x41245d
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x636]
mov word [ebp - 0x638], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
lea eax, [ebp - 0x638]
push 0x26
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.360se3
lea eax, [ebp - 0x638]
push 0x4313c0
push eax
lea eax, [ebp - 4]
push str._s_s_s
push eax
call fcn.0040959f
add esp, 0x14
jmp 0x41246e
push str.360se_bin
push dword [eax + 0x18]
lea eax, [ebp - 4]
push 0x42f9cc
push eax
call fcn.0040959f
add esp, 0x10
mov edi, 0x436c7c
mov eax, edi
test eax, eax
je 0x4122ce
cmp word [0x436c7c], bx
je 0x4122ce
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
cmp word [eax*2 + 0x436c7a], 0x5c
pop ecx
jne 0x4124ae
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
and word [eax*2 + 0x436c7a], 0
pop ecx
push edi
lea eax, [ebp - 4]
push 0x42eb18
push eax
call fcn.0040959f
add esp, 0xc
jmp 0x4122ce