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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55c9d0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x5b7e5c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x404580
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], 0
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x4045a7
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x10], ebx
mov byte [ebp - 4], 1
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x4045cb
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov byte [ebp - 4], 2
mov dword [ebp - 0x20], ecx
cmp dword [eax + 0x14], ecx
jbe 0x40486c
xor edx, edx
mov dword [ebp - 0x24], edx
test ecx, ecx
js 0x404934
cmp ecx, dword [eax + 0x14]
jge 0x404934
mov esi, dword [eax + 0x10]
lea ecx, [ebp - 0x10]
push 3
push 0x56bd98
add esi, edx
call fcn.004042c0
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x404654
cmp eax, 1
jne 0x404645
push 0x56bd5c
push ecx
call fcn.00544dc1
add esp, 8
test eax, eax
je 0x404654
mov eax, dword [esi + 0xc]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 2
push 0x56bda0
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x4046a2
cmp eax, 1
jne 0x404693
push 0x56bd5c
push ecx
call fcn.00544dc1
add esp, 8
test eax, eax
je 0x4046a2
mov eax, dword [esi + 0x10]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 2
push 0x56bda0
lea ecx, [ebp - 0x10]
call fcn.004024c0
lea eax, [esi + 8]
push eax
lea ecx, [ebp - 0x34]
call fcn.00405550
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.004024c0
push 0x2f
push 1
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x34]
call fcn.00405570
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
push dword [eax - 0xc]
push eax
call fcn.004024c0
mov edx, dword [ebp - 0x28]
or eax, 0xffffffff
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404711
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 2
push 0x56bda0
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov ecx, dword [esi + 0x14]
add edi, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, edi
je 0x404773
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x404767
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x404767
push edx
call fcn.00402e20
add esp, 4
mov dword [ebp - 0x2c], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x40475f
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2c]
add eax, 0x10
mov dword [ebp - 0x18], eax
jmp 0x404773
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x18]
call fcn.004042c0
push 0x2c
push 0x2e
lea ecx, [ebp - 0x18]
call fcn.00403bb0
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov edi, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
push dword [edi - 0xc]
push edi
call fcn.004024c0
push 2
push 0x56bda0
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0x18]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 2
push 0x56bda0
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi + 0x1c]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [esi]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd9c
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x1c]
push dword [ebx - 0xc]
push ebx
call fcn.004024c0
push 2
push 0x56bcd8
lea ecx, [ebp - 0x1c]
call fcn.004024c0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call fcn.0045b060
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
inc ecx
mov edx, dword [ebp - 0x24]
add edx, 0x20
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], edx
cmp ecx, dword [eax + 0x14]
jb 0x4045f0
mov esi, dword [ebp - 0x1c]
cmp dword [esi - 0xc], 0
je 0x4048cb
lea ecx, [ebp - 0x48]
call fcn.00408fad
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 5
push dword [eax + 8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40489a
mov eax, dword [ebp - 0x14]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x48]
push 0
push 0x1001
push dword [eax + 8]
call fcn.004094d5
push dword [esi - 0xc]
lea ecx, [ebp - 0x48]
push esi
call fcn.0040984c
lea ecx, [ebp - 0x48]
call fcn.004093bc
lea ecx, [ebp - 0x48]
call fcn.00408fde
lea edx, [edi - 0x10]
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4048e9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add ebx, 0xfffffff0
mov eax, edi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x404904
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x404920
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00407175
int3