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

Disassembly:
mov eax, 0x1050
call fcn.004307e0
mov eax, dword [0x5685f0]
xor eax, esp
mov dword [esp + 0x104c], eax
mov eax, dword [esp + 0x1054]
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x206
lea ecx, [esp + 0x63a]
push ebp
push ecx
mov dword [esp + 0x1c], eax
mov word [esp + 0x640], bp
call fcn.0042faa0
push 0x206
lea edx, [esp + 0xc5e]
push ebp
push edx
mov word [esp + 0xc64], bp
call fcn.0042faa0
push 0x206
lea eax, [esp + 0x85a]
push ebp
push eax
mov word [esp + 0x860], bp
call fcn.0042faa0
push 0x206
lea ecx, [esp + 0xa6e]
push ebp
push ecx
mov word [esp + 0xa74], bp
call fcn.0042faa0
push 0x206
lea edx, [esp + 0x25a]
push ebp
push edx
mov word [esp + 0x260], bp
call fcn.0042faa0
push 0x206
lea eax, [esp + 0x5e]
push ebp
push eax
mov word [esp + 0x64], bp
call fcn.0042faa0
add esp, 0x48
push ebp
push 0x2b
lea ecx, [esp + 0x63c]
push ecx
push ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x634]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406324
mov edx, dword [0x55c4b4]
mov dword [edi], edx
lea edi, [esp + 0x634]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406342
mov ecx, 8
mov esi, 0x55c4b8
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x634]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406364
lea eax, [esp + 0x634]
mov dword [edi], edx
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x406380
mov edx, dword [str.SmartCloud]
mov ecx, dword [0x55c1bc]
mov dword [eax], edx
mov edx, dword [fcn.00430074]
mov dword [eax + 4], ecx
mov ecx, dword [0x55c1c4]
mov dword [eax + 8], edx
mov edx, dword [0x55c1c8]
mov dword [eax + 0xc], ecx
mov cx, word [0x55c1cc]
mov dword [eax + 0x10], edx
mov word [eax + 0x14], cx
lea eax, [esp + 0x634]
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x4063d0
mov edx, dword [str..ini]
mov ecx, dword [0x55c4dc]
mov dword [eax], edx
mov dx, word [0x55c4e0]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x634]
push eax
push 0x104
lea ecx, [esp + 0xc54]
push ecx
push 0x55c3b8
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
jmp 0x406430
movzx ecx, word [esp + eax + 0xc4c]
mov word [esp + eax + 0x224], cx
add eax, 2
cmp cx, bp
jne 0x406430
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x224]
mov word [esp + eax + 0x1c], cx
add eax, 2
cmp cx, bp
jne 0x406450
lea eax, [esp + 0x1c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x406470
mov edx, dword [str.1.1.0.0511]
mov ecx, dword [0x55c5f8]
mov dword [eax], edx
mov edx, dword [0x55c5fc]
mov dword [eax + 4], ecx
mov ecx, dword [0x55c600]
mov dword [eax + 8], edx
mov edx, dword [0x55c604]
mov dword [eax + 0xc], ecx
mov cx, word [0x55c608]
lea edi, [esp + 0x1c]
mov dword [eax + 0x10], edx
mov word [eax + 0x14], cx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x4064c0
mov edx, dword [0x55c4b4]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [esp + 0x1c]
push eax
mov dword [edi], edx
call ebx
test eax, eax
je 0x4065aa
push 0x206
lea ecx, [esp + 0x432]
push ebp
push ecx
mov word [esp + 0x438], bp
call fcn.0042faa0
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x1c]
mov word [esp + eax + 0x42c], cx
add eax, 2
cmp cx, bp
jne 0x406510
lea edi, [esp + 0x42c]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406530
mov ecx, 6
mov esi, str.SCConfig.exe
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x42c]
push edx
movsw word es:[edi], word [esi]
call ebx
test eax, eax
je 0x4065aa
lea eax, [esp + 0x224]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406562
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x228]
push eax
lea esi, [edi + 0x94]
call fcn.00401250
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406590
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x20]
push ecx
jmp 0x406cd5
push 0x206
lea edx, [esp + 0xe5a]
push ebp
push edx
mov word [esp + 0xe60], bp
call fcn.0042faa0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [eax + str.SOFTWARE_]
mov word [esp + eax + 0xe54], cx
add eax, 2
cmp cx, bp
jne 0x4065d0
lea edi, [esp + 0xe54]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x4065f1
lea eax, [esp + 0x14]
push eax
push 0x20019
mov ecx, 8
mov esi, 0x55c4b8
rep movsd dword es:[edi], dword [esi]
push ebp
lea ecx, [esp + 0xe60]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4067c4
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0xa48]
push eax
push ebp
push ebp
push str.InstallPath
push ecx
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4067c4
mov edi, edi
movzx ecx, word [esp + eax + 0xa44]
mov word [esp + eax + 0x224], cx
add eax, 2
cmp cx, bp
jne 0x406660
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x224]
mov word [esp + eax + 0x1c], cx
add eax, 2
cmp cx, bp
jne 0x406680
lea eax, [esp + 0x1c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x4066a0
mov edx, dword [str.1.1.0.0511]
mov ecx, dword [0x55c5f8]
mov dword [eax], edx
mov edx, dword [0x55c5fc]
mov dword [eax + 4], ecx
mov ecx, dword [0x55c600]
mov dword [eax + 8], edx
mov edx, dword [0x55c604]
mov dword [eax + 0xc], ecx
mov cx, word [0x55c608]
lea edi, [esp + 0x1c]
mov dword [eax + 0x10], edx
mov word [eax + 0x14], cx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x4066f0
mov edx, dword [0x55c4b4]
lea eax, [esp + 0x1c]
push eax
mov dword [edi], edx
call ebx
test eax, eax
je 0x4067c4
push 0x206
lea ecx, [esp + 0x432]
push ebp
push ecx
mov word [esp + 0x438], bp
call fcn.0042faa0
add esp, 0xc
xor eax, eax
jmp 0x406740
movzx ecx, word [esp + eax + 0x1c]
mov word [esp + eax + 0x42c], cx
add eax, 2
cmp cx, bp
jne 0x406740
lea edi, [esp + 0x42c]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406760
mov ecx, 6
mov esi, str.SCConfig.exe
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x42c]
push edx
movsw word es:[edi], word [esi]
call ebx
test eax, eax
je 0x4067c4
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [esp + 0x10]
lea ecx, [ebx + 0x94]
push ecx
lea edx, [esp + 0x228]
call fcn.00401220
lea edx, [ebx + 0xb0]
push edx
lea edx, [esp + 0x20]
call fcn.00401220
call fcn.00407220
jmp 0x406ce0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
push 0x26
lea ecx, [esp + 0x844]
push ecx
push ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x83c]
add edi, 0xfffffffe
jmp 0x4067f0
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x4067f0
mov edx, dword [0x55c4b4]
mov dword [edi], edx
lea edi, [esp + 0x83c]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406810
mov ecx, 8
mov esi, 0x55c4b8
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x83c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406832
mov dword [edi], edx
xor eax, eax
jmp 0x406850
movzx ecx, word [esp + eax + 0x83c]
mov word [esp + eax + 0x224], cx
add eax, 2
cmp cx, bp
jne 0x406850
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x224]
mov word [esp + eax + 0x1c], cx
add eax, 2
cmp cx, bp
jne 0x406870
lea eax, [esp + 0x1c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x406890
mov ecx, dword [str.1.1.0.0511]
mov dword [eax], ecx
mov ecx, dword [0x55c5f8]
mov dword [eax + 4], ecx
mov ecx, dword [0x55c5fc]
mov dword [eax + 8], ecx
mov ecx, dword [0x55c600]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x55c604]
mov dword [eax + 0x10], ecx
mov cx, word [0x55c608]
lea edi, [esp + 0x1c]
mov word [eax + 0x14], cx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x4068e0
mov dword [edi], edx
lea edx, [esp + 0x1c]
push edx
call ebx
test eax, eax
je 0x4069ba
push 0x206
lea eax, [esp + 0x432]
push ebp
push eax
mov word [esp + 0x438], bp
call fcn.0042faa0
add esp, 0xc
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [esp + eax + 0x1c]
mov word [esp + eax + 0x42c], cx
add eax, 2
cmp cx, bp
jne 0x406920
lea edi, [esp + 0x42c]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406940
mov ecx, 6
mov esi, str.SCConfig.exe
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x42c]
push ecx
movsw word es:[edi], word [esi]
call ebx
test eax, eax
je 0x4069ba
lea eax, [esp + 0x224]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406972
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x228]
push edx
lea esi, [edi + 0x94]
call fcn.00401250
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4069a0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x20]
push eax
jmp 0x406cd5
lea ecx, [esp + 0xc4c]
push ecx
call ebx
test eax, eax
je 0x406aca
xor eax, eax
mov edi, edi
movzx ecx, word [esp + eax + 0xc4c]
mov word [esp + eax + 0x224], cx
add eax, 2
cmp cx, bp
jne 0x4069d0
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x224]
mov word [esp + eax + 0x1c], cx
add eax, 2
cmp cx, bp
jne 0x4069f0
lea eax, [esp + 0x1c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x406a10
mov edx, dword [str.1.1.0.0511]
mov ecx, dword [0x55c5f8]
mov dword [eax], edx
mov edx, dword [0x55c5fc]
mov dword [eax + 4], ecx
mov ecx, dword [0x55c600]
mov dword [eax + 8], edx
mov edx, dword [0x55c604]
mov dword [eax + 0xc], ecx
mov cx, word [0x55c608]
lea edi, [esp + 0x1c]
mov dword [eax + 0x10], edx
mov word [eax + 0x14], cx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406a60
mov edx, dword [0x55c4b4]
lea eax, [esp + 0x224]
mov dword [edi], edx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406a80
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x228]
push eax
lea esi, [edi + 0x94]
call fcn.00401250
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406ab0
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x20]
push ecx
jmp 0x406cd5
lea edx, [esp + 0xa44]
push edx
call ebx
test eax, eax
je 0x406bd0
xor eax, eax
mov edi, edi
movzx ecx, word [esp + eax + 0xa44]
mov word [esp + eax + 0x224], cx
add eax, 2
cmp cx, bp
jne 0x406ae0
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x224]
mov word [esp + eax + 0x1c], cx
add eax, 2
cmp cx, bp
jne 0x406b00
lea eax, [esp + 0x1c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x406b20
mov ecx, dword [str.1.1.0.0511]
mov edx, dword [0x55c5f8]
mov dword [eax], ecx
mov ecx, dword [0x55c5fc]
mov dword [eax + 4], edx
mov edx, dword [0x55c600]
mov dword [eax + 8], ecx
mov ecx, dword [0x55c604]
mov dword [eax + 0xc], edx
mov dx, word [0x55c608]
lea edi, [esp + 0x1c]
mov dword [eax + 0x10], ecx
mov word [eax + 0x14], dx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406b70
mov eax, dword [0x55c4b4]
mov dword [edi], eax
lea eax, [esp + 0x224]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406b90
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x228]
push ecx
lea esi, [edi + 0x94]
call fcn.00401250
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406bc0
jmp 0x406ccb
xor eax, eax
jmp 0x406be0
movzx ecx, word [esp + eax + 0x83c]
mov word [esp + eax + 0x224], cx
add eax, 2
cmp cx, bp
jne 0x406be0
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x224]
mov word [esp + eax + 0x1c], cx
add eax, 2
cmp cx, bp
jne 0x406c00
lea eax, [esp + 0x1c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x406c20
mov ecx, dword [str.1.1.0.0511]
mov edx, dword [0x55c5f8]
mov dword [eax], ecx
mov ecx, dword [0x55c5fc]
mov dword [eax + 4], edx
mov edx, dword [0x55c600]
mov dword [eax + 8], ecx
mov ecx, dword [0x55c604]
mov dword [eax + 0xc], edx
mov dx, word [0x55c608]
lea edi, [esp + 0x1c]
mov dword [eax + 0x10], ecx
mov word [eax + 0x14], dx
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x406c70
mov eax, dword [0x55c4b4]
mov dword [edi], eax
lea eax, [esp + 0x224]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406c90
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x228]
push ecx
lea esi, [edi + 0x94]
call fcn.00401250
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406cc0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x20]
push edx
lea esi, [edi + 0xb0]
call fcn.00401250
mov ecx, dword [esp + 0x105c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00429fbb
add esp, 0x1050
ret 4