Function at 0x40e870
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x472298
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x48c4c4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, edx
mov edx, dword [0x476338]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x4c], ecx
mov ecx, dword [0x476340]
mov dword [edi + 0xc], eax
mov eax, dword [0x47633c]
xor ebx, ebx
mov dword [ebp - 0x24], edx
mov edx, dword [0x476344]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
lea eax, [ebx + 4]
mov ecx, esi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x54], 0x477fd4
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x18], edx
call fcn.004192d0
cmp eax, 0x477790
je 0x40e8f7
cmp dword [eax + 8], ebx
jg 0x40e8fb
xor eax, eax
jmp 0x40e908
push ebx
push 4
mov eax, esi
call fcn.0041c2e0
add esp, 8
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], ebx
cmp eax, ebx
je 0x40e95f
lea ebx, [ebp - 0x24]
call fcn.004078d0
test eax, eax
jns 0x40e95d
mov eax, dword [ebp - 0x3c]
push eax
mov eax, esi
call fcn.0041b060
add esp, 4
mov dword [ebp - 0x40], eax
test eax, eax
je 0x40e93f
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40e950
mov ebx, str.Invalid_ProgID_
mov ecx, 4
mov edx, esi
call fcn.0041b780
mov edi, 4
call fcn.004194e0
mov edi, dword [ebp - 0x48]
xor ebx, ebx
push 0x28
call fcn.004500ad
add esp, 4
cmp eax, ebx
je 0x40e9aa
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp + 0x10]
mov dword [eax], vtable.CWBClientSite.0
mov dword [eax + 4], vtable.CWBClientSite.1.0
mov dword [eax + 8], vtable.CWBClientSite.2.0
mov dword [eax + 0xc], vtable.CWBClientSite.3.0
mov dword [eax + 0x10], vtable.CWBClientSite.4.0
mov dword [eax + 0x14], vtable.CWBClientSite.5.0
mov dword [eax + 0x20], esi
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x18], ebx
mov dword [eax + 0x24], edx
jmp 0x40e9ac
xor eax, eax
mov dword [edi + 4], eax
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [ebp - 0x40]
cmp eax, ebx
jne 0x40e9dd
mov ecx, dword [edi + 4]
push edi
lea eax, [ebp - 0x54]
push eax
push ecx
push ebx
push 1
push 0x4762b8
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.ole32.dll_OleCreate]
mov esi, eax
jmp 0x40ea33
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e9e0
sub eax, edx
lea esi, [eax + 1]
lea eax, [esi + esi]
push eax
call fcn.0045087f
mov ecx, dword [ebp - 0x40]
add esp, 4
push esi
mov ebx, eax
push ecx
push ebx
call fcn.004504da
mov eax, dword [edi + 4]
add esp, 0xc
push edi
lea edx, [ebp - 0x54]
push edx
push eax
push 0
push 1
push 0x4762b8
push ebx
push 0x4761d8
call dword [sym.imp.ole32.dll_OleCreateFromFile]
push ebx
mov esi, eax
call fcn.00450845
add esp, 4
xor ebx, ebx
cmp esi, ebx
jl 0x40eb20
mov eax, dword [edi + 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [edi]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
push ebx
push str.AAuto_Ole
push eax
call edx
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [edi]
push 1
push edx
call dword [sym.imp.ole32.dll_OleSetContainedObject]
mov esi, eax
cmp esi, ebx
jl 0x40eab2
mov eax, dword [edi]
mov ecx, dword [eax]
lea edx, [ebp - 0x34]
push edx
mov edx, dword [ebp - 0x38]
push edx
mov edx, dword [edi + 4]
push 0xffffffffffffffff
push edx
push ebx
push 0xffffffffffffffff
push eax
mov eax, dword [ecx + 0x2c]
call eax
mov esi, eax
cmp esi, ebx
jl 0x40eab2
mov edx, dword [ebp - 0x4c]
mov eax, dword [edi]
mov ecx, dword [eax]
push edx
push 0x476288
push eax
mov eax, dword [ecx]
call eax
mov esi, eax
cmp esi, ebx
jl 0x40eab2
xor eax, eax
jmp 0x40eb25
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x40eac5
push eax
call fcn.00450002
add esp, 4
mov dword [edi + 4], ebx
mov eax, dword [edi]
cmp eax, ebx
je 0x40ead7
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push 1
push eax
call edx
mov dword [edi], ebx
cmp esi, ebx
jge 0x40eb19
mov dword [ebp - 0x60], vtable.tStringBuffer.0
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 4], ebx
lea ebx, [ebp - 0x60]
mov ecx, esi
call fcn.00406830
push eax
mov eax, dword [ebp - 0x44]
push eax
call fcn.0041b9c0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x58]
add esp, 8
test eax, eax
je 0x40eb19
push eax
call fcn.00450002
add esp, 4
mov eax, 0xfffffffd
jmp 0x40eb25
mov eax, 0xfffffffe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044fe53
mov esp, ebp
pop ebp
ret 0xc