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

Disassembly:
push 0xffffffffffffffff
push 0x43e27c
mov eax, dword fs:[0]
push eax
sub esp, 0x14c
mov eax, dword [0x45060c]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45060c]
xor eax, esp
push eax
lea eax, [esp + 0x160]
mov dword fs:[0], eax
mov eax, 1
mov esi, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
call fcn.0041a0f6
xor ecx, ecx
xor ebp, ebp
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4058a6
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x50], eax
mov dword [esp + 0x168], ebp
call fcn.0041a0f6
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4058d7
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x38]
xor ebx, ebx
cmp eax, ebp
mov byte [esp + 0x168], 1
mov dword [esi + 0x50], eax
mov dword [esp + 0x14], ebx
jle 0x405d94
cmp dword [esp + 0x1c], 0
je 0x405d94
test ebp, ebp
jl 0x405e0d
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
test byte [eax + 8], 0x10
jne 0x405d83
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x1c], esp
mov edi, esp
push eax
call fcn.00401690
add eax, 0x10
mov dword [edi], eax
mov edx, dword [esi]
mov eax, dword [edx + 4]
add esp, 4
mov ecx, esi
call eax
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4059fd
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4059fd
cmp ebx, dword [esi + 0x38]
mov edx, dword [esi + 0x24]
push edx
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x20], esp
mov edi, esp
push eax
call fcn.00401690
add eax, 0x10
mov dword [edi], eax
add esp, 4
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.004049d0
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x16c], 2
call fcn.004020c0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x168], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4059f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.0041b01a
inc dword [esi + 0x54]
mov ecx, esi
call fcn.00403f10
mov ecx, esi
call fcn.00403f90
mov ecx, esi
call fcn.00404200
test eax, eax
je 0x405a23
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp dword [esp + 0x1c], 0
je 0x405d83
cmp eax, 0xffffffff
jne 0x405a6f
push ecx
xor eax, eax
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Delete_failed
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
call fcn.00403c30
mov edx, dword [esi]
mov ecx, esi
jmp 0x405d7e
xor edi, edi
test al, 6
je 0x405a86
cmp dword [esi + 0x10], edi
jne 0x405a86
dec dword [esi + 0x50]
mov dword [esp + 0x1c], edi
jmp 0x405d83
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x405ace
mov dword [esp + 0x20], edi
cmp dword [esi + 0xc], edi
jne 0x405ace
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Delete_failed
mov dword [esp + 0x24], edi
call fcn.00403c30
mov edx, dword [esi]
mov ecx, esi
jmp 0x405d7e
cmp dword [esi + 0x28], edi
jne 0x405b9c
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
test eax, eax
jne 0x405b4b
push str.Delete_failed
call fcn.00403c30
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
mov dword [esp + 0x20], edi
cmp dword [esi + 0xc], edi
jne 0x405b1a
mov dword [esp + 0x1c], edi
lea edi, [esi + 0x2c]
push 0x441a6c
mov ecx, edi
call fcn.00402e60
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, edi
call fcn.00401b10
jmp 0x405d83
push str.Delete_successful
call fcn.00403c30
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
cmp dword [esi + 0x14], edi
je 0x405d83
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x1c], esp
mov edi, esp
push eax
call fcn.00401690
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edi], eax
call fcn.00404520
jmp 0x405d83
xor eax, eax
push 0x106
lea ecx, [esp + 0x58]
push edi
push ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov word [esp + 0x58], ax
call fcn.00429490
add esp, 0xc
cmp ebx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
sub eax, 0x10
push eax
call fcn.00401690
lea edi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x18], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0xa
or eax, ecx
mov byte [esp + 0x168], 3
jge 0x405c1f
push 0xa
lea ecx, [esp + 0x1c]
call fcn.00401640
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x54]
mov ebx, edi
mov ecx, eax
mov edx, 0x106
sub ebx, ecx
mov edi, edi
lea ecx, [edx + 0x7ffffef8]
test ecx, ecx
je 0x405c4b
mov cl, byte [ebx + eax]
test cl, cl
je 0x405c4b
mov byte [eax], cl
inc eax
sub edx, 1
jne 0x405c30
jmp 0x405c4f
test edx, edx
jne 0x405c50
dec eax
mov byte [eax], 0
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00428e85
xor ebx, ebx
add esp, 8
cmp eax, ebx
jl 0x405e12
cmp eax, dword [edi - 8]
jg 0x405e12
mov dword [edi - 0xc], eax
mov byte [eax + edi], bl
lea ecx, [esp + 0x30]
lea edx, [esp + 0x54]
mov eax, 0x50
push ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebx
mov word [esp + 0x44], ax
mov dword [esp + 0x4e], ebx
mov dword [esp + 0x4a], ebx
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
push ecx
mov ecx, esp
test eax, eax
je 0x405d0b
mov dword [esp + 0x24], esp
push str.Delete_failed
call fcn.00403c30
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
mov dword [esp + 0x20], ebx
cmp dword [esi + 0xc], ebx
jne 0x405cd9
mov dword [esp + 0x1c], ebx
lea ebx, [esi + 0x2c]
push 0x441a6c
mov ecx, ebx
call fcn.00402e60
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, ebx
call fcn.00401b10
jmp 0x405d5b
mov dword [esp + 0x30], esp
push str.Delete_successful
call fcn.00403c30
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
cmp dword [esi + 0x14], ebx
je 0x405d5b
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x30], esp
mov ebx, esp
push eax
call fcn.00401690
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [ebx], eax
call fcn.00404520
mov ebx, dword [esp + 0x14]
add edi, 0xfffffff0
mov byte [esp + 0x168], 1
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x405d83
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
mov eax, dword [edx + 4]
call eax
inc ebx
add ebp, 0x40
cmp ebx, dword [esi + 0x38]
mov dword [esp + 0x14], ebx
jl 0x405903
cmp dword [esi + 0x38], 0
mov dword [esp + 0x14], 0
jle 0x405e75
xor ebx, ebx
cmp dword [esp + 0x1c], 0
je 0x405e75
test ebx, ebx
jl 0x405e0d
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
add eax, ebx
test byte [eax + 8], 0x10
je 0x405e64
cmp ecx, dword [esi + 0x38]
jge 0x405e0d
mov eax, dword [esi + 0x34]
mov edi, dword [eax + ebx + 4]
add eax, ebx
push ecx
mov ecx, dword [edi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub edi, 0x10
mov dword [esp + 0x30], esp
mov dword [esp + 0x28], esp
call eax
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
jl 0x405e1c
cmp eax, dword [edi]
jne 0x405e1c
mov ebp, edi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x405e50
call fcn.0041944d
push 0x80070057
call fcn.00401090
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
je 0x405ed1
mov eax, dword [edi + 4]
mov dword [ebp + 4], eax
mov eax, dword [edi + 4]
inc eax
push eax
add edi, 0x10
push edi
push eax
lea ecx, [ebp + 0x10]
push ecx
call fcn.00428b80
add esp, 0x10
mov edx, dword [esp + 0x28]
add ebp, 0x10
mov ecx, esi
mov dword [edx], ebp
call fcn.00404740
mov ecx, dword [esp + 0x14]
inc ecx
add ebx, 0x40
cmp ecx, dword [esi + 0x38]
mov dword [esp + 0x14], ecx
jl 0x405da8
push 0x441a6c
lea ecx, [esi + 0x2c]
call fcn.00404280
mov edi, dword [esp + 0x20]
test edi, edi
je 0x405ed6
mov eax, dword [esi + 0x18]
test eax, eax
je 0x405eb5
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405eb5
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + 0x20]
push 0
push 0x64
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x405ef8
mov edx, dword [eax + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405ef8
push str.Done
jmp 0x405ef0
call fcn.00401260
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x405ef8
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405ef8
push str.Error
mov ecx, dword [esi + 0x1c]
call fcn.0041b01a
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x168], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405f20
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
mov dword [esp + 0x168], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405f4b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x160]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.00429433
add esp, 0x158
ret