Function at 0x402459
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 0x4024ce
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.CfgRootPath
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 0x402554
cmp word [ebp - 0x20c], bx
je 0x40253b
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 + 0x3c]
call fcn.00403288
mov byte [esi + 0x20], 1
jmp 0x402736
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.CfgRootPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x402523
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 0x4026a4
lea eax, [ebp - 0xa34]
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push ebx
push str.CfgRootPath
push dword [ebp - 0xa30]
mov dword [ebp - 0xa34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4026a4
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x4026a4
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402523
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0xa2c]
push eax
push ebx
mov byte [esi + 0x20], bl
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.CfgRootPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x402523
mov byte [esi + 0x20], bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00532a3d
leave
ret