Function at 0x4105b4
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
sub esp, 0x730
mov dword [ebp - 0x708], eax
mov esi, edx
movzx eax, byte [ebp + 8]
mov dword [0x698fa0], ebx
mov byte [ebp - 0x709], al
mov eax, dword [0x697040]
test eax, eax
jne 0x4106a0
mov eax, dword [0x697030]
test eax, eax
jne 0x410634
mov dword [esp], 1
call sub.KERNEL32.dll_SetLastError
sub esp, 4
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
lea edi, [ebx - 0x10]
je 0x41060e
lea edi, [ebx - 8]
xor eax, eax
test edi, edi
mov dword [0x698fa0], eax
je 0x410626
cmp byte [ebp - 0x709], 0
jne 0x410873
xor eax, eax
test edi, edi
setne al
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
mov eax, 0x94
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xa8]
mov dword [esp], eax
call sub.KERNEL32.dll_GetVersionExA
sub esp, 4
test eax, eax
je 0x4105ef
cmp dword [ebp - 0x98], 2
jne 0x4105ef
mov dword [esp + 8], esi
mov eax, 0x105
mov edx, 8
mov dword [esp + 0x14], eax
mov ecx, 0xffffffff
lea eax, [ebp - 0x4c8]
mov dword [esp + 4], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov dword [esp], 0
call sub.KERNEL32.dll_MultiByteToWideChar
sub esp, 0x18
xor edx, edx
test eax, eax
jne 0x4106c5
mov eax, edx
jmp 0x4106b8
mov dword [esp], esi
xor edx, edx
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x708]
mov dword [esp + 4], edx
call eax
sub esp, 0xc
test eax, eax
jne 0x41060e
jmp 0x4105fe
xor eax, eax
mov edx, dword [ebp - 0x708]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, 3
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, 7
mov dword [esp + 8], eax
mov eax, 0x100
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x710], eax
sub esp, 0x1c
xor edx, edx
inc eax
je 0x41069b
lea eax, [ebp - 0x6fc]
mov esi, 0x104
lea edx, [ebp - 0x4c8]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x6d8]
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
call sub.KERNEL32.dll_GetFullPathNameW
mov dword [ebp - 0x714], eax
sub esp, 0x10
xor edx, edx
test eax, eax
je 0x41069b
mov edx, 5
lea eax, [eax + eax + 2]
xor ecx, ecx
mov dword [ebp - 0x6f8], edx
xor edx, edx
xor esi, esi
mov dword [ebp - 0x714], eax
mov dword [ebp - 0x6ec], edx
lea edx, [ebp - 0x700]
mov dword [ebp - 0x6f0], eax
xor eax, eax
mov dword [esp + 0x18], edx
mov edx, dword [ebp - 0x710]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x704]
mov dword [ebp - 0x700], ecx
xor ecx, ecx
mov dword [ebp - 0x6f4], esi
mov esi, 0x14
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x6f8]
mov dword [ebp - 0x6e8], ecx
mov dword [esp + 8], esi
mov dword [esp], edx
mov dword [esp + 4], eax
call dword [0x697030]
xor edx, edx
xor ecx, ecx
sub esp, 0x1c
mov dword [esp + 0x10], edx
mov esi, eax
lea eax, [ebp - 0x700]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x714]
lea edx, [ebp - 0x704]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x6d8]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x710]
mov dword [esp + 0x14], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x697030]
lea edx, [ebp - 0x700]
sub esp, 0x1c
and esi, eax
mov dword [esp + 0x18], edx
xor eax, eax
mov edx, dword [ebp - 0x710]
mov dword [esp + 0x14], eax
mov eax, 1
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x704]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp], edx
mov dword [esp + 4], eax
call dword [0x697030]
and esi, eax
mov eax, dword [ebp - 0x710]
sub esp, 0x1c
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov edx, esi
sub esp, 4
mov eax, edx
jmp 0x4106b8
mov eax, dword [edi]
mov dword [esp], 0x503be1
mov dword [esp + 4], eax
call fcn.004396a0
lea esi, [esi]