Function at 0x10078baa
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6ec
mov eax, dword [0x100a6b34]
xor eax, esp
mov dword [esp + 0x6e8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [esp + 0x14], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
push edi
mov dword [esp + 0x24], eax
mov edi, edx
xor eax, eax
mov dword [esp + 0x14], edi
push 0x208
push eax
mov esi, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x2e8]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
test edi, edi
je 0x10078cfc
push 0x10026fb0
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
jne 0x10078c59
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10078c33
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10078c4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10078c53
movzx esi, si
or esi, 0x80070000
jmp 0x10078c51
mov esi, 0x80004005
test esi, esi
js 0x10078f83
push 0x10026fc4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x10078ca7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10078c81
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10078c9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10078ca1
movzx esi, si
or esi, 0x80070000
jmp 0x10078c9f
mov esi, 0x80004005
test esi, esi
js 0x10078f83
xor eax, eax
mov ecx, edi
push eax
push eax
push eax
push dword [esp + 0x20]
call dword [0x100a83d4]
call edi
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x10078cfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10078cd6
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10078cef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10078cf6
movzx esi, si
or esi, 0x80070000
jmp 0x10078cf4
mov esi, 0x80004005
test esi, esi
js 0x10078f83
push 0x10026fd8
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
jne 0x10078e99
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7f
jne 0x10078d31
push 0x10026ff8
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10078d6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10078d45
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10078d62
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [esp + 0x10]
test esi, esi
jle 0x10078d6d
movzx esi, si
or esi, 0x80070000
jmp 0x10078d6b
mov eax, dword [esp + 0x10]
mov esi, 0x80004005
test esi, esi
js 0x10078f6c
test eax, eax
je 0x10078f40
mov ebx, dword [esp + 0x1c]
xor edi, edi
push 0x208
lea eax, [esp + 0x4ec]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x2b8
lea eax, [esp + 0x38]
push 0
push eax
call sub.msvcrt.dll_memset
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x40]
add esp, 0x18
push eax
push 0x104
lea eax, [esp + 0x4f0]
push eax
movzx eax, word [edi + 0x1002709c]
push 0
push 0
push eax
push dword [esp + 0x30]
push ebx
call dword [0x100a83d4]
call dword [esp + 0x30]
test eax, eax
jne 0x10078e3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x490
je 0x10078e68
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x10078e68
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x10078e68
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10078e15
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10078e2e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10078e35
movzx esi, si
or esi, 0x80070000
jmp 0x10078e33
mov esi, 0x80004005
test esi, esi
js 0x10078f6c
jmp 0x10078e68
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
and dword [esp + 0x14], 0
lea edx, [esp + 0x4e8]
push eax
call fcn.10077161
mov esi, eax
test esi, esi
js 0x10078f6c
cmp dword [esp + 0x14], 0
jne 0x10078e79
add edi, 2
cmp edi, 0xa
jb 0x10078d81
jmp 0x10078f40
lea eax, [esp + 0xd4]
mov edx, 0x104
push eax
lea ecx, [esp + 0x2e4]
call fcn.10050582
mov esi, eax
jmp 0x10078f3c
mov ebx, dword [esp + 0x1c]
xor eax, eax
push eax
mov dword [esp + 0x14], eax
mov ecx, edi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
push 0x208
lea eax, [esp + 0x2ec]
push eax
lea eax, [esp + 0x24]
push eax
push 0x100224d0
push dword [esp + 0x30]
push 2
push ebx
call dword [0x100a83d4]
call edi
test eax, eax
jne 0x10078f30
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x490
je 0x10078f3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x10078f3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x10078f3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10078f10
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10078f29
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10078f3e
movzx esi, si
or esi, 0x80070000
jmp 0x10078f3c
mov esi, 0x80004005
jmp 0x10078f3c
cmp dword [esp + 0x14], 0x12
je 0x10078f3c
mov esi, 0x8000ffff
test esi, esi
js 0x10078f6c
cmp word [esp + 0x2e0], 0
mov eax, dword [esp + 0x18]
je 0x10078f56
lea eax, [esp + 0x2e0]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, dword [esp + 0x24]
mov dword [ecx], eax
test eax, eax
jne 0x10078f6c
mov esi, 0x8007000e
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10078f83
mov edi, dword [esp + 0x20]
mov ecx, edi
push eax
call dword [0x100a83d4]
call edi
mov ecx, dword [esp + 0x6f4]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1002bcc0
mov esp, ebp
pop ebp
ret 8