Function at 0x1002078
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e4
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 0xc], 1
call fcn.0100202e
push 0x100127c
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x2e4]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
xor edi, edi
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x10020df
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x10021b5
call esi
cmp eax, 3
je 0x10021b5
mov dword [ebp - 0xc], edi
jmp 0x10021b5
push ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
call esi
push 0x1001270
mov dword [ebp - 4], eax
call esi
mov ecx, dword [ebp - 4]
add ecx, eax
lea eax, [ebp - 0x2b8]
push eax
mov dword [ebp - 4], ecx
call esi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 1]
cmp eax, 0x208
jge 0x10022eb
lea eax, [ebp - 0x2b8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
test byte [ebp - 0x2e4], 0x10
je 0x10021d3
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x100126c
lea eax, [ebp - 0x2b8]
push eax
call esi
test eax, eax
je 0x10022eb
push 0x1001264
lea eax, [ebp - 0x2b8]
push eax
call esi
test eax, eax
je 0x10022eb
mov esi, dword [ebp + 0x14]
cmp esi, edi
je 0x1002198
jmp 0x1002193
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10022eb
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp word [esi], di
jne 0x1002176
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01002078
test eax, eax
jne 0x10022eb
mov dword [ebp - 0xc], edi
pop ebx
cmp dword [ebp - 8], 0xffffffff
mov eax, dword [ebp - 0x10]
mov word [eax], di
pop edi
pop esi
je 0x10021cc
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0xc]
leave
ret 0x10
mov eax, dword [ebp - 0x2c4]
add dword [0x100a9cc], eax
cmp dword [ebp + 0x10], edi
je 0x10022eb
lea eax, [ebp - 0x2b8]
xor esi, esi
push eax
inc esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 6
jl 0x1002233
push 6
lea eax, [ebp - 0x2b8]
push eax
push 6
push 0x1001254
push esi
push 0x400
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
jne 0x1002233
xor eax, eax
cmp dword [0x100a9c4], edi
setne al
mov esi, eax
cmp esi, edi
je 0x10022eb
cmp dword [0x100b0b0], edi
mov eax, dword [ebp - 0x2c4]
je 0x100224a
cmp eax, 0x800
ja 0x100224a
xor esi, esi
cmp esi, edi
je 0x10022eb
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x44]
push eax
push edi
push 0x104d
push dword [ebp + 0x10]
mov dword [ebp - 0x44], 0xd
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], 3
mov dword [ebp - 0x30], ecx
call ebx
mov esi, eax
mov eax, dword [ebp - 0x2c4]
cmp eax, 0x400
ja 0x1002295
xor eax, eax
inc eax
jmp 0x1002298
shr eax, 0xa
push eax
push 0x100ac00
lea eax, [ebp - 0x94]
push 0x28
push eax
call fcn.01003483
lea eax, [ebp - 0x94]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c4]
add esp, 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x44]
push eax
push edi
push 0x104c
push dword [ebp + 0x10]
mov dword [ebp - 0x44], 9
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], 3
call ebx
lea eax, [ebp - 0x2e4]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10020e6
jmp 0x10021b4