Function at 0x4e8710
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
lea esi, [eax + 1]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
sub esp, 0x18
mov edx, eax
test eax, eax
jle 0x4e8850
mov ecx, 8
lea eax, [edx + edx + 0x1e]
and eax, 0xfffffff0
call fcn.00593c80
sub esp, eax
lea edi, [esp + 0x27]
and edi, 0xfffffff0
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
sub esp, 0x18
test eax, eax
jne 0x4e8890
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 0x10], 0xa9
mov dword [esp + 0xc], str.bss_file.c
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 2
call fcn.004b2280
mov dword [esp + 0x14], 0x5fabd7
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x5fabda
mov dword [esp + 8], ebx
mov dword [esp + 4], str.fopen_
mov dword [esp], 5
call fcn.004b2a50
call sub.msvcrt.dll__errno
cmp dword [eax], 2
je 0x4e8980
mov dword [esp + 0x10], 0xae
mov dword [esp + 0xc], str.bss_file.c
mov dword [esp + 8], 2
mov dword [esp + 4], 0x6d
mov dword [esp], 0x20
call fcn.004b2280
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3ec
je 0x4e8940
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x459
jne 0x4e87a5
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
jne 0x4e88eb
jmp 0x4e87a5
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 0x14], 8
lea esi, [ebp - 0x28]
mov dword [esp + 0x10], esi
inc eax
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
sub esp, 0x18
test eax, eax
je 0x4e87a5
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.msvcrt.dll__wfopen
mov esi, eax
test eax, eax
je 0x4e89cd
mov dword [esp], 0x59dc80
call fcn.004a8650
mov ebx, eax
test eax, eax
je 0x4e89c0
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call fcn.004a89c0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x6a
mov dword [esp], ebx
call fcn.004a8f70
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
sub esp, 0x18
mov edx, eax
test eax, eax
jle 0x4e8860
xor ecx, ecx
jmp 0x4e8765
mov dword [esp + 0x10], 0xac
mov dword [esp + 0xc], str.bss_file.c
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], 0x6d
mov dword [esp], 0x20
call fcn.004b2280
xor ebx, ebx
jmp 0x4e883d
mov dword [esp], esi
call sub.msvcrt.dll_fclose
jmp 0x4e883d
call sub.msvcrt.dll__errno
cmp dword [eax], 2
je 0x4e8870
call sub.msvcrt.dll__errno
cmp dword [eax], 9
jne 0x4e87a5
jmp 0x4e8870