Function at 0x401060
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
push esi
push edi
call entry0
test eax, eax
je 0x4012d4
push 2
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
cmp dword [section..share], 0
jne 0x4012d4
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4012d4
lea eax, [esp + 0x14]
push eax
call fcn.00402520
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], 0
jne 0x4010c2
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4012c8
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edx, eax
mov edi, 0x427ef8
call fcn.004024e0
inc dword [section..share]
lea esi, [esp + 0x24]
call fcn.004012e0
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.004013a0
lea esi, [esp + 0x10]
call fcn.00402010
mov edx, dword [0x4272cc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4272cc
call eax
mov edi, eax
add edi, 0x10
xor ebx, ebx
mov dword [esp + 0x18], edi
cmp dword [esp + 0x40], ebx
jbe 0x401214
push ebx
lea eax, [esp + 0x28]
call fcn.00401320
mov eax, dword [eax]
sub eax, 0x10
call fcn.004016c0
mov ecx, dword [esp + 0x10]
mov esi, eax
add esi, 0x10
push ecx
mov ecx, esi
call fcn.00405f60
mov eax, dword [esp + 0x14]
add esp, 4
lea edx, [esp + 0x44]
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x401178
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
mov edx, ecx
or edx, eax
je 0x401178
test eax, eax
jl 0x40119d
jg 0x401178
cmp ecx, 0x186a0
jbe 0x40119d
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401194
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc ebx
cmp ebx, dword [esp + 0x40]
jb 0x40111e
jmp 0x401214
lea ebx, [esi - 0x10]
lea eax, [edi - 0x10]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
cmp ebx, eax
je 0x4011fb
cmp dword [eax + 0xc], 0
lea edi, [eax + 0xc]
jl 0x4011e6
mov ecx, dword [ebx]
cmp ecx, dword [eax]
jne 0x4011e6
mov eax, ebx
call fcn.004016c0
mov esi, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x4011e1
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edi, [esi + 0x10]
jmp 0x4011fb
mov ebx, dword [esi - 0xc]
push esi
lea eax, [esp + 0x1c]
call fcn.00402440
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401214
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401251
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x1c]
lea ebx, [esp + 0x20]
call fcn.00401f90
mov esi, dword [esp + 0x20]
test esi, esi
je 0x40124a
mov eax, dword [esp + 0x10]
call fcn.00402f20
push esi
call fcn.0040c94f
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
dec dword [section..share]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40127e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40129e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x24]
call fcn.00401620
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0040c6cc
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4012d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10