Function at 0x40cd89
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
push ebx
push esi
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetLastActivePopup]
test eax, eax
je 0x40cdb4
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_IsChild]
mov edi, str.http:__cloudinfo.rising.com.cn_cloudconfig_GuideConfig5701.xml
lea esi, [ebp - 0x24]
call fcn.00407f9b
mov esi, 0x208
push esi
call fcn.00412242
pop ecx
mov ebx, eax
push ebx
push esi
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push ebx
xor esi, esi
push esi
push 0x42b50c
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov ecx, dword [ebp + 8]
push dword [ebp - 0x24]
add ecx, 4
mov edx, ebx
call fcn.0040638d
test eax, eax
jne 0x40d00b
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
lea edi, [ebp - 8]
mov dword [ebp - 8], esi
call fcn.0040da1d
test eax, eax
jne 0x40cfe0
mov edi, ebx
lea esi, [ebp - 0x20]
call fcn.00407f9b
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, esi
call fcn.0040d7aa
mov dword [ebp - 0x34], eax
push 8
pop eax
mov word [ebp - 0x3c], ax
mov eax, dword [ebp - 8]
test eax, eax
jne 0x40ce52
push 0x80004003
call fcn.00423470
mov ecx, dword [eax]
lea edx, [ebp - 0x1c]
push edx
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x3c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call dword [ecx + 0xe8]
test eax, eax
jne 0x40cfc8
cmp word [ebp - 0x1c], 0xffff
jne 0x40cfc8
mov edi, dword [ebp - 8]
and dword [ebp - 0x14], eax
test edi, edi
je 0x40ce48
and dword [ebp - 0x14], eax
push str.CONFIG_SWITCH
lea esi, [ebp - 0xc]
call fcn.0040dc1f
mov eax, dword [eax]
mov ecx, dword [edi]
lea edx, [ebp - 0x14]
push edx
push eax
push edi
call dword [ecx + 0x94]
push dword [ebp - 0xc]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
call edi
test bl, bl
je 0x40cfbb
mov eax, dword [ebp - 0x14]
xor esi, esi
mov dword [ebp - 0xc], esi
cmp eax, esi
je 0x40ce48
mov ecx, dword [eax]
lea edx, [ebp - 0xc]
push edx
push eax
call dword [ecx + 0x68]
test eax, eax
jne 0x40cfb6
push 0x42b520
push dword [ebp - 0xc]
call fcn.00414298
pop ecx
pop ecx
cmp eax, 0xffffffff
je 0x40cfb6
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x18], esi
cmp ebx, esi
je 0x40ce48
mov dword [ebp - 0x18], esi
push str.CONFIG_URL
lea esi, [ebp - 0x10]
call fcn.0040dc1f
mov eax, dword [eax]
mov ecx, dword [ebx]
lea edx, [ebp - 0x18]
push edx
push eax
push ebx
call dword [ecx + 0x94]
push dword [ebp - 0x10]
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
call edi
test bl, bl
je 0x40cfa9
mov eax, dword [ebp - 0x18]
and dword [ebp - 0x10], 0
test eax, eax
je 0x40ce48
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push eax
call dword [ecx + 0x68]
test eax, eax
jne 0x40cfa4
push 3
push dword [ebp - 0x10]
lea eax, [ebp - 0xbc]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xc0]
push eax
call fcn.0040db10
push dword [ebp - 0xc0]
mov eax, dword [ebp + 8]
add eax, 0x8c
push eax
call fcn.00407f6c
lea eax, [ebp - 0xbc]
cmp dword [ebp - 0xc0], eax
je 0x40cfa4
push dword [ebp - 0xc0]
call fcn.004120bd
pop ecx
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40cfb6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0xc]
call edi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40cfc8
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.00408191
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 8]
test eax, eax
je 0x40cff1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
and dword [ebp - 8], 0
call dword [sym.imp.ole32.dll_CoUninitialize]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 8]
test eax, eax
je 0x40d00b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.00408191
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret 4