Function at 0x10002570
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10027049
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x100351e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0
call fcn.10001640
mov ecx, eax
test ecx, ecx
jne 0x100025bb
push 0x80004005
call fcn.10002390
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edi, dword [ebp + 8]
add eax, 0x10
mov dword [edi], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 1
test ecx, ecx
je 0x10002777
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
cmp eax, dword [esi + 4]
je 0x10002777
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [esi]
mov esi, dword [esi + 4]
mov dword [ebp - 0x20], eax
mov dword [ebp + 0x10], esi
cmp ebx, esi
je 0x10002777
nop dword [eax]
mov eax, dword [ebx]
mov ecx, dword [eax - 0x10]
lea edi, [eax - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x10002634
cmp ecx, dword [edi]
jne 0x10002634
lock inc dword [eax]
jmp 0x10002675
mov eax, dword [ecx]
lea edx, [edi + 4]
push 2
push dword [edx]
mov dword [ebp - 0x18], edx
call dword [eax]
mov edi, eax
test edi, edi
je 0x100027d2
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov dword [edi + 4], ecx
mov eax, dword [eax]
lea ecx, [eax*2 + 2]
push ecx
push dword [ebp - 0x1c]
lea eax, [eax*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.1000e700
add esp, 0x10
add edi, 0x10
mov dword [ebp - 0x30], edi
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x20]
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x1c], eax
mov eax, ecx
mov dword [ebp - 4], 1
lea edx, [ecx + edx*2]
mov dword [ebp - 0x2c], edx
cmp ecx, edx
ja 0x10002740
nop
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x1000273d
mov ecx, dword [ebp - 0x1c]
push 0x3a
add ecx, ecx
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x18], ecx
add ecx, eax
mov dword [ebp - 0x28], ecx
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov esi, eax
test esi, esi
je 0x10002731
cmp esi, dword [ebp + 0xc]
jbe 0x10002731
movzx eax, word [esi - 2]
sub esi, 2
push eax
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
je 0x10002731
call fcn.10001640
push eax
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
sub eax, esi
add eax, dword [ebp - 0x24]
sar eax, 1
push eax
push esi
call fcn.10001c20
mov esi, dword [ebp - 0x10]
push esi
mov byte [ebp - 4], 2
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1000278d
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10002731
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x2c]
jbe 0x100026a0
mov esi, dword [ebp + 0x10]
or ecx, 0xffffffff
mov eax, dword [ebp + 8]
add edi, 0xfffffff0
mov byte [ebp - 4], 0
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x100027be
mov eax, ecx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x10002769
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 4
cmp ebx, esi
jne 0x10002610
mov edi, dword [ebp + 8]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.10001fc0
or ecx, 0xffffffff
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ecx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100027b9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1000273d
mov esi, dword [ebp + 0x10]
jmp 0x10002743
lock xadd dword [edi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x10002774
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10002774
call fcn.100047f0
int3