Function at 0x103140e
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x10edd8f
call fcn.01003440
sub esp, 0x34
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x10], edi
call fcn.0102ee5c
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], edi
call fcn.0102ee5c
mov eax, 0x400
mov byte [ebp - 4], 1
mov ebx, eax
mov byte [esi + 0x6c], 0
mov dword [ebp - 0x14], edi
push eax
lea ecx, [ebp - 0x2c]
call fcn.0102778c
mov edi, eax
test edi, edi
je 0x1056af2
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.0103f8bf
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp byte [ebp - 0x18], 0
mov edi, eax
jne 0x1056ad0
cmp edi, ebx
ja 0x1056adc
test edi, edi
je 0x1056b1f
push edi
lea ecx, [ebp - 0x2c]
call fcn.0102620d
cmp dword [ebp - 0x10], 0
jl 0x103156d
push dword [ebp - 0x28]
call fcn.0103f84b
test al, al
je 0x103156d
push dword [ebp - 0x28]
mov ecx, esi
call fcn.0103fc3c
test eax, eax
mov dword [ebp - 0x10], eax
jl 0x1056b65
call fcn.010315a5
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
push eax
call edi
pop ecx
mov dword [ebp + 8], eax
call fcn.0103fcf0
push eax
call edi
mov ebx, dword [esi + 0x60]
add ebx, 2
cmp dword [ebp + 8], eax
pop ecx
jbe 0x1031599
add ebx, dword [ebp + 8]
push ebx
lea ecx, [ebp - 0x40]
call fcn.0102778c
test eax, eax
mov dword [ebp + 8], eax
je 0x1056b8e
mov eax, dword [esi + 0x5c]
push ebx
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x1056bb0
cmp eax, ebx
ja 0x1031563
mov ebx, dword [ebp + 8]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
cmp eax, ebx
je 0x103153a
dec eax
dec eax
and word [eax], 0
mov byte [esi + 0x6f], 0
mov byte [esi + 0x6d], 0
mov byte [esi + 0x6e], 0
call fcn.010315a5
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
push eax
push ebx
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1056c23
mov byte [esi + 0x6d], 1
lea ecx, [ebp - 0x40]
push 0
call fcn.0102620d
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.0101a964
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.0101a964
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
add ebx, eax
jmp 0x10314f8
push 0
call fcn.0103f8e2
jmp 0x1031483
push 0
lea ecx, [ebp - 0x2c]
mov ebx, edi
call fcn.0102620d
and dword [ebp - 0x14], 0
push edi
jmp 0x103144b
mov eax, dword [0x11169c4]
cmp byte [eax + 0x19], 2
mov dword [ebp - 0x10], 0x8007000e
jb 0x103156d
push 0x106955c
push 0x1f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f4dc
jmp 0x103156d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x1056b2f
call edi
jmp 0x1056b3b
call edi
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x10], eax
mov eax, dword [0x11169c4]
cmp byte [eax + 0x19], 2
jb 0x1056b5e
push dword [ebp - 0x10]
push 0x106955c
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f624
push 0
jmp 0x1031494
mov eax, dword [0x11169c4]
cmp byte [eax + 0x19], 2
jb 0x103156d
push dword [ebp - 0x10]
push 0x106955c
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f624
jmp 0x103156d
mov eax, dword [0x11169c4]
cmp byte [eax + 0x19], 2
mov dword [ebp - 0x10], 0x8007000e
jb 0x103156d
push 0x106955c
push 0x22
jmp 0x1056b0f
call fcn.0103f904
test al, al
je 0x1056bde
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1056bde
push dword [esi + 0x5c]
push ebx
push dword [ebp + 8]
call fcn.01009f02
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
jne 0x1031522
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1056bee
call esi
jmp 0x1056bfa
call esi
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x10], eax
mov eax, dword [0x11169c4]
cmp byte [eax + 0x19], 2
jb 0x1031563
push 0x106955c
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0106f4dc
jmp 0x1031563
call fcn.0103fcf0
push eax
push ebx
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1056c3b
mov byte [esi + 0x6e], 1
jmp 0x1031563
mov byte [esi + 0x6f], 1
jmp 0x1031563