Function at 0x1002ec80
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10163bc5
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2044
call fcn.10148b90
mov eax, dword [0x10438fc0]
xor eax, esp
mov dword [esp + 0x2040], eax
push ebx
push esi
push edi
mov eax, dword [0x10438fc0]
xor eax, esp
push eax
lea eax, [esp + 0x2058]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
dec eax
mov edi, ecx
mov dword [esp + 0x14], edi
cmp eax, 4
ja case.default.0x1002ecd8
jmp dword [eax*4 + 0x1002f59c]
cmp dword [edi + 0x58], 0
jg case.0x1002ecd8.4
mov eax, dword [edi + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je case.0x1002ecd8.4
mov eax, dword [edi + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1002ed12
lea eax, [edi + 0x60]
call fcn.1002ec50
test al, al
jne case.default.0x1002ecd8
xor al, al
jmp 0x1002f500
lea eax, [edi + 0x60]
call fcn.1002ec50
test al, al
je 0x1002ed12
lea eax, [edi + 0x38]
call fcn.1002ec50
test al, al
je 0x1002ed12
xor edi, edi
push edi
push edi
push edi
lea esi, [esp + 0x1c]
mov dword [esp + 0x1c], edi
call fcn.100163a0
mov esi, dword [esp + 0x14]
mov dword [esp + 0x2060], edi
mov eax, dword [esi]
push eax
push str._s..rd.lock
lea edx, [esp + 0x18]
call fcn.10016c90
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x18]
add esp, 8
lea ebx, [esp + 0x44]
mov dword [esp + 0x44], 0xffffffff
mov byte [esp + 0x298], 1
call fcn.10023da0
mov byte [esp + 0x2060], 1
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esp + 0x44]
cmp eax, 0xffffffff
je 0x1002ee80
cmp byte [esp + 0x298], 0
je 0x1002edab
mov al, 1
jmp 0x1002edbc
lea ecx, [esp + 0x48]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
setne al
mov byte [esp + 0x298], 0
test al, al
je 0x1002ee80
lea edx, [esp + 0x4a2]
push edx
lea eax, [esp + 0x29e]
push eax
call ebx
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x29e]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
lea edi, [esp + 0x29e]
lea eax, [esp + 0x1c]
call fcn.100164f0
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x28]
test esi, esi
je 0x1002ee25
test eax, eax
je 0x1002ee25
push eax
push esi
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x1002ee30
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1002ee5e
test esi, esi
je 0x1002ed90
lea ecx, [esi - 0xc]
test ecx, ecx
je 0x1002ed90
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x1002ed90
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
jmp 0x1002ed90
lea eax, [esp + 0x18]
call fcn.100164d0
lea esi, [esp + 0x44]
call fcn.10023d60
lea eax, [esp + 0x10]
call fcn.100164d0
xor al, al
jmp 0x1002f500
lea esi, [esp + 0x44]
call fcn.10023d80
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + 4]
mov edx, str._gdb..rd.lock
lea ebx, [esp + 0x137c]
mov dword [esp + 0x137c], 0xffffffff
mov byte [esp + 0x15d0], 1
call fcn.10023da0
mov esi, ebx
call fcn.10023ed0
test al, al
je 0x1002eed8
mov eax, ebx
call fcn.10023f10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1002eed8
call fcn.10023d60
jmp 0x1002ee67
lea esi, [esp + 0x137c]
call fcn.10023d80
call fcn.10023d60
lea esi, [esp + 0x44]
call fcn.10023d60
lea eax, [esp + 0x10]
mov dword [esp + 0x2060], 0xffffffff
call fcn.100164d0
jmp case.default.0x1002ecd8
mov ecx, dword [edi + 4]
mov edx, str._gdb..rd.lock
lea ebx, [esp + 0x6ac]
mov dword [esp + 0x6ac], 0xffffffff
mov byte [esp + 0x900], 1
call fcn.10023da0
mov esi, ebx
mov dword [esp + 0x2060], 2
call fcn.10023ed0
test al, al
je 0x1002ef66
mov eax, ebx
call fcn.10023f10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1002ef66
call fcn.10023d60
xor al, al
jmp 0x1002f500
mov eax, dword [esp + 0x6ac]
or esi, 0xffffffff
cmp eax, esi
je 0x1002ef86
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x1002ef86
mov dword [esp + 0x6ac], esi
mov edx, dword [edi + 0xc]
mov ecx, dword [edi + 4]
lea ebx, [esp + 0x44]
mov dword [esp + 0x44], esi
mov byte [esp + 0x298], 1
call fcn.10023da0
mov byte [esp + 0x2060], 3
mov ecx, dword [esp + 0x44]
cmp ecx, 0xffffffff
je 0x1002f170
cmp byte [esp + 0x298], 0
je 0x1002efc4
mov al, 1
jmp 0x1002efd9
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, dword [esp + 0x44]
test eax, eax
setne al
mov byte [esp + 0x298], 0
test al, al
je 0x1002f158
lea ecx, [esp + 0x4a2]
push ecx
lea edx, [esp + 0x29e]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x29e]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
lea edi, [esp + 0x29e]
lea eax, [esp + 0x20]
call fcn.100164f0
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x64]
test edi, edi
je 0x1002f06e
test eax, eax
je 0x1002f06e
mov ebx, dword [sym.imp.MSVCR100.dll__wcsicmp]
push eax
push edi
call ebx
add esp, 8
test eax, eax
jne 0x1002f074
lea edx, [edi - 0xc]
test edx, edx
je 0x1002efa9
dec dword [edi - 0xc]
lea eax, [edi - 0xc]
jne 0x1002efa9
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
jmp 0x1002efa9
mov ebx, dword [sym.imp.MSVCR100.dll__wcsicmp]
mov eax, dword [esi + 0x14]
test edi, edi
je 0x1002f091
test eax, eax
je 0x1002f091
push eax
push edi
call ebx
add esp, 8
test eax, eax
jne 0x1002f091
lea eax, [edi - 0xc]
test eax, eax
jmp 0x1002f04d
mov eax, dword [esi + 0x28]
test edi, edi
je 0x1002f0ae
test eax, eax
je 0x1002f0ae
push eax
push edi
call ebx
add esp, 8
test eax, eax
jne 0x1002f0ae
lea ecx, [edi - 0xc]
test ecx, ecx
jmp 0x1002f04d
mov eax, dword [esi + 0x3c]
test edi, edi
je 0x1002f0c4
test eax, eax
je 0x1002f0c4
push eax
push edi
call ebx
add esp, 8
test eax, eax
je 0x1002f048
mov eax, dword [esi + 0x50]
test edi, edi
je 0x1002f0e4
test eax, eax
je 0x1002f0e4
push eax
push edi
call ebx
add esp, 8
test eax, eax
jne 0x1002f0e4
lea eax, [edi - 0xc]
test eax, eax
jmp 0x1002f04d
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1002f101
test edi, edi
je 0x1002efa9
lea ecx, [edi - 0xc]
test ecx, ecx
jmp 0x1002f04d
test edi, edi
je 0x1002f11e
lea edx, [edi - 0xc]
test edx, edx
je 0x1002f11e
dec dword [edi - 0xc]
lea eax, [edi - 0xc]
jne 0x1002f11e
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [esp + 0x44]
cmp eax, 0xffffffff
je 0x1002f13a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x1002f13a
mov dword [esp + 0x44], 0xffffffff
mov eax, dword [esp + 0x6ac]
cmp eax, 0xffffffff
je 0x1002ee79
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor al, al
jmp 0x1002f500
cmp ecx, 0xffffffff
je 0x1002f170
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x1002f170
mov dword [esp + 0x44], 0xffffffff
mov dword [esp + 0x2060], 0xffffffff
mov eax, dword [esp + 0x6ac]
cmp eax, 0xffffffff
je case.default.0x1002ecd8
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x1002f4fe
push str._gdb
push eax
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x1002f4fe
mov eax, dword [ebp + 8]
cmp eax, 3
je 0x1002ed12
cmp eax, 2
je 0x1002ed12
cmp eax, 1
jne 0x1002f4fe
push 0
mov edi, str..wr.lock
lea eax, [esp + 0x24]
call fcn.100164f0
mov esi, dword [esp + 0x14]
mov dword [esp + 0x2060], 4
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x20]
lea ebx, [esp + 0x6ac]
mov dword [esp + 0x6ac], 0xffffffff
mov byte [esp + 0x900], 1
call fcn.10023da0
mov byte [esp + 0x2060], 5
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
lea ebx, [ebx]
mov eax, dword [esp + 0x6ac]
cmp eax, 0xffffffff
je 0x1002f295
cmp byte [esp + 0x900], 0
je 0x1002f24a
mov al, 1
jmp 0x1002f25a
lea ecx, [esp + 0x6b0]
push ecx
push eax
call edi
test eax, eax
setne al
mov byte [esp + 0x900], 0
test al, al
je 0x1002f295
lea eax, [esp + 0x6ac]
call fcn.10023f10
push eax
call ebx
test eax, eax
jne 0x1002f230
lea esi, [esp + 0x6ac]
call fcn.10023d60
lea eax, [esp + 0x20]
call fcn.100164d0
xor al, al
jmp 0x1002f500
push 0
mov edi, str..sw.lock
lea eax, [esp + 0x1c]
call fcn.100164f0
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x18]
lea ebx, [esp + 0xd14]
mov dword [esp + 0xd14], 0xffffffff
mov byte [esp + 0xf68], 1
call fcn.10023da0
mov esi, ebx
mov byte [esp + 0x2060], 7
call fcn.10023ed0
test al, al
je 0x1002f4d4
push 0
lea edi, [esp + 0xd48]
lea eax, [esp + 0x28]
call fcn.100164f0
mov esi, 0x2e
lea eax, [esp + 0x24]
mov byte [esp + 0x2060], 8
call fcn.10016ec0
lea esi, [esp + 0x30]
lea ecx, [esp + 0x24]
call fcn.10016df0
push 0
push 0
mov byte [esp + 0x2068], 9
push 0
lea esi, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.100163a0
mov byte [esp + 0x2060], 0xa
mov edx, dword [esp + 0x30]
push edx
push str._s..sr.lock
mov edx, esi
call fcn.10016c90
mov edi, dword [esp + 0x1c]
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x18]
add esp, 8
lea ebx, [esp + 0x19e4]
mov dword [esp + 0x19e4], 0xffffffff
mov byte [esp + 0x1c38], 1
call fcn.10023da0
mov esi, ebx
mov byte [esp + 0x2060], 0xb
call fcn.10023ed0
test al, al
je 0x1002f491
lea ebx, [edi + 8]
jmp 0x1002f3a0
push 0
lea edi, [esp + 0x1a18]
lea eax, [esp + 0x20]
call fcn.100164f0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0x2068], 0xc
call fcn.10090800
lea eax, [esp + 0x1c]
mov byte [esp + 0x2060], 0xe
call fcn.100164d0
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x40]
mov edi, dword [edx + eax*4 - 0x14]
mov esi, eax
push 0
lea eax, [esp + 0x2c]
call fcn.100164f0
mov byte [esp + 0x2060], 0xf
mov eax, dword [esp + 0x40]
mov esi, dword [eax + esi*4 - 0x10]
push esi
call dword [sym.imp.MSVCR100.dll__wtol]
add esp, 4
push 0
push 0
push 0
lea esi, [esp + 0x38]
mov edi, eax
mov dword [esp + 0x38], 0
call fcn.100163a0
mov ecx, dword [esp + 0x28]
mov eax, ebx
call fcn.1001a8c0
test eax, eax
jne 0x1002f43f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp edi, eax
je 0x1002f45a
lea eax, [esp + 0xd14]
call fcn.10023f10
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1002f526
lea eax, [esp + 0x2c]
call fcn.100164d0
lea eax, [esp + 0x28]
call fcn.100164d0
lea ecx, [esp + 0x34]
mov byte [esp + 0x2060], 0xb
call fcn.10090920
lea esi, [esp + 0x19e4]
call fcn.10023ed0
test al, al
jne 0x1002f3a0
lea esi, [esp + 0x19e4]
call fcn.10023d60
lea eax, [esp + 0x10]
call fcn.100164d0
lea eax, [esp + 0x30]
call fcn.100164d0
lea eax, [esp + 0x24]
mov byte [esp + 0x2060], 7
call fcn.100164d0
lea esi, [esp + 0xd14]
call fcn.10023ed0
test al, al
jne 0x1002f2e2
lea esi, [esp + 0xd14]
call fcn.10023d60
lea eax, [esp + 0x18]
call fcn.100164d0
lea esi, [esp + 0x6ac]
call fcn.10023d60
lea eax, [esp + 0x20]
call fcn.100164d0
mov al, 1
mov ecx, dword [esp + 0x2058]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2040]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x2c]
call fcn.100164d0
lea eax, [esp + 0x28]
call fcn.100164d0
lea ecx, [esp + 0x34]
call fcn.10090920
lea esi, [esp + 0x19e4]
call fcn.10023d60
lea eax, [esp + 0x10]
call fcn.100164d0
lea eax, [esp + 0x30]
call fcn.100164d0
lea eax, [esp + 0x24]
call fcn.100164d0
lea esi, [esp + 0xd14]
call fcn.10023d60
lea eax, [esp + 0x18]
call fcn.100164d0
lea esi, [esp + 0x6ac]
call fcn.10023d60
lea eax, [esp + 0x20]
call fcn.100164d0
xor al, al
jmp 0x1002f500