Function at 0x40df30
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cf3ed
mov eax, dword fs:[0]
push eax
sub esp, 0x294
mov eax, dword [0x65a000]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x26c], eax
xor eax, eax
mov dword [ebp - 0x224], 7
mov dword [ebp - 0x228], 0
mov word [ebp - 0x238], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x240], eax
mov word [ebp - 0x250], ax
mov dword [ebp - 0x254], 7
mov dword [ebp - 0x258], eax
mov word [ebp - 0x268], ax
push 0x20
mov byte [ebp - 4], 2
call fcn.005a5a6a
add esp, 4
mov dword [edi + 8], eax
test eax, eax
jne 0x40e088
push str.CDownload::DoDownloadAppXML_DOWNLOAD_LIST_malloc___Failed
call fcn.00415fc0
mov eax, dword [edi + 8]
test eax, eax
je 0x40dfe7
push eax
call fcn.00410210
xor esi, esi
cmp dword [ebp - 0x254], 8
jb 0x40e000
push dword [ebp - 0x268]
call fcn.0048166b
add esp, 4
xor eax, eax
cmp dword [ebp - 0x23c], 8
mov dword [ebp - 0x254], 7
mov dword [ebp - 0x258], 0
mov word [ebp - 0x268], ax
jb 0x40e034
push dword [ebp - 0x250]
call fcn.0048166b
add esp, 4
xor eax, eax
cmp dword [ebp - 0x224], 8
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x240], 0
mov word [ebp - 0x250], ax
jb 0x40e068
push dword [ebp - 0x238]
call fcn.0048166b
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005a4646
mov esp, ebp
pop ebp
ret 8
mov dword [eax], 1
mov esi, dword [edi + 8]
mov eax, dword [esi]
shl eax, 2
push eax
call fcn.005a5a6a
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
add esp, 4
cmp dword [eax + 4], 0
jne 0x40e0b5
push str.CDownload::DoDownloadAppXML_DOWNLOAD_INFO_malloc___Failed
jmp 0x40dfd5
push str.ONLINEFLAG
lea ecx, [ebp - 0x29c]
mov dword [eax + 0x14], 0
call fcn.004051f0
mov byte [ebp - 4], 3
mov ecx, dword [0x6fb010]
lea eax, [ebp - 0x29c]
push eax
lea ecx, [ecx + 0xc]
call fcn.004070c0
cmp eax, 1
sete bl
mov byte [ebp - 4], 2
cmp dword [ebp - 0x288], 8
jb 0x40e106
push dword [ebp - 0x29c]
call fcn.0048166b
add esp, 4
test bl, bl
je 0x40e1a2
push 0x60f994
lea ecx, [ebp - 0x284]
call fcn.004051f0
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 4
mov ecx, dword [0x6fb010]
push eax
lea eax, [ebp - 0x29c]
push eax
lea ecx, [ecx + 0x1c]
call fcn.00406e30
push eax
lea ecx, [ebp - 0x238]
call fcn.004052c0
cmp dword [ebp - 0x288], 8
jb 0x40e161
push dword [ebp - 0x29c]
call fcn.0048166b
add esp, 4
xor eax, eax
mov byte [ebp - 4], 2
cmp dword [ebp - 0x270], 8
mov dword [ebp - 0x288], 7
mov dword [ebp - 0x28c], 0
mov word [ebp - 0x29c], ax
jb 0x40e199
push dword [ebp - 0x284]
call fcn.0048166b
add esp, 4
push 0xa
push 0x60fb44
jmp 0x40e219
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call fcn.005a7690
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp word [ebp - 0x220], 0
jne 0x40e1e0
xor ecx, ecx
jmp 0x40e1ff
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e1f0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x238]
call fcn.004058d0
push 9
push str.DL_APPXML
lea ecx, [ebp - 0x238]
call fcn.004057a0
cmp dword [0x6fd8e8], 8
mov eax, 0x6fd8d4
cmovae eax, dword [0x6fd8d4]
xor edx, edx
push 0xffffffffffffffff
mov dword [0x6fd8e4], 0
mov word [eax], dx
push edx
lea eax, [ebp - 0x238]
push eax
mov ecx, 0x6fd8d4
call fcn.00405440
push str.WORK_DLAPPXML_FOLDER
lea ecx, [ebp - 0x284]
call fcn.004051f0
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 5
mov ecx, dword [0x6fb010]
push eax
lea eax, [ebp - 0x284]
push eax
lea ecx, [ecx + 0xc]
call fcn.00407490
mov byte [ebp - 4], 2
cmp dword [ebp - 0x270], 8
jb 0x40e2a5
push dword [ebp - 0x284]
call fcn.0048166b
add esp, 4
cmp dword [ebp - 0x224], 8
lea ecx, [ebp - 0x238]
cmovae ecx, dword [ebp - 0x238]
call fcn.00419790
cmp eax, 0x80000000
jne 0x40e2fd
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
push str.CDownload::DoDownloadAppXML_EnsureDir___Failed___Path:_s
push 0xffffffffffffffff
push 0x1000
push 0x6fb428
call fcn.005a4e29
add esp, 0x14
push 0x6fb428
jmp 0x40dfd5
cmp dword [ebp - 0x224], 8
mov edx, dword [ebp - 0x228]
lea ecx, [ebp - 0x238]
cmovae ecx, dword [ebp - 0x238]
lea edx, [edx + 1]
call fcn.0047cfc0
mov ecx, dword [edi + 8]
mov ebx, dword [ebp - 0x26c]
mov dword [ecx + 0x1c], eax
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
xor ecx, ecx
mov dword [ebp - 0x228], 0
mov word [eax], cx
cmp dword [ebx + 0x34], ecx
jne 0x40e362
push str.CDownload::DoDownloadAppXML_pApliList__siAppPath__NULL___Failed
call fcn.00415fc0
jmp 0x40dfe7
cmp dword [ebp - 0x23c], 8
mov dword [ebp - 0x240], ecx
lea eax, [ebp - 0x250]
cmovae eax, dword [ebp - 0x250]
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebx + 0x34]
lea ecx, [ebp - 0x250]
push dword [eax + 4]
call fcn.00405330
mov eax, dword [ebx]
cmp dword [ebp - 0x23c], 8
push 0x3e8
push 2
push dword [eax + 4]
lea ecx, [ebp - 0x250]
cmovae ecx, dword [ebp - 0x250]
push ecx
call fcn.0040ff70
mov ecx, dword [edi + 8]
mov ecx, dword [ecx + 4]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [edi + 8]
push dword [eax + 4]
mov eax, dword [ecx + 0x1c]
push dword [eax + 4]
mov eax, dword [ecx + 4]
push 0x60e0d4
mov eax, dword [eax]
push 0xffffffffffffffff
add eax, 0x2c
push 0x104
push eax
call fcn.005a4e29
mov ecx, dword [edi + 8]
mov eax, dword [ebp + 0xc]
add esp, 0x18
mov dword [ecx + 0x10], eax
push dword [edi + 8]
mov ecx, edi
call fcn.0040ec90
test eax, eax
je 0x40dfda
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40dfda
mov eax, dword [ebx]
lea ecx, [ebp - 0x268]
push dword [eax + 4]
call fcn.00405330
push str..XMLURL
lea ecx, [ebp - 0x268]
call fcn.00405380
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x284]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax + 8]
push dword [eax + 4]
call fcn.004051f0
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 6
mov ecx, dword [0x6fb010]
push eax
lea eax, [ebp - 0x268]
push eax
lea ecx, [ecx + 0xc]
call fcn.00407490
lea ecx, [ebp - 0x284]
call fcn.00405300
mov eax, dword [edi + 8]
cmp dword [ebp - 0x254], 8
mov eax, dword [eax + 4]
lea ecx, [ebp - 0x268]
mov eax, dword [eax]
cmovae ecx, dword [ebp - 0x268]
mov eax, dword [eax + 8]
push dword [eax + 4]
push ecx
push str.CDownload::DoDownloadAppXML__s:_s
call fcn.00416170
mov esi, 1
jmp 0x40dfe9