Function at 0x405850
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 [0x450610]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x450610]
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.0041a128
xor ecx, ecx
xor ebp, ebp
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4058b6
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.0041a128
xor ecx, ecx
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x4058e7
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 0x405da4
cmp dword [esp + 0x1c], 0
je 0x405da4
test ebp, ebp
jl 0x405e1d
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
mov eax, dword [esi + 0x34]
add eax, ebp
test byte [eax + 8], 0x10
jne 0x405d93
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
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.00401680
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 0x405a0d
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405a0d
cmp ebx, dword [esi + 0x38]
mov edx, dword [esi + 0x24]
push edx
jge 0x405e1d
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.00401680
add eax, 0x10
mov dword [edi], eax
add esp, 4
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.004049e0
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x16c], 2
call fcn.004020d0
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 0x405a00
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.0041b04c
inc dword [esi + 0x54]
mov ecx, esi
call fcn.00403f20
mov ecx, esi
call fcn.00403fa0
mov ecx, esi
call fcn.00404210
test eax, eax
je 0x405a33
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
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 0x405d93
cmp eax, 0xffffffff
jne 0x405a7f
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.00403c40
mov edx, dword [esi]
mov ecx, esi
jmp 0x405d8e
xor edi, edi
test al, 6
je 0x405a96
cmp dword [esi + 0x10], edi
jne 0x405a96
dec dword [esi + 0x50]
mov dword [esp + 0x1c], edi
jmp 0x405d93
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
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 0x405ade
mov dword [esp + 0x20], edi
cmp dword [esi + 0xc], edi
jne 0x405ade
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Delete_failed
mov dword [esp + 0x24], edi
call fcn.00403c40
mov edx, dword [esi]
mov ecx, esi
jmp 0x405d8e
cmp dword [esi + 0x28], edi
jne 0x405bac
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
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 0x405b5b
push str.Delete_failed
call fcn.00403c40
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 0x405b2a
mov dword [esp + 0x1c], edi
lea edi, [esi + 0x2c]
push 0x441a6c
mov ecx, edi
call fcn.00402e70
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
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.00401b20
jmp 0x405d93
push str.Delete_successful
call fcn.00403c40
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
cmp dword [esi + 0x14], edi
je 0x405d93
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
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.00401680
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edi], eax
call fcn.00404530
jmp 0x405d93
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.00429060
add esp, 0xc
cmp ebx, dword [esi + 0x38]
jge 0x405e1d
mov eax, dword [esi + 0x34]
add eax, ebp
mov eax, dword [eax + 4]
sub eax, 0x10
push eax
call fcn.00401680
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 0x405c2f
push 0xa
lea ecx, [esp + 0x1c]
call fcn.00401630
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 0x405c5b
mov cl, byte [ebx + eax]
test cl, cl
je 0x405c5b
mov byte [eax], cl
inc eax
sub edx, 1
jne 0x405c40
jmp 0x405c5f
test edx, edx
jne 0x405c60
dec eax
mov byte [eax], 0
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00428e95
xor ebx, ebx
add esp, 8
cmp eax, ebx
jl 0x405e22
cmp eax, dword [edi - 8]
jg 0x405e22
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 0x405d1b
mov dword [esp + 0x24], esp
push str.Delete_failed
call fcn.00403c40
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 0x405ce9
mov dword [esp + 0x1c], ebx
lea ebx, [esi + 0x2c]
push 0x441a6c
mov ecx, ebx
call fcn.00402e70
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x38]
jge 0x405e1d
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.00401b20
jmp 0x405d6b
mov dword [esp + 0x30], esp
push str.Delete_successful
call fcn.00403c40
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
cmp dword [esi + 0x14], ebx
je 0x405d6b
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x38]
jge 0x405e1d
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.00401680
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [ebx], eax
call fcn.00404530
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 0x405d93
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 0x405913
cmp dword [esi + 0x38], 0
mov dword [esp + 0x14], 0
jle 0x405e85
xor ebx, ebx
cmp dword [esp + 0x1c], 0
je 0x405e85
test ebx, ebx
jl 0x405e1d
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esi + 0x38]
jge 0x405e1d
mov eax, dword [esi + 0x34]
add eax, ebx
test byte [eax + 8], 0x10
je 0x405e74
cmp ecx, dword [esi + 0x38]
jge 0x405e1d
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 0x405e2c
cmp eax, dword [edi]
jne 0x405e2c
mov ebp, edi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x405e60
call fcn.0041945d
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 0x405ee1
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.00428b90
add esp, 0x10
mov edx, dword [esp + 0x28]
add ebp, 0x10
mov ecx, esi
mov dword [edx], ebp
call fcn.00404750
mov ecx, dword [esp + 0x14]
inc ecx
add ebx, 0x40
cmp ecx, dword [esi + 0x38]
mov dword [esp + 0x14], ecx
jl 0x405db8
push 0x441a6c
lea ecx, [esi + 0x2c]
call fcn.00404290
mov edi, dword [esp + 0x20]
test edi, edi
je 0x405ee6
mov eax, dword [esi + 0x18]
test eax, eax
je 0x405ec5
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405ec5
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 0x405f08
mov edx, dword [eax + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405f08
push str.Done
jmp 0x405f00
call fcn.00401260
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x405f08
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x405f08
push str.Error
mov ecx, dword [esi + 0x1c]
call fcn.0041b04c
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 0x405f30
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 0x405f5b
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.004294c0
add esp, 0x158
ret