Function at 0x4977be
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x4e4bbc
call fcn.004d0500
sub esp, 0xab8
mov eax, dword [0x52d320]
push edi
mov edi, dword [ebp + 8]
xor eax, ebp
test edi, edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xaac], ecx
mov dword [ebp - 0xabc], edi
je 0x4977f7
push edi
call fcn.004a05e2
test al, al
pop ecx
jne 0x4977fe
xor al, al
jmp 0x497a6d
push ebx
push edi
call dword [0x4eaad0]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0xab0], ebx
jne 0x497819
xor al, al
jmp 0x497a6c
push esi
lea ecx, [ebp - 0x644]
call dword [0x4ea6d4]
mov esi, dword [0x4ea7b4]
and dword [ebp - 4], 0
lea eax, [ebp - 0x644]
push eax
push ebx
call esi
pop ecx
push eax
push ebx
call fcn.0044f54c
mov ecx, dword [ebp - 0xaac]
add esp, 0xc
push ebx
call fcn.004940f3
push eax
lea eax, [ebp - 0x218]
push eax
call dword [0x4eaad8]
lea eax, [ebp - 0x218]
push eax
call dword [0x4eaadc]
test eax, eax
je 0x497a18
and dword [ebp - 0x64c], 0
and dword [ebp - 0x648], 0
mov word [ebp - 0x650], 0x5c
push edi
lea ecx, [ebp - 0xaa8]
mov byte [ebp - 4], 1
call fcn.0049457c
lea ecx, [ebp - 0xaa8]
call fcn.00493f39
lea ecx, [ebp - 0xaa8]
mov edi, eax
mov dword [ebp - 0xac0], edx
call fcn.00493f77
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0xaa8]
call fcn.0049457c
lea ecx, [ebp - 0xaa8]
call fcn.00493f39
lea ecx, [ebp - 0xaa8]
mov dword [ebp - 0xab8], eax
mov dword [ebp - 0xab4], edx
call fcn.00493f77
cmp edi, dword [ebp - 0xab8]
jne 0x497961
mov eax, dword [ebp - 0xab4]
cmp dword [ebp - 0xac0], eax
jne 0x497961
lea ecx, [ebp - 0x644]
call dword [0x4ea4e0]
mov ecx, dword [ebp - 0xaac]
push eax
call fcn.00494f54
test eax, eax
jne 0x497937
lea ecx, [ebp - 0x644]
call dword [0x4ea4e0]
mov ecx, dword [ebp - 0xaac]
push eax
call fcn.00495a4e
lea ecx, [ebp - 0x644]
call dword [0x4ea4e0]
mov ecx, dword [ebp - 0xaac]
push eax
call fcn.00497706
lea ecx, [ebp - 0xaa8]
mov bl, al
call fcn.00493f77
jmp 0x497a59
push ebx
call esi
mov ebx, 0x4fc844
push ebx
mov edi, eax
call esi
sub edi, eax
push edi
push dword [ebp - 0xab0]
lea eax, [ebp - 0x628]
push eax
call dword [0x4ea86c]
and word [ebp + edi*2 - 0x628], 0
xor edi, edi
add esp, 0x14
inc edi
push ebx
push edi
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x420]
push str._s__d__s
push eax
call dword [0x4eac40]
add esp, 0x14
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x420]
push eax
call esi
pop ecx
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0044f54c
mov ecx, dword [ebp - 0xaac]
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
call fcn.004940f3
push eax
lea eax, [ebp - 0x218]
push eax
call dword [0x4eaad8]
lea eax, [ebp - 0x218]
push eax
inc edi
call dword [0x4eaadc]
test eax, eax
jne 0x497993
lea ecx, [ebp - 0xaa8]
mov byte [ebp - 4], al
call fcn.00493f77
mov edi, dword [ebp - 0xabc]
push 0
lea eax, [ebp - 0x218]
push eax
push edi
call dword [0x4ea36c]
test eax, eax
je 0x497a57
lea ecx, [ebp - 0x644]
call dword [0x4ea4e0]
mov esi, dword [ebp - 0xaac]
push eax
mov ecx, esi
call fcn.00495a4e
test al, al
jne 0x497a86
lea eax, [ebp - 0x218]
push eax
call dword [0x4ea364]
xor bl, bl
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x644]
call dword [0x4ea4dc]
mov al, bl
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
pop edi
call fcn.004d0557
leave
ret 4
lea ecx, [ebp - 0x644]
call dword [0x4ea4e0]
push eax
mov ecx, esi
call fcn.00497706
test al, al
je 0x497a57
mov ecx, esi
call fcn.004969cb
mov ecx, eax
call fcn.004a4d9d
push eax
push 2
push esi
lea ecx, [esi + 0x218]
call fcn.00494e9d
mov bl, 1
jmp 0x497a59