Function at 0x404700
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x415402
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x230
push ebx
push esi
push edi
push 0x206
xor ebx, ebx
lea ecx, [esp + 0x36]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x3c], ax
call fcn.00409ae0
push ebx
push ebx
push 2
push 0x104
lea edx, [esp + 0x4c]
push edx
push 0x418930
call dword [sym.imp.crt.dll_Ordinal_34]
add esp, 0x24
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x404a5f
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x244], 1
lea ecx, [esp + 0xc]
push ecx
push 0x418e94
push 0x17
push ebx
push 0x418e74
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jge 0x4047bd
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x4047b2
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0xc], ebx
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x404a44
lea ecx, [esp + 0x18]
xor eax, eax
push ecx
mov word [esp + 0x1c], ax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
cmp eax, ebx
jge 0x4047d9
push eax
call fcn.00401080
mov esi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
lea eax, [esp + 0x30]
mov edx, 8
push eax
mov word [esp + 0x1c], dx
call esi
mov dword [esp + 0x20], eax
cmp eax, ebx
jne 0x404814
mov ecx, 0xa
push 0x8007000e
mov word [esp + 0x1c], cx
mov dword [esp + 0x24], 0x8007000e
call fcn.00401080
mov byte [esp + 0x244], 3
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x2c]
push eax
sub esp, 0x10
mov eax, esp
mov dword [eax], edi
mov edi, dword [esp + 0x30]
mov dword [eax + 4], edi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x40], ebx
mov edx, dword [ecx]
mov dword [eax + 8], edi
mov edi, dword [esp + 0x38]
push ecx
mov ecx, dword [edx + 0xe8]
mov dword [eax + 0xc], edi
call ecx
cmp eax, ebx
jge 0x4048bb
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x40486c
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0xc], ebx
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [esp + 0x244], 1
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov dword [esp + 0x244], 0xffffffff
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x404a5f
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
xor al, al
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x10], ebx
mov byte [esp + 0x244], 6
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push 0x418950
push eax
mov eax, dword [ecx + 0x94]
call eax
cmp eax, ebx
jl 0x4049eb
cmp dword [esp + 0x10], ebx
je 0x4049eb
push 0x418818
call esi
mov dword [esp + 0x14], eax
cmp eax, ebx
jne 0x40490b
push 0x8007000e
call fcn.00401080
mov byte [esp + 0x244], 7
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [ecx + 0x68]
call eax
cmp eax, ebx
jl 0x4049d8
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x4049d8
lea esi, [esp + 0xc]
call fcn.00405ff0
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40495c
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0x10], ebx
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00408ab4
add esp, 4
test eax, eax
setne bl
mov byte [esp + 0x244], 6
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov byte [esp + 0x244], 3
lea eax, [esp + 0x10]
push eax
call fcn.00405510
mov byte [esp + 0x244], 1
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov dword [esp + 0x244], 0xffffffff
lea edx, [esp + 0xc]
push edx
call fcn.00405510
mov al, bl
mov ecx, dword [esp + 0x23c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [esp + 0x244], 6
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x4049ff
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0xc], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x404a13
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x10], ebx
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [esp + 0x244], 3
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x404a31
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov byte [esp + 0x244], 1
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov dword [esp + 0x244], 0xffffffff
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x404a5f
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ecx, dword [esp + 0x23c]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret