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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55caa0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
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 ebx, ecx
call fcn.004088f9
mov ecx, eax
test ecx, ecx
jne 0x40506f
push 0x80004005
call fcn.00402590
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
xor edi, edi
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], edi
jbe 0x40532e
xor esi, esi
mov dword [ebp - 0x1c], esi
call fcn.004088f9
test eax, eax
je 0x405065
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
lea eax, [edi + 1]
mov byte [ebp - 4], 1
push eax
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x10]
push 0x56bd58
push eax
call fcn.00403090
add esp, 0xc
lea ecx, [ebp - 0x10]
push 0x56bd5c
push 0x56bd60
call fcn.00403c80
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
test edi, edi
js 0x4053bc
cmp edi, dword [ebx + 0x14]
jge 0x4053bc
mov edi, dword [ebx + 0x10]
lea ecx, [ebp - 0x30]
add edi, esi
lea eax, [edi + 8]
push eax
call fcn.00405550
push 0
push 0
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x30]
call fcn.00405570
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
push dword [eax - 0xc]
push eax
call fcn.004024c0
mov edx, dword [ebp - 0x20]
or eax, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40514b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [edi + 0xc]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [edi + 0x10]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [edi + 0x14]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [edi + 0x18]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
push eax
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov edx, eax
lea eax, [esi + 0xc]
jl 0x4051f7
cmp edx, dword [esi]
jne 0x4051f7
lock inc dword [eax]
jmp 0x40522d
mov eax, dword [edx]
lea ecx, [esi + 4]
push 1
push dword [ecx]
mov dword [ebp - 0x18], ecx
mov ecx, edx
call dword [eax]
mov esi, eax
test esi, esi
je 0x4053b7
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
mov dword [esi + 4], eax
mov eax, dword [ecx]
inc eax
push eax
push dword [ebp - 0x24]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00405400
add esp, 0x10
add esi, 0x10
mov dword [ebp - 0x18], esi
push 0x22
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.00403a90
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x10]
push dword [esi - 0xc]
push esi
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov eax, dword [edi]
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 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
push 1
push 0x56bd64
lea ecx, [ebp - 0x10]
call fcn.004024c0
mov edi, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
push dword [edi - 0xc]
push edi
call fcn.004024c0
push 2
push 0x56bcd8
lea ecx, [ebp - 0x14]
call fcn.004024c0
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4052f2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x30]
call fcn.0045b060
mov byte [ebp - 4], 0
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x405316
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x28]
add esi, 0x20
mov dword [ebp - 0x1c], esi
cmp edi, dword [ebx + 0x14]
jb 0x405091
mov esi, dword [ebp - 0x14]
cmp dword [esi - 0xc], 0
je 0x405384
lea ecx, [ebp - 0x44]
call fcn.00408fad
push dword [ebx + 8]
mov byte [ebp - 4], 5
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x405356
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x1001
push dword [ebx + 8]
lea ecx, [ebp - 0x44]
call fcn.004094d5
push dword [esi - 0xc]
lea ecx, [ebp - 0x44]
push esi
call fcn.0040984c
lea ecx, [ebp - 0x44]
call fcn.004093bc
lea ecx, [ebp - 0x44]
call fcn.00408fde
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4053a3
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.00404360
call fcn.00407175
int3