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

Disassembly:
mov eax, 0x4d7f84
call fcn.004aef44
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 [0x51f03c]
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 0x40d54a
xor edi, edi
cmp dword [ebp - 0x10], ebx
je 0x40d54a
mov eax, dword [esi + 0x2c]
test byte [edi + eax + 8], 0x10
jne 0x40d538
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.0040d862
mov ecx, eax
call fcn.0040b679
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c5c1f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
inc dword [esi + 0x40]
mov ecx, esi
call fcn.0040d5c1
mov ecx, esi
call fcn.0040d5ff
mov ecx, esi
call fcn.0040d65d
test eax, eax
je 0x40d40e
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 0x40d538
cmp eax, 0xffffffff
jne 0x40d44b
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.004c5f18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
jmp 0x40d538
test al, 6
je 0x40d45a
cmp dword [esi + 0x10], ebx
jne 0x40d45a
dec dword [esi + 0x3c]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x10], ebx
je 0x40d538
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 0x40d49c
cmp dword [esi + 0xc], ebx
mov dword [ebp - 0x18], ebx
jne 0x40d49c
push ecx
mov dword [ebp - 0x10], ebx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Delete_failed
call fcn.004c5f18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp dword [ebp - 0x10], ebx
je 0x40d538
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 0x40d4fa
mov dword [ebp - 0x20], esp
push str.Delete_failed
call fcn.004c5f18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp dword [esi + 0xc], ebx
mov dword [ebp - 0x18], ebx
jne 0x40d4d8
mov dword [ebp - 0x10], ebx
lea ebx, [esi + 0x24]
push 0x510868
mov ecx, ebx
call fcn.004c6286
mov eax, dword [esi + 0x2c]
mov ecx, ebx
lea eax, [edi + eax + 4]
push eax
call fcn.004c62c2
xor ebx, ebx
jmp 0x40d538
mov dword [ebp - 0x20], esp
push str.Delete_successful
call fcn.004c5f18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp dword [esi + 0x14], ebx
je 0x40d538
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.0040d862
mov ecx, eax
call fcn.0040b679
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040d687
inc dword [ebp - 0x14]
add edi, 0x38
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 0x30]
jl 0x40d3b0
cmp dword [esi + 0x30], ebx
mov dword [ebp - 0x14], ebx
jle 0x40d596
xor edi, edi
cmp dword [ebp - 0x10], ebx
je 0x40d596
mov eax, dword [esi + 0x2c]
test byte [eax + edi + 8], 0x10
je 0x40d588
push dword [ebp - 0x14]
lea ecx, [esi + 0x28]
call fcn.0040d862
mov ecx, eax
call fcn.0040b679
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c5c1f
mov ecx, esi
call fcn.0040d77d
inc dword [ebp - 0x14]
add edi, 0x38
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 0x30]
jl 0x40d554
push 0x510868
lea ecx, [esi + 0x24]
call fcn.004c2d2e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret