Function at 0x100a9dd
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x1011584]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
and dword [ebp - 0x258], 0
mov dword [ebp - 0x28c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x280], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x268], eax
mov eax, dword [ebp + 0x28]
push esi
push edi
mov dword [ebp - 0x274], eax
mov eax, dword [ebp + 0x2c]
push ebx
mov dword [ebp - 0x278], ebx
mov dword [ebp - 0x270], eax
call fcn.01009171
and dword [ebp - 0x25c], 0
mov edi, eax
mov dword [ebp - 0x264], edi
sub edi, ebx
sar edi, 1
lea esi, [edi + 2]
push esi
lea eax, [ebp - 0x25c]
push eax
mov dword [ebp - 0x288], edi
mov dword [ebp - 0x27c], 1
call fcn.010091a8
test al, al
jne 0x100aa7d
push 8
pop esi
push esi
call fcn.0100e412
jmp 0x100ae4d
push edi
push ebx
push esi
push dword [ebp - 0x25c]
call sub.msvcrt.dll_wcsncpy_s
push 0x1002254
sub esi, edi
push esi
mov esi, dword [ebp - 0x25c]
lea eax, [esi + edi*2]
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0x1c
push esi
call fcn.01009171
mov dword [ebp - 0x284], eax
lea eax, [ebp - 0x254]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x26c], eax
cmp eax, 0xffffffff
jne 0x100aafc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x100aaf5
cmp esi, 5
je 0x100ae38
cmp esi, 0x20
je 0x100ae38
push esi
call fcn.0100e412
pop ecx
jmp 0x100ae38
xor esi, esi
jmp 0x100ae38
push 4
mov ebx, 0x1002260
pop esi
mov ecx, ebx
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100ab30
test dx, dx
je 0x100ab2c
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100ab30
add eax, esi
add ecx, esi
test dx, dx
jne 0x100ab0c
xor eax, eax
jmp 0x100ab35
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x100ade6
mov ecx, 0x1002258
lea eax, [ebp - 0x228]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100ab6c
test dx, dx
je 0x100ab68
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100ab6c
add eax, esi
add ecx, esi
test dx, dx
jne 0x100ab48
xor eax, eax
jmp 0x100ab71
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x100ade6
and dword [ebp - 0x260], 0
mov eax, dword [ebp - 0x264]
mov ecx, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100abac
test dx, dx
je 0x100aba8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100abac
add eax, esi
add ecx, esi
test dx, dx
jne 0x100ab88
xor eax, eax
jmp 0x100abb1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x100ac4d
mov eax, dword [ebp - 0x264]
mov ecx, 0x1002258
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100abe8
test dx, dx
je 0x100abe4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100abe8
add eax, esi
add ecx, esi
test dx, dx
jne 0x100abc4
xor eax, eax
jmp 0x100abed
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x100ac4d
lea eax, [ebp - 0x228]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100abfa
sub eax, edx
sar eax, 1
lea esi, [edi + eax + 1]
push esi
lea eax, [ebp - 0x260]
push eax
call fcn.010091a8
test al, al
je 0x100ae61
mov ebx, dword [ebp - 0x260]
push edi
push dword [ebp - 0x278]
push esi
push ebx
call sub.msvcrt.dll_wcsncpy_s
lea eax, [ebp - 0x228]
push eax
sub esi, edi
lea eax, [ebx + edi*2]
push esi
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0x1c
jmp 0x100ac64
push dword [ebp - 0x278]
call dword [sym.imp.msvcrt.dll__wcsdup]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x100ae61
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100ac69
sub eax, edx
sar eax, 1
cmp eax, 0x104
ja 0x100ae73
inc dword [0x10118fc]
lea eax, [ebp - 0x20]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100ac8e
sub eax, edx
sar eax, 1
je 0x100acc1
push dword [ebp - 0x270]
push dword [ebp - 0x268]
push dword [ebp + 0x10]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push ebx
push ebx
call dword [ebp - 0x280]
mov dword [ebp - 0x27c], eax
push ebx
call dword [sym.imp.msvcrt.dll_free]
cmp dword [ebp - 0x27c], 0
pop ecx
je 0x100ae91
test byte [ebp - 0x254], 0x10
je 0x100ade6
test dword [ebp - 0x254], 0x400
jne 0x100ade6
cmp dword [ebp + 0x1c], 0
je 0x100ade6
and dword [ebp - 0x260], 0
lea eax, [ebp - 0x228]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100ad0d
sub eax, edx
sar eax, 1
mov ecx, eax
mov eax, dword [ebp - 0x264]
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x100ad26
mov esi, dword [ebp - 0x284]
sub esi, dword [ebp - 0x25c]
sub eax, edx
sar eax, 1
sar esi, 1
add eax, esi
lea ebx, [eax + ecx + 2]
push ebx
lea eax, [ebp - 0x260]
push eax
call fcn.010091a8
test al, al
je 0x100ae61
mov edi, dword [ebp - 0x260]
push esi
push dword [ebp - 0x25c]
push ebx
push edi
call sub.msvcrt.dll_wcsncpy_s
lea eax, [ebp - 0x228]
push eax
mov eax, ebx
sub eax, esi
push eax
lea eax, [edi + esi*2]
push eax
call sub.msvcrt.dll_wcscpy_s
push 0x10012dc
push ebx
push edi
call sub.msvcrt.dll_wcscat_s
push dword [ebp - 0x264]
push ebx
push edi
call sub.msvcrt.dll_wcscat_s
add esp, 0x34
push dword [ebp - 0x270]
push dword [ebp - 0x274]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp - 0x268]
push dword [ebp - 0x280]
push dword [ebp + 0x10]
push edi
push dword [ebp - 0x28c]
call fcn.0100a9dd
push edi
mov dword [ebp - 0x258], eax
call dword [sym.imp.msvcrt.dll_free]
mov edi, dword [ebp - 0x288]
pop ecx
mov esi, dword [ebp - 0x258]
test esi, esi
je 0x100adfa
cmp esi, 5
je 0x100adfa
cmp esi, 0x20
jne 0x100ae15
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x26c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100aafc
cmp esi, 5
je 0x100ae1f
cmp esi, 0x20
jne 0x100ae26
and dword [ebp - 0x258], 0
push dword [ebp - 0x26c]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x258]
cmp dword [ebp - 0x25c], 0
je 0x100ae4e
push dword [ebp - 0x25c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100f411
leave
ret 0x28
push 8
pop esi
push esi
call fcn.0100e412
pop ecx
mov dword [ebp - 0x258], esi
jmp 0x100ae26
mov esi, dword [ebp - 0x274]
cmp dword [esi], 0
jne 0x100ae1f
push 0x40002842
call fcn.0100e4fd
pop ecx
mov dword [esi], 1
jmp 0x100ae1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x258], eax
jmp 0x100ae26