Function at 0x4174e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov eax, 0x4b36a8
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
call fcn.00415660
test eax, eax
mov edi, eax
je 0x41795a
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x40000000
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
je 0x4176c0
mov esi, dword [edi + 4]
mov eax, 0xffffffff
test esi, esi
jne 0x4175b8
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.0049e4c0
test byte [0x4ee060], 0x80
jne 0x4175e0
mov edx, dword [edi + 4]
mov eax, 0xffffffff
test edx, edx
je 0x4175b0
cmp edi, 0x4ee460
jb 0x4175b0
cmp edi, 0x4f0060
jae 0x4175b0
mov edx, edi
sub edx, 0x4ee460
sar edx, 3
imul edx, edx, 0xb6db6db7
lea eax, [edx + 0x64]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp edi, 0x4ee460
jb 0x417554
cmp edi, 0x4f0060
jae 0x417554
mov eax, edi
sub eax, 0x4ee460
sar eax, 3
imul eax, eax, 0xb6db6db7
add eax, 0x64
jmp 0x417554
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov eax, dword [eax]
mov dword [esp], 0x4ee068
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x20], eax
call sub.msvcrt.dll__getpid
mov ecx, dword [ebp - 0x20]
mov dword [esp + 8], str.adb_creat
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0x10], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], eax
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049e490
call esi
mov edx, dword [ebp - 0x1c]
mov dword [eax], edx
mov ecx, dword [edi + 4]
mov eax, 0xffffffff
test ecx, ecx
je 0x417670
cmp edi, 0x4ee460
jb 0x417670
cmp edi, 0x4f0060
jae 0x417670
mov eax, edi
sub eax, 0x4ee460
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_creat:__s___fd__d_n
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov edx, dword [ebp - 0x1c]
mov dword [eax], edx
jmp 0x417580
mov eax, dword [edi + 4]
test eax, eax
jne 0x4178f0
test byte [0x4ee060], 0x80
mov esi, dword [sym.imp.msvcrt.dll__errno]
jne 0x417857
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4177c0
cmp eax, 3
jne 0x4177a0
test byte [0x4ee060], 0x80
je 0x41778c
call esi
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.adb_creat
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
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.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
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 0x4175b0
test byte [0x4ee060], 0x80
jne 0x417900
call esi
mov dword [eax], 2
mov eax, 0xffffffff
jmp 0x4175b0
test byte [0x4ee060], 0x80
je 0x4177ad
call esi
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.adb_creat
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
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.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov dword [eax], ebx
jmp 0x4177ad
call esi
mov edi, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x1c], eax
call sub.msvcrt.dll__getpid
mov edx, dword [ebp - 0x1c]
mov dword [esp + 8], str.adb_creat
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
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_creat:_could_not_open__s:
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov dword [eax], edi
jmp 0x4176de
mov eax, edi
call fcn.00414dd0
jmp 0x4176cb
call esi
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.adb_creat
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call esi
mov dword [eax], ebx
mov dword [esp + 4], str.unknown_error_n
jmp 0x41781e
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
mov eax, 0xffffffff
jmp 0x4175b0