Function at 0x40d3e2
Capabilities:
Delete file
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x4d9644
call fcn.004b0604
sub esp, 0x14
push ebx
push esi
push edi
push 1
pop eax
mov esi, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
mov eax, dword [str.pRdR]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x30]
xor ebx, ebx
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x30]
cmp eax, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
jle 0x40d5ba
xor edi, edi
cmp dword [ebp - 0x10], ebx
je 0x40d5ba
mov eax, dword [esi + 0x2c]
test byte [edi + eax + 8], 0x10
jne 0x40d5a8
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.0040c938
mov ecx, eax
call fcn.0040b590
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c72df
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
inc dword [esi + 0x40]
mov ecx, esi
call fcn.0040d631
mov ecx, esi
call fcn.00441abd
mov ecx, esi
call fcn.0040d66f
test eax, eax
je 0x40d47e
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [esi + 0x2c]
push dword [edi + eax + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp dword [ebp - 0x10], ebx
je 0x40d5a8
cmp eax, 0xffffffff
jne 0x40d4bb
push ecx
mov dword [ebp - 0x18], ebx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Delete_failed
mov dword [ebp - 0x10], ebx
call fcn.004c75d8
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
jmp 0x40d5a8
test al, 6
je 0x40d4ca
cmp dword [esi + 0x10], ebx
jne 0x40d4ca
dec dword [esi + 0x3c]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x10], ebx
je 0x40d5a8
mov eax, dword [esi + 0x2c]
push 0x80
mov eax, dword [edi + eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x40d50c
cmp dword [esi + 0xc], ebx
mov dword [ebp - 0x18], ebx
jne 0x40d50c
push ecx
mov dword [ebp - 0x10], ebx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Delete_failed
call fcn.004c75d8
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp dword [ebp - 0x10], ebx
je 0x40d5a8
mov eax, dword [esi + 0x2c]
push dword [edi + eax + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
test eax, eax
mov ecx, esp
jne 0x40d56a
mov dword [ebp - 0x20], esp
push str.Delete_failed
call fcn.004c75d8
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp dword [esi + 0xc], ebx
mov dword [ebp - 0x18], ebx
jne 0x40d548
mov dword [ebp - 0x10], ebx
lea ebx, [esi + 0x24]
push 0x511868
mov ecx, ebx
call fcn.004c7946
mov eax, dword [esi + 0x2c]
mov ecx, ebx
lea eax, [edi + eax + 4]
push eax
call fcn.004c7982
xor ebx, ebx
jmp 0x40d5a8
mov dword [ebp - 0x20], esp
push str.Delete_successful
call fcn.004c75d8
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp dword [esi + 0x14], ebx
je 0x40d5a8
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.0040c938
mov ecx, eax
call fcn.0040b590
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c72df
mov ecx, esi
call fcn.0040d699
inc dword [ebp - 0x14]
add edi, 0x38
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 0x30]
jl 0x40d420
cmp dword [esi + 0x30], ebx
mov dword [ebp - 0x14], ebx
jle 0x40d606
xor edi, edi
cmp dword [ebp - 0x10], ebx
je 0x40d606
mov eax, dword [esi + 0x2c]
test byte [eax + edi + 8], 0x10
je 0x40d5f8
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.0040c938
mov ecx, eax
call fcn.0040b590
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c72df
mov ecx, esi
call fcn.0040d78f
inc dword [ebp - 0x14]
add edi, 0x38
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 0x30]
jl 0x40d5c4
push 0x511868
lea ecx, [esi + 0x24]
call fcn.004c43ee
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004c756a
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret