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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa34
mov eax, dword [0x5b9460]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - 0x414], ax
xor ebx, ebx
lea eax, [ebp - 0x412]
push ebx
push eax
mov esi, ecx
call fcn.00531ed0
xor eax, eax
push edi
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
call fcn.00531ed0
xor eax, eax
push edi
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push ebx
push eax
call fcn.00531ed0
lea eax, [esi + 0x9c]
add esp, 0x24
cmp dword [eax + 0x14], 8
jb 0x4027ba
mov eax, dword [eax]
push str.SmartCloudInfo.ini
push eax
lea eax, [ebp - 0x61c]
push str._s_s
push eax
call fcn.00532980
add esp, 0x10
lea eax, [ebp - 0x61c]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x55fd6c
push str.CfgUserPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x402840
cmp word [ebp - 0x20c], bx
je 0x402827
lea eax, [ebp - 0x20c]
push eax
call fcn.005325f3
pop ecx
mov ebx, eax
push ebx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x24]
call fcn.00403288
mov byte [esi + 0x21], 1
jmp 0x402a1f
push ebx
push 0x2b
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x414]
push 0x55fd68
push eax
call fcn.005325a4
lea eax, [ebp - 0x414]
push str.SmartCloudWBInput
push eax
call fcn.005325a4
lea eax, [ebp - 0x414]
push 0x55fd68
push eax
call fcn.005325a4
lea eax, [ebp - 0x414]
push str.SmartCloudWB
push eax
call fcn.005325a4
lea eax, [ebp - 0x414]
push str..ini
push eax
call fcn.005325a4
add esp, 0x28
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x55fd6c
push str.CfgUserPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x40280f
push 0x206
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push ebx
push eax
call fcn.00531ed0
lea eax, [ebp - 0x824]
push str.SOFTWARE_
push eax
call fcn.005325d3
lea eax, [ebp - 0x824]
push str.SmartCloudWBInput
push eax
call fcn.005325a4
add esp, 0x1c
lea eax, [ebp - 0xa30]
push eax
push 0xf003f
push ebx
lea eax, [ebp - 0x824]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402990
lea eax, [ebp - 0xa34]
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push ebx
push str.CfgUserPath
push dword [ebp - 0xa30]
mov dword [ebp - 0xa34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x402990
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x402990
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40280f
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0xa2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0xa2c]
push 0x5c
push eax
call fcn.0053260c
xor ecx, ecx
mov word [eax + 2], cx
push str.SmartCloudInfo.ini
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x61c]
push str._s_s
push eax
call fcn.00532980
add esp, 0x18
lea eax, [ebp - 0x61c]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x55fd6c
push str.CfgUserPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x40280f
mov byte [esi + 0x21], bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00532a3d
leave
ret