Function at 0x418e60
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
cmp edi, 1
je 0x418fa0
cmp edi, 2
je 0x418f96
test edi, edi
je 0x418eb0
test byte [0x504120], 0x80
mov esi, dword [sym.imp.msvcrt.dll__errno]
jne 0x418fd4
call esi
mov dword [eax], 0x16
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, 0x80000000
mov eax, 0x4c72c0
call fcn.00416f40
test eax, eax
mov edi, eax
je 0x419392
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
je 0x419130
mov esi, dword [edi + 4]
mov eax, 0xffffffff
test esi, esi
je 0x418f25
cmp edi, 0x4ff620
jae 0x418fb0
mov dword [esp + 0xc], eax
lea eax, [edi + 0x18]
mov dword [esp + 0x10], ebx
mov dword [esp + 8], str._d__s_
mov dword [esp + 4], 0x20
mov dword [esp], eax
call fcn.004186c0
test byte [0x504120], 0x80
jne 0x419060
mov edx, dword [edi + 4]
mov eax, 0xffffffff
test edx, edx
je 0x418ea5
cmp edi, 0x4ff620
jb 0x418ea5
cmp edi, 0x501220
jae 0x418ea5
mov edx, edi
sub edx, 0x4ff620
sar edx, 3
imul edx, edx, 0xb6db6db7
lea eax, [edx + 0x64]
jmp 0x418ea5
mov esi, 0xc0000000
jmp 0x418eb5
mov esi, 0x40000000
jmp 0x418eb5
cmp edi, 0x501220
jae 0x418f25
mov eax, edi
sub eax, 0x4ff620
sar eax, 3
imul eax, eax, 0xb6db6db7
add eax, 0x64
jmp 0x418f25
call esi
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_open
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416f10
call esi
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], edi
mov dword [esp + 4], str.adb_open:_invalid_options__0x_0x__n
add eax, 0x40
mov dword [esp], eax
call fcn.00416f10
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov dword [eax], ebx
jmp 0x418e98
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov eax, dword [eax]
mov dword [esp], 0x504108
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [edx + 0x40]
sub esp, 4
mov dword [esp + 0xc], str.adb_open
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416f10
call esi
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
mov ecx, dword [edi + 4]
mov eax, 0xffffffff
test ecx, ecx
je 0x4190e0
cmp edi, 0x4ff620
jb 0x4190e0
cmp edi, 0x501220
jae 0x4190e0
mov eax, edi
sub eax, 0x4ff620
sar eax, 3
imul eax, eax, 0xb6db6db7
add eax, 0x64
lea esi, [esi]
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.adb_open:__s___fd__d_n
add eax, 0x40
mov dword [esp], eax
call fcn.00416f10
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
jmp 0x418f55
mov eax, dword [edi + 4]
test eax, eax
jne 0x419335
test byte [0x504120], 0x80
mov esi, dword [sym.imp.msvcrt.dll__errno]
jne 0x4192b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x419220
cmp eax, 3
jne 0x419200
test byte [0x504120], 0x80
je 0x4191eb
call esi
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_open
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416f10
call esi
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.path_not_found_n
add eax, 0x40
mov dword [esp], eax
call fcn.00416f10
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov dword [eax], ebx
call esi
mov dword [eax], 0x14
mov eax, 0xffffffff
jmp 0x418ea5
test byte [0x504120], 0x80
jne 0x419345
call esi
mov dword [eax], 2
mov eax, 0xffffffff
jmp 0x418ea5
test byte [0x504120], 0x80
je 0x41920d
call esi
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_open
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416f10
call esi
mov dword [eax], ebx
mov dword [esp + 4], str.file_not_found_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00416f10
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov dword [eax], ebx
jmp 0x41920d
call esi
mov edi, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_open
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416f10
call esi
mov dword [eax], edi
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.adb_open:_could_not_open__s:
add eax, 0x40
mov dword [esp], eax
call fcn.00416f10
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov dword [eax], edi
jmp 0x41914e
mov eax, edi
call fcn.00417f00
lea esi, [esi]
jmp 0x41913b
call esi
mov ebx, dword [eax]
mov dword [esp], 0x504108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
sub esp, 4
mov dword [esp + 0xc], str.adb_open
mov dword [esp + 8], str.system_core_adb_sysdeps_win32.c
mov dword [esp + 4], str._s::_s__:
mov dword [esp], eax
call fcn.00416f10
call esi
mov dword [eax], ebx
mov dword [esp + 4], str.unknown_error_n
jmp 0x419271
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
mov eax, 0xffffffff
jmp 0x418ea5