Function at 0x406c40
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x521c07
mov eax, dword fs:[0]
push eax
sub esp, 0x8b8
mov eax, dword [0x574674]
xor eax, esp
mov dword [esp + 0x8b0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x574674]
xor eax, esp
push eax
lea eax, [esp + 0x8cc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x8dc]
xor ebx, ebx
push 0x206
lea eax, [esp + 0x2b2]
push ebx
push eax
mov word [esp + 0x2b8], bx
call fcn.00437ec0
add esp, 0xc
push 0x206
lea ecx, [esp + 0xaa]
push ebx
push ecx
mov word [esp + 0xb0], bx
call fcn.00437ec0
add esp, 0xc
push ebx
mov esi, 7
push 0x566d2c
lea ecx, [esp + 0x74]
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ebx
mov word [esp + 0x78], bx
call fcn.00402110
mov dword [esp + 0x8d4], ebx
push ebx
push 0x566d2c
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x5c], bx
call fcn.00402110
mov byte [esp + 0x8d4], 1
push ebx
push 0x566d2c
lea ecx, [esp + 0x3c]
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], bx
call fcn.00402110
mov byte [esp + 0x8d4], 2
push ebx
push 0x566d2c
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], ebx
mov word [esp + 0x24], bx
call fcn.00402110
lea edi, [ebx + 0x2b]
lea esi, [esp + 0x2ac]
mov byte [esp + 0x8d4], 3
call fcn.00408210
mov edi, esi
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x406d70
mov edx, dword [0x566fd4]
mov dword [edi], edx
lea edi, [esp + 0x2ac]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x406d90
mov ecx, 8
mov esi, 0x566fd8
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x2ac]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x406db2
lea eax, [esp + 0x2ac]
mov dword [edi], edx
add eax, 0xfffffffe
lea ebx, [ebx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x406dd0
mov edx, dword [str.SmartCloud]
mov ecx, dword [0x566b3c]
mov dword [eax], edx
mov edx, dword [0x566b40]
mov dword [eax + 4], ecx
mov ecx, dword [0x566b44]
mov dword [eax + 8], edx
mov edx, dword [0x566b48]
mov dword [eax + 0xc], ecx
mov cx, word [0x566b4c]
mov dword [eax + 0x10], edx
mov word [eax + 0x14], cx
lea eax, [esp + 0x2ac]
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x406e20
mov edx, dword [str..ini]
mov ecx, dword [0x566ffc]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [eax], edx
mov dx, word [0x567000]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x2ac]
push eax
push 0x104
lea ecx, [esp + 0xac]
push ecx
push 0x566d2c
push str.CfgRootPath
push str.Globals
call edi
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406e80
sub eax, edx
sar eax, 1
cmp eax, ebx
jle 0x406f90
lea edx, [esp + 0xa4]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406f90
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406eb7
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x74]
call fcn.00402110
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406ee2
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xa8]
push ecx
lea ecx, [ebp + 0x28]
call fcn.00402110
cmp byte [ebp + 4], bl
mov byte [ebp + 2], 1
jne 0x406f90
mov esi, 8
cmp dword [esp + 0x30], esi
jb 0x406f27
mov edx, dword [esp + 0x1c]
push edx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x4c], esi
mov edi, 7
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov word [esp + 0x1c], bx
jb 0x406f4c
mov eax, dword [esp + 0x38]
push eax
call fcn.00418473
add esp, 4
cmp dword [esp + 0x68], esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
mov word [esp + 0x38], bx
jb 0x406f6c
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x84], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], bx
jb 0x40749f
mov edx, dword [esp + 0x70]
push edx
jmp 0x407497
mov ecx, dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x104
lea eax, [esp + 0x6c0]
push eax
push ecx
call esi
lea eax, [esp + 0x6bc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406fb3
sub eax, edx
sar eax, 1
jne 0x406fd4
push 0x104
lea edx, [esp + 0x6c0]
push edx
push ebx
call esi
lea eax, [esp + 0x6bc]
push 0x5c
push eax
call fcn.00433fa5
push 0x206
lea ecx, [esp + 0x4c2]
push ebx
mov word [eax + 2], bx
push ecx
mov word [esp + 0x4c8], bx
call fcn.00437ec0
add esp, 0x14
push str.SmartCloudInfo.ini
lea edx, [esp + 0x6c0]
push edx
lea eax, [esp + 0x4bc]
push str._s_s
push eax
call fcn.004338ee
add esp, 0x10
lea ecx, [esp + 0x4b4]
push ecx
push 0x104
lea edx, [esp + 0xac]
push edx
push 0x566d2c
push str.CfgRootPath
push str.AppInfo
call edi
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407057
sub eax, edx
sar eax, 1
cmp eax, ebx
jle 0x40716e
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40716e
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407090
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xa8]
push ecx
lea ecx, [esp + 0x58]
call fcn.00402110
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
jmp 0x4070c0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4070c0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0xa8]
push edx
lea ecx, [ebp + 0x28]
call fcn.00402110
cmp byte [ebp + 4], bl
mov byte [ebp + 2], 1
jne 0x40716e
mov esi, 8
cmp dword [esp + 0x30], esi
jb 0x407105
mov eax, dword [esp + 0x1c]
push eax
call fcn.00418473
add esp, 4
cmp dword [esp + 0x4c], esi
mov edi, 7
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov word [esp + 0x1c], bx
jb 0x40712a
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x68], esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
mov word [esp + 0x38], bx
jb 0x40714a
mov edx, dword [esp + 0x54]
push edx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x84], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], bx
jb 0x40749f
mov eax, dword [esp + 0x70]
push eax
jmp 0x407497
mov esi, 8
cmp dword [ebp + 0xcc], esi
jb 0x407183
mov eax, dword [ebp + 0xb8]
jmp 0x407189
lea eax, [ebp + 0xb8]
push str.SmartCloudInfo.ini
push eax
lea ecx, [esp + 0x4bc]
push str._s_s
push ecx
call fcn.004338ee
add esp, 0x10
lea edx, [esp + 0x4b4]
push edx
push 0x104
lea eax, [esp + 0xac]
push eax
push 0x566d2c
push str.CfgRootPath
push str.AppInfo
call edi
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4071d4
sub eax, edx
sar eax, 1
cmp eax, ebx
jle 0x407286
lea ecx, [esp + 0xa4]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407286
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
jmp 0x407210
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407210
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0xa8]
push edx
lea ecx, [esp + 0x3c]
call fcn.00402110
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
jmp 0x407240
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407240
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0xa8]
push eax
lea ecx, [ebp + 0x28]
call fcn.00402110
cmp byte [ebp + 4], bl
mov byte [ebp + 2], 1
jne 0x407286
cmp dword [esp + 0x30], esi
jb 0x40727c
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00418473
add esp, 4
mov edi, 7
jmp 0x40743c
mov eax, str.CfgRootPath
lea ecx, [esp + 0x88]
call fcn.004094a0
mov byte [esp + 0x8d4], 4
mov edi, dword [esp + 0xa0]
cmp edi, esi
mov eax, dword [esp + 0x8c]
jae 0x4072b8
lea eax, [esp + 0x8c]
lea edx, [eax + 2]
jmp 0x4072c0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4072c0
sub eax, edx
sar eax, 1
cmp eax, ebx
jle 0x407359
cmp edi, esi
mov eax, dword [esp + 0x8c]
jae 0x4072e9
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407359
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x90]
push edx
lea ecx, [esp + 0x24]
call fcn.00401e80
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x90]
push eax
lea ecx, [ebp + 0x28]
call fcn.00401e80
cmp byte [ebp + 4], bl
mov byte [ebp + 2], 1
jne 0x407362
lea ecx, [esp + 0x88]
call fcn.00401e50
lea ecx, [esp + 0x18]
call fcn.00401e50
lea ecx, [esp + 0x34]
call fcn.00401e50
lea ecx, [esp + 0x50]
call fcn.00401e50
lea ecx, [esp + 0x6c]
call fcn.00401e50
jmp 0x40749f
cmp byte [ebp + 4], bl
je 0x4073f5
cmp byte [ebp + 2], bl
je 0x4073f5
cmp dword [esp + 0x68], esi
mov eax, dword [esp + 0x54]
jae 0x407379
lea eax, [esp + 0x54]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x80]
push ecx
push eax
push edx
push ebx
lea ecx, [esp + 0x7c]
call fcn.00404a10
test eax, eax
je 0x407399
mov byte [ebp + 5], 1
cmp dword [esp + 0x4c], esi
mov eax, dword [esp + 0x38]
jae 0x4073a7
lea eax, [esp + 0x38]
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x80]
push ecx
push eax
push edx
push ebx
lea ecx, [esp + 0x7c]
call fcn.00404a10
test eax, eax
je 0x4073c7
mov byte [ebp + 5], 1
cmp dword [esp + 0x30], esi
mov eax, dword [esp + 0x1c]
jae 0x4073d5
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x80]
push ecx
push eax
push edx
push ebx
lea ecx, [esp + 0x7c]
call fcn.00404a10
test eax, eax
je 0x4073f5
mov byte [ebp + 5], 1
cmp dword [esp + 0xa0], esi
jb 0x40740e
mov eax, dword [esp + 0x8c]
push eax
call fcn.00418473
add esp, 4
cmp dword [esp + 0x30], esi
mov edi, 7
mov dword [esp + 0xa0], edi
mov dword [esp + 0x9c], ebx
mov word [esp + 0x8c], bx
jb 0x40743c
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x4c], esi
mov word [esp + 0x1c], bx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], edi
jb 0x40745c
mov edx, dword [esp + 0x38]
push edx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x68], esi
mov word [esp + 0x38], bx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], edi
jb 0x40747c
mov eax, dword [esp + 0x54]
push eax
call fcn.00418473
add esp, 4
cmp dword [esp + 0x84], esi
mov word [esp + 0x54], bx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], edi
jb 0x40749f
mov ecx, dword [esp + 0x70]
push ecx
call fcn.00418473
add esp, 4
mov ecx, dword [esp + 0x8cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x8b0]
xor ecx, esp
call fcn.004338df
add esp, 0x8c4
ret 4