Function at 0x1000a790
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
xor esi, esi
push edi
mov edi, eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
cmp eax, esi
je 0x1000a7ba
mov dword [eax], esi
push edi
call fcn.1000ba90
add esp, 4
mov dword [ebp - 0x24], eax
cmp eax, esi
jne 0x1000a7da
push edi
push str.FileRotateByRenumber
push str.FILE:__s:_failed_to_get_full_path_for__s._n
jmp 0x1000a9c4
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 4]
push edx
push eax
call sym.vmtools.dll_File_GetPathName
mov eax, dword [ebp - 4]
add esp, 0xc
cmp byte [eax], bl
je 0x1000a9b9
mov eax, dword [ebp - 0x10]
cmp byte [eax], bl
je 0x1000a9b9
mov ecx, dword [ebp + 0xc]
push ecx
push eax
push str._s___d_s__n
push esi
call sym.vmtools.dll_Str_SafeAsprintf
lea edx, [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
push edx
push eax
call sym.vmtools.dll_File_ListDirectory
mov edi, eax
add esp, 0x18
cmp edi, 0xffffffff
jne 0x1000a83e
mov ecx, dword [ebp - 4]
push ecx
push str.FileRotateByRenumber
push str.FILE:__s:_failed_to_read_the_directory__s._n
jmp 0x1000a9c4
push 4
push edi
call sym.vmtools.dll_UtilSafeCalloc0
add esp, 8
mov dword [ebp - 8], eax
test edi, edi
jle 0x1000a8ce
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
push edx
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x18], 0
mov eax, dword [edx + esi*4]
push ecx
push eax
call dword [sym.imp.MSVCR90.dll_sscanf]
add esp, 0x10
cmp eax, 1
jl 0x1000a899
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + esi*4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1000a881
sub eax, edx
cmp dword [ebp - 0x18], eax
jne 0x1000a899
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov dword [eax + ebx*4], edx
inc ebx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + esi*4]
push edx
call dword [sym.imp.MSVCR90.dll_free]
inc esi
add esp, 4
cmp esi, edi
jl 0x1000a850
test ebx, ebx
jle 0x1000a8ce
mov esi, dword [ebp - 8]
push 0x1000a780
push 4
push ebx
push esi
call dword [sym.imp.MSVCR90.dll_qsort]
mov eax, dword [esi + ebx*4 - 4]
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 4]
inc edx
push edx
push eax
push ecx
push str._s__s__d_s
push 0
call sym.vmtools.dll_Str_SafeAsprintf
mov edx, dword [ebp + 8]
mov esi, eax
push esi
push edx
call fcn.10016370
mov edi, eax
add esp, 0x20
cmp edi, 0xffffffff
jne 0x1000a92a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1000a92a
push eax
call sym.vmtools.dll_Err_Errno2String
push eax
mov eax, dword [ebp + 8]
push esi
push eax
push str.FileRotateByRenumber
push str.FILE:__s:_failed_to_rename__s_____s_failed:__s_n
call sym.vmtools.dll_Log
add esp, 0x18
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1000a940
cmp edi, 0xffffffff
je 0x1000a940
mov dword [eax], esi
mov esi, dword [sym.imp.MSVCR90.dll_free]
jmp 0x1000a94c
push esi
mov esi, dword [sym.imp.MSVCR90.dll_free]
call esi
add esp, 4
mov eax, dword [ebp + 0x10]
cmp ebx, eax
jl 0x1000a9d2
xor edi, edi
sub ebx, eax
js 0x1000a9d2
lea esp, [esp]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [edx + edi*4]
mov edx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp - 0x10]
push eax
push ecx
push edx
push str._s__s__d_s
push 0
call sym.vmtools.dll_Str_SafeAsprintf
mov esi, eax
push esi
call fcn.10016440
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x1000a9a8
call sym.vmtools.dll_Err_ErrString
push eax
push esi
push str.FileRotateByRenumber
push str.FILE:__s:_failed_to_remove__s:__s_n
call sym.vmtools.dll_Log
add esp, 0x10
push esi
call dword [sym.imp.MSVCR90.dll_free]
inc edi
add esp, 4
cmp edi, ebx
jle 0x1000a960
jmp 0x1000a9cc
push edi
push str.FileRotateByRenumber
push str.FILE:__s:_failed_to_get_base_dir_for_path__s._n
call sym.vmtools.dll_Log
add esp, 0xc
mov esi, dword [sym.imp.MSVCR90.dll_free]
mov eax, dword [ebp - 8]
push eax
call esi
mov ecx, dword [ebp - 0xc]
push ecx
call esi
mov edx, dword [ebp - 0x14]
push edx
call esi
mov eax, dword [ebp - 4]
push eax
call esi
mov ecx, dword [ebp - 0x10]
push ecx
call esi
mov edx, dword [ebp - 0x24]
push edx
call esi
add esp, 0x18
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret