Function at 0x421010
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
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], 0xfde9
lea edi, [eax + 1]
mov dword [esp + 0xc], edi
call esi
mov ecx, 8
sub esp, 0x18
test eax, eax
mov edx, eax
jle 0x421152
lea eax, [edx + edx + 0x1e]
and eax, 0xfffffff0
call fcn.004b0d60
sub esp, eax
lea eax, [esp + 0x27]
mov dword [ebp - 0x2c], eax
and dword [ebp - 0x2c], 0xfffffff0
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], ecx
mov dword [esp], 0xfde9
call esi
sub esp, 0x18
test eax, eax
jne 0x421190
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ecx
mov dword [esp + 0x10], 0xa9
mov dword [esp + 0xc], 0x4c76a0
mov dword [esp + 4], 1
mov dword [esp], 2
mov dword [esp + 8], eax
call fcn.00429800
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0x4c76c7
mov dword [esp + 0xc], 0x4c76ca
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], str.fopen_
mov dword [esp], 5
call fcn.00429e50
call edi
cmp dword [eax], 2
je 0x421286
mov dword [esp + 0x10], 0xae
mov dword [esp + 0xc], 0x4c76a0
mov dword [esp + 8], 2
mov dword [esp + 4], 0x6d
mov dword [esp], 0x20
call fcn.00429800
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], ecx
call ecx
mov ecx, dword [ebp - 0x2c]
cmp eax, 0x3ec
je 0x421246
mov dword [ebp - 0x2c], ecx
call ecx
cmp eax, 0x459
je 0x4212d0
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [ebp - 0x2c]
jmp 0x4210b8
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea edx, [ebp - 0x28]
mov dword [esp + 0x10], edx
mov dword [ebp - 0x30], edx
mov dword [esp + 0x14], 8
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
add eax, 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
call esi
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [ebp - 0x30]
sub esp, 0x18
test eax, eax
je 0x4210b2
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov esi, eax
je 0x4212b9
mov dword [esp], 0x4be4a0
call fcn.00422320
test eax, eax
mov ebx, eax
je 0x421300
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.00422470
mov dword [esp + 0xc], esi
mov dword [esp], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x6a
call fcn.004229d0
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call esi
mov ecx, dword [ebp - 0x2c]
sub esp, 0x18
test eax, eax
mov edx, eax
jle 0x42116b
xor ecx, ecx
jmp 0x421068
mov dword [esp + 0x10], 0xac
mov dword [esp + 0xc], 0x4c76a0
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], 0x6d
mov dword [esp], 0x20
call fcn.00429800
xor eax, eax
jmp 0x42114a
call edi
cmp dword [eax], 2
nop
je 0x4212d0
call edi
cmp dword [eax], 9
jne 0x4210b2
lea esi, [esi]
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov esi, eax
jne 0x4211fa
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.msvcrt.dll__errno]
jmp 0x4210b8
mov dword [esp], esi
call sub.msvcrt.dll_fclose
xor eax, eax
jmp 0x42114a