Function at 0x1040c8a
Capabilities:
Check if file exists

Disassembly:
push 0x54
mov eax, 0x10b4f73
call fcn.010aac1c
mov dword [ebp - 0x1c], ecx
lea eax, [ebp - 0x14]
push eax
xor edi, edi
push 0x10076f8
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x14], edi
call fcn.010ab82f
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x18], edi
cmp eax, edi
jne 0x1040ce1
mov eax, 0x80004003
mov dword [ebp - 0x14], eax
mov esi, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.010ab876
mov eax, esi
call fcn.010aad08
ret 0x14
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
cmp eax, edi
je 0x1040cf8
mov dword [ebp - 0x10], eax
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
jmp 0x1040dda
call sub.MFC42u.dll_AfxGetModuleState
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xe00]
cmp dword [ebp + 8], edi
je 0x1040e7c
push dword [ebp + 8]
mov ecx, eax
call fcn.0108b5e8
xor esi, esi
inc esi
push 9
pop edi
cmp eax, esi
jne 0x1040d26
or dword [ebp + 0x10], edi
push dword [ebp + 8]
call fcn.01075c41
test eax, eax
je 0x1040d39
or dword [ebp + 0x10], 0x40009
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
test eax, eax
je 0x1040d65
xor ecx, ecx
cmp cx, word [eax]
je 0x1040d65
push 0xffffffffffffffff
push 0x10021c8
push 0xffffffffffffffff
push eax
push esi
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
je 0x1040d68
or dword [ebp + 0x10], edi
test dword [ebp + 0x10], 0x800
je 0x1040d77
or dword [ebp + 0x10], edi
push 0x40
pop ebx
call sub.MFC42u.dll_AfxGetModuleState
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xe00]
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 0x10]
or ecx, esi
push ecx
push dword [ebp + 8]
mov ecx, eax
call fcn.0108cd22
mov dword [ebp - 0x14], eax
cmp eax, esi
jne 0x1040dd8
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, esi
jne 0x1040dd8
or dword [ebp + 0x10], edi
call sub.MFC42u.dll_AfxGetModuleState
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xe00]
lea ecx, [ebp - 0x10]
push ecx
push 0
push dword [ebp + 0x10]
mov ecx, eax
push dword [ebp + 8]
call fcn.0108cd22
mov dword [ebp - 0x14], eax
xor edi, edi
cmp dword [ebp - 0x14], edi
jl 0x1040fa3
cmp dword [ebp - 0x10], edi
je 0x1040f64
call sub.MFC42u.dll_AfxGetModuleState
mov esi, dword [eax + 0xc]
call sub.MFC42u.dll_AfxGetModuleState
push dword [ebp + 0x18]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xe00]
push esi
push dword [ebp + 0x10]
mov ecx, eax
push ebx
push dword [ebp - 0x10]
call fcn.0108abcc
cmp eax, edi
mov dword [ebp - 0x14], eax
jge 0x1040f17
test bl, 0x40
jne 0x1040f17
cmp eax, 0xc6c81098
jne 0x1040e92
mov dword [ebp + 0xc], edi
push dword [ebp + 0x18]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp + 0xc]
push eax
push edi
push dword [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.01040770
cmp eax, edi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
jl 0x1040e65
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x10], esi
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov byte [ebp - 4], 0
cmp esi, edi
je 0x1040f17
mov eax, dword [esi]
push esi
call dword [eax + 8]
jmp 0x1040f17
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
mov ecx, eax
call fcn.0108c33c
mov dword [ebp - 0x14], eax
jmp 0x1040dda
cmp eax, 0xc6c8111f
jne 0x1040f17
call sub.MFC42u.dll_AfxGetModuleState
mov esi, dword [eax + 0xc]
call sub.MFC42u.dll_AfxGetModuleState
push dword [ebp + 0x18]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xe00]
push esi
push edi
or ebx, 0x40
push ebx
push dword [ebp - 0x10]
mov ecx, eax
call fcn.0108abcc
cmp eax, edi
mov dword [ebp - 0x14], eax
jl 0x1040f17
xor eax, eax
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea edx, [ebp - 0x34]
push edx
stosd dword es:[edi], eax
lea edx, [ebp + 0x18]
push edx
push 0
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x10]
push 1
mov dword [ebp + 0x18], 0x1a0003
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
test eax, eax
jl 0x1040f0b
mov eax, dword [ebp - 0x10]
or dword [ebp - 0x2c], 1
mov ecx, dword [eax]
lea edx, [ebp - 0x34]
push edx
lea edx, [ebp + 0x18]
push edx
push 0
push 1
push eax
call dword [ecx + 0x2c]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.ole32.dll_PropVariantClear]
xor edi, edi
cmp dword [ebp - 0x14], 0x40301
jne 0x1040f64
push edi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0x60]
call fcn.0103c851
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x60]
push eax
push 0x41
push 0x2001
call fcn.0103dadf
cmp eax, 2
jne 0x1040f64
call sub.MFC42u.dll_AfxGetModuleState
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xe00]
push dword [ebp - 0x10]
mov ecx, eax
call fcn.0108ade1
mov dword [ebp - 0x14], 0x80004004
cmp dword [ebp - 0x14], edi
jl 0x1040fa3
cmp dword [ebp - 0x10], edi
je 0x1040f8c
call sub.MFC42u.dll_AfxGetModuleState
mov eax, dword [eax + 4]
push dword [ebp + 0x10]
mov eax, dword [eax + 0xe00]
push dword [ebp - 0x10]
mov ecx, eax
call fcn.0108bcc6
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], edi
jl 0x1040fa3
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x1040fb3
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x1040fb3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x10], edi
mov eax, dword [ebp - 0x18]
cmp eax, edi
je 0x1040fc3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x18], edi
mov esi, dword [ebp - 0x14]
jmp 0x1040ccb