Function at 0x5ba7bdab
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x5bb70c3c]
and dword [ebp - 0x20c], 0
and dword [ebp - 0x218], 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x220], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x210], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x228], eax
je 0x5ba7bdfe
mov dword [eax], 1
mov al, byte [edi + 0x41]
test al, al
je 0x5ba7be25
cmp al, 3
je 0x5ba7be25
lea eax, [ebp - 0x104]
push eax
push edi
call fcn.5baf525b
test eax, eax
mov dword [ebp - 0x20c], eax
jge 0x5ba7be2c
jmp 0x5ba7bfeb
mov byte [ebp - 0x104], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
push 0x5ba47920
call ebx
mov esi, eax
lea eax, [ebp - 0x104]
push eax
call ebx
push dword [edi + 0x10]
add esi, eax
call ebx
lea esi, [esi + eax + 1]
push esi
call sub.MSOERT2.dll_PszAllocA
test eax, eax
mov dword [ebp - 0x214], eax
jne 0x5ba7be70
mov dword [ebp - 0x20c], 0x8007000e
jmp 0x5ba7bfb5
cmp byte [ebp - 0x104], 0
mov eax, 0x5ba47920
jne 0x5ba7be83
mov eax, 0x5ba4cc94
push dword [edi + 0x10]
push eax
lea eax, [ebp - 0x104]
push eax
push 0x5ba479bc
push esi
push dword [ebp - 0x214]
call sub.SHLWAPI.dll_wnsprintfA
add esp, 0x18
push dword [ebp - 0x214]
mov dword [ebp - 0x224], eax
push 0
call sub.MSOERT2.dll_CleanupFileNameInPlaceA
cmp dword [ebp - 0x210], 0
mov esi, 0x5ba4e95c
je 0x5ba7bf22
push esi
call ebx
mov ecx, dword [ebp - 0x224]
lea ebx, [eax + ecx + 1]
push ebx
call sub.MSOERT2.dll_PszAllocA
test eax, eax
mov dword [ebp - 0x218], eax
je 0x5ba7be61
push esi
push dword [ebp - 0x214]
push 0x5ba44cdc
push ebx
push eax
call sub.SHLWAPI.dll_wnsprintfA
add esp, 0x14
push dword [ebp - 0x210]
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x5ba7bf22
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x5ba7bfb5
and dword [eax], 0
jmp 0x5ba7bfb5
push dword [ebp + 0x14]
push dword [ebp - 0x21c]
push esi
push dword [ebp - 0x214]
push dword [ebp - 0x220]
call sub.MSOERT2.dll_GenerateUniqueFileName
test eax, eax
mov dword [ebp - 0x20c], eax
jge 0x5ba7bfb5
mov edi, dword [edi + 8]
push esi
mov dword [ebp - 0x210], edi
push edi
mov ebx, 0x5ba479b4
mov edi, 0x104
jmp 0x5ba7bf7a
push dword [ebp - 0x21c]
call sub.SHLWAPI.dll_PathFileExistsA
test eax, eax
je 0x5ba7bfb5
inc dword [ebp - 0x210]
push esi
push dword [ebp - 0x210]
push ebx
lea eax, [ebp - 0x208]
push edi
push eax
call sub.SHLWAPI.dll_wnsprintfA
add esp, 0x14
push dword [ebp + 0x14]
lea eax, [ebp - 0x208]
push dword [ebp - 0x21c]
push 0x5ba4cc94
push eax
push dword [ebp - 0x220]
call fcn.5ba572e2
test eax, eax
mov dword [ebp - 0x20c], eax
jge 0x5ba7bf5e
cmp dword [ebp - 0x214], 0
pop esi
pop ebx
je 0x5ba7bfd1
mov eax, dword [0x5bb73714]
push dword [ebp - 0x214]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
cmp dword [ebp - 0x218], 0
je 0x5ba7bfeb
mov eax, dword [0x5bb73714]
push dword [ebp - 0x218]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x20c]
pop edi
call fcn.5bb3f314
leave
ret 0x18