Function at 0x406b40
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49c9ad
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x4d7200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x3c], ebx
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
xor esi, esi
movq qword [ebp - 0x1c], xmm0
test ebx, ebx
je 0x406b98
cmp word [ebx], si
je 0x406b98
nop word [eax + eax]
inc esi
cmp word [ebx + esi*2], 0
jne 0x406b90
xor ecx, ecx
mov dword [ebp - 0x18], esi
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a28e
add esp, 4
mov edx, eax
mov dword [ebp - 0x1c], edx
test esi, esi
jle 0x406be3
mov ecx, edx
sub ebx, edx
mov edi, esi
nop word [eax + eax]
mov ax, word [ecx + ebx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edi, 1
jne 0x406bd0
mov ebx, dword [ebp - 0x3c]
xor eax, eax
mov word [edx + esi*2], ax
mov dword [ebp - 4], eax
xorps xmm0, xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x20], 1
mov byte [ebp - 4], 1
test esi, esi
jne 0x406c1d
cmp word [edx], si
je 0x406c18
nop
inc esi
cmp word [edx + esi*2], 0
jne 0x406c10
mov dword [ebp - 0x18], esi
test esi, esi
setg byte [ebp - 0x14]
test esi, esi
jle 0x406c4a
lea eax, [esi*2 - 2]
nop dword [eax]
cmp word [eax + edx], 0x5c
lea ecx, [eax + edx]
jne 0x406c4a
dec esi
xor edi, edi
sub eax, 2
mov dword [ebp - 0x18], esi
mov word [ecx], di
test esi, esi
jne 0x406c30
push 0
push 1
push 0xffffffffffffffff
push 1
push 0x4bfbc8
lea ecx, [ebp - 0x1c]
call fcn.004025a0
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x406c71
lea esi, [eax + 1]
jmp 0x4071b1
test edi, edi
jne 0x406c93
push 2
call fcn.0048a28e
mov edi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], edi
xor esi, esi
mov dword [ebp - 0x18], esi
mov word [edi], ax
mov eax, dword [ebp - 0x2c]
jmp 0x406c96
mov esi, dword [ebp - 0x18]
push 0
inc eax
mov byte [ebp - 0x14], 1
push eax
push edi
lea ecx, [ebp - 0x28]
call fcn.00402ba0
push 0
push 1
push 1
push 1
push 0x4bfc88
lea ecx, [ebp - 0x28]
call fcn.004025a0
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x406cda
push eax
push 1
push 1
push 1
push 0x4bfc8c
lea ecx, [ebp - 0x28]
call fcn.004025a0
mov dword [ebp - 0x48], eax
xor ecx, ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
test eax, eax
je 0x406d27
mov eax, dword [ebp - 0x2c]
dec eax
test esi, esi
jne 0x406d01
test edi, edi
je 0x406cfe
cmp word [edi], cx
je 0x406cfe
inc esi
cmp word [edi + esi*2], cx
jne 0x406cf7
mov dword [ebp - 0x18], esi
cmp esi, eax
setge byte [ebp - 0x14]
jl 0x406d15
cmovl eax, esi
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov word [edi + eax*2], cx
lea ecx, [ebp - 0x1c]
call fcn.00402a90
mov edi, dword [ebp - 0x1c]
xor esi, esi
jmp 0x406ef6
push 2
push 1
push 1
push 1
push 0x4bfc34
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x14], 1
call fcn.004025a0
mov edi, dword [ebp - 0x1c]
test eax, eax
jne 0x406e2f
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x406d6b
test edi, edi
je 0x406d68
cmp word [edi], ax
je 0x406d68
nop dword [eax + eax]
inc eax
cmp word [edi + eax*2], 0
jne 0x406d60
mov dword [ebp - 0x18], eax
cmp eax, 2
jl 0x406e2f
cmp word [edi + 2], 0x3a
jne 0x406e2f
mov byte [ebp - 0x14], 0
test eax, eax
jne 0x406d9b
cmp word [edi], ax
je 0x406d98
nop dword [eax]
inc eax
cmp word [edi + eax*2], 0
jne 0x406d90
mov dword [ebp - 0x18], eax
xor ecx, ecx
nop dword [eax]
inc ecx
cmp word [ecx*2 + 0x4bfc3c], 0
jne 0x406da0
add eax, ecx
mov edx, 2
mov dword [ebp - 0x2c], eax
xor ecx, ecx
inc eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a28e
mov ebx, 0x4bfc3c
mov dword [ebp - 0x40], eax
add esp, 4
mov edx, edi
mov ecx, eax
mov esi, 0x5c
sub ebx, eax
nop
mov word [ecx], si
add ecx, 2
movzx eax, word [ebx + ecx]
mov esi, eax
test ax, ax
jne 0x406de0
movzx eax, word [edi]
mov ebx, dword [ebp - 0x3c]
mov esi, eax
test ax, ax
je 0x406e11
nop
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
add ecx, 2
test ax, ax
jne 0x406e00
xor eax, eax
push edi
mov word [ecx], ax
call fcn.00489ed3
mov edi, dword [ebp - 0x40]
add esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x14], 1
test edi, edi
jne 0x406e4a
push 2
call fcn.0048a28e
mov edi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
mov word [edi], ax
push edi
mov byte [ebp - 0x14], 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
and eax, 0x400
and esi, 0x10
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], esi
test esi, esi
je 0x406ef6
test eax, eax
jne 0x406ef6
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x406e85
push eax
call fcn.00489ed3
add esp, 4
mov byte [ebp - 0x20], 0
xor esi, esi
nop dword [eax + eax]
inc esi
cmp word [esi*2 + 0x4bfc88], 0
jne 0x406e90
xor ecx, ecx
mov dword [ebp - 0x24], esi
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048a28e
add esp, 4
mov edx, eax
mov dword [ebp - 0x28], edx
test esi, esi
jle 0x406ee9
mov eax, 0x4bfc88
mov ecx, edx
sub eax, edx
mov ebx, esi
mov dword [ebp - 0x2c], eax
mov edx, eax
mov ax, word [edx + ecx]
mov word [ecx], ax
add ecx, 2
sub ebx, 1
jne 0x406ed4
mov ebx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x28]
xor eax, eax
mov byte [ebp - 0x20], 1
mov word [edx + esi*2], ax
mov esi, dword [ebp - 0x44]
push 0x800
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 2
push 0x800
push eax
mov dword [ebp - 0x38], eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x48], 0
jne 0x406f30
mov byte [ebp - 0x3c], 0
test esi, esi
je 0x406f34
mov byte [ebp - 0x3c], 3
push 0x44
push 0x40
mov dword [ebp - 0x2c], 0x44
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 0x2c]
push eax
push esi
push 0
push 1
mov dword [ebp - 0x4c], esi
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
mov byte [ebp - 4], 3
test esi, esi
je 0x406f7a
push dword [ebp - 0x3c]
push 0x10000000
push ecx
push esi
lea ecx, [ebp - 0x38]
call fcn.00403ac0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x44
push 0x40
mov dword [ebp - 0x2c], 0x44
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 0x2c]
push eax
push esi
push 0
push 0x16
mov dword [ebp - 0x4c], esi
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
mov byte [ebp - 4], 4
test esi, esi
jne 0x406fb3
mov byte [ebp - 4], 2
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x406fd2
push dword [ebp - 0x3c]
push 0x10000000
push ecx
push esi
lea ecx, [ebp - 0x38]
call fcn.00403ac0
mov byte [ebp - 4], 2
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x406fdc
push eax
call esi
push 0x44
push 0x40
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0x44
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], eax
push ecx
push eax
push 0
push 0x1a
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
push dword [ebp - 0x3c]
push 0x10000000
push ecx
push dword [ebp - 0x34]
lea ecx, [ebp - 0x38]
call fcn.00403ac0
cmp dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x44]
je 0x407083
test eax, eax
je 0x407083
mov esi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push ebx
call esi
test eax, eax
jne 0x40705c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40705c
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 5
je 0x407066
and eax, 0xfffffffa
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call esi
test eax, eax
je 0x407066
mov esi, 1
jmp 0x407187
push dword [ebp - 0x34]
push 5
push ecx
push ebx
lea ecx, [ebp - 0x38]
call fcn.00403ca0
push ebx
call esi
neg eax
sbb esi, esi
neg esi
jmp 0x407187
mov ecx, dword [ebp - 0x48]
test ecx, ecx
jne 0x4070fb
test eax, eax
jne 0x4070fb
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
call esi
test eax, eax
jne 0x4070f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4070f4
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 5
je 0x4070cd
and eax, 0xfffffffa
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call esi
test eax, eax
je 0x4070cd
mov esi, 1
jmp 0x40716a
push dword [ebp - 0x34]
push 4
push ecx
push ebx
lea ecx, [ebp - 0x38]
call fcn.00403ca0
push ebx
call esi
test eax, eax
je 0x4070ed
mov esi, 1
jmp 0x40716a
xor esi, esi
jmp 0x407187
mov esi, 1
jmp 0x40715f
mov esi, dword [ebp - 0x28]
xor eax, eax
test ecx, ecx
setne al
lea eax, [eax*4 + 2]
mov dword [ebp - 0x40], eax
test esi, esi
jne 0x40712a
push 2
call fcn.0048a28e
mov esi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], eax
mov word [esi], ax
mov byte [ebp - 0x20], 1
test edi, edi
jne 0x407149
push 2
call fcn.0048a28e
mov edi, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], eax
mov word [edi], ax
lea eax, [ebp - 0x38]
mov byte [ebp - 0x14], 1
push eax
push dword [ebp - 0x40]
mov edx, esi
mov ecx, edi
call fcn.00407200
mov esi, eax
cmp esi, 1
jne 0x407187
cmp dword [ebp - 0x48], 0
jne 0x407187
cmp dword [ebp - 0x44], 0
mov edx, 0x10
push 0
push ebx
mov eax, 4
push 5
cmovne eax, edx
push eax
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov eax, dword [ebp - 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
test eax, eax
je 0x407197
push eax
call ebx
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4071a1
push eax
call ebx
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4071b1
push eax
call fcn.00489ed3
add esp, 4
test edi, edi
je 0x4071be
push edi
call fcn.00489ed3
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00489ec5
mov esp, ebp
pop ebp
ret