Function at 0x407040
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47c2fc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x250
mov eax, dword [0x4a8ae4]
push ebx
push esi
xor eax, ebp
push edi
mov dword [esp + 0x254], eax
mov esi, ecx
call fcn.0046249e
xor edi, edi
cmp eax, edi
je 0x40708c
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x74]
mov dword [esp + 0x18], eax
jmp 0x407090
mov dword [esp + 0x18], edi
mov ecx, dword [esp + 0x18]
call fcn.00420c10
mov eax, dword [esi + 0xc0]
sub eax, 0x10
push eax
call fcn.00401570
lea ebx, [eax + 0x10]
add esp, 4
mov dword [esp + 0x14], ebx
cmp dword [ebx - 0xc], edi
mov dword [esp + 0x264], edi
je 0x40731d
mov word [esp + 0x48], di
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x4a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebx - 4]
mov ecx, 1
sub ecx, eax
mov eax, dword [ebx - 8]
sub eax, 0x104
or eax, ecx
jge 0x4070fe
push 0x104
lea ecx, [esp + 0x18]
call fcn.00401520
mov ebx, dword [esp + 0x14]
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [esi + 0x1c]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov word [esp + 0x44], ax
mov dword [esp + 0x28], ecx
mov word [esp + 0x38], 1
mov dword [esp + 0x2c], 3
mov edi, dword [ebx - 4]
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, edi
sub eax, 0x104
or eax, ecx
jge 0x407167
push 0x104
lea ecx, [esp + 0x18]
call fcn.00401520
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0x48]
push ebx
push edx
call fcn.0044a5c9
add esp, 8
lea ecx, [esp + 0x28]
lea eax, [esp + 0x48]
push ecx
mov dword [esp + 0x34], eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
test eax, eax
jne 0x407314
mov eax, dword [esp + 0x3a]
test eax, eax
je 0x4071c1
mov ecx, dword [esp + 0x18]
call fcn.004226c0
add ebx, 0xfffffff0
mov dword [esp + 0x264], 0xffffffff
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jmp 0x407338
call fcn.004621d7
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x268], 1
call fcn.00403cc0
mov esi, dword [esp + 0x10]
push 0x5c
push esi
call fcn.0044a56f
add esp, 8
test eax, eax
jne 0x407202
or eax, 0xffffffff
jmp 0x407206
sub eax, esi
sar eax, 1
inc eax
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405220
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x268], 2
call fcn.00403cc0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x264], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40724e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
call fcn.00476002
mov esi, dword [eax + 4]
lea eax, [esp + 0x10]
lea edi, [esi + 0xd0]
push eax
mov ecx, edi
call fcn.00403cc0
mov eax, dword [edi]
push ecx
mov dword [esp + 0x20], esp
sub eax, 0x10
mov dword [esp + 0x20], esp
push eax
call fcn.00401570
mov ecx, dword [esp + 0x24]
add eax, 0x10
mov dword [ecx], eax
add esp, 4
mov ecx, esi
call fcn.0040e4f0
lea edx, [esp + 0x48]
push edx
lea ecx, [esp + 0x24]
call fcn.00406210
mov eax, dword [esp + 0x20]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov edi, esp
push eax
mov byte [esp + 0x26c], 3
call fcn.00401570
add eax, 0x10
add esp, 4
mov ecx, esi
mov dword [edi], eax
call fcn.0040eee0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x264], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4072ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0x264], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407314
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x18]
call fcn.004226c0
add ebx, 0xfffffff0
mov dword [esp + 0x264], 0xffffffff
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x407342
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
mov ecx, dword [esp + 0x25c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x254]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044a318
mov esp, ebp
pop ebp
ret