Function at 0x40b270
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x54
mov eax, dword [0x47b660]
xor eax, esp
mov dword [esp + 0x4c], eax
push ebx
xor ebx, ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
push esi
push edi
push ebx
push ebx
push ebx
push ebx
push 4
mov esi, edx
push 1
push esi
mov edi, ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x70], bl
mov byte [esp + 0x71], bl
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], bl
mov byte [esp + 0x74], bl
mov byte [esp + 0x75], 1
mov byte [esp + 0x68], bl
mov byte [esp + 0x69], bl
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bl
mov byte [esp + 0x6c], bl
mov byte [esp + 0x6d], 5
call ebp
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 1
lea ecx, [esp + 0x7c]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40b325
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RemoveReadOnly_AllocateAndInitializeSid__Everyone__error__u_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0x10
call fcn.0040b670
jmp 0x40b55e
lea edx, [esp + 0x28]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40b367
lea ecx, [esp + 0x24]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea edx, [esp + 0x74]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40b38b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RemoveReadOnly_AllocateAndInitializeSid__Admin__error__u_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0x10
call fcn.0040b670
jmp 0x40b55e
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x1c]
push ecx
push ebx
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
push 1
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x3c], 0x10000000
mov dword [esp + 0x40], 2
mov dword [esp + 0x44], 3
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], 5
mov dword [esp + 0x58], eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x40b3f8
push str.RemoveReadOnly_Failed_SetEntriesInAcl_n
jmp 0x40b4ef
mov eax, dword [esp + 0x1c]
push ebx
push eax
push ebx
push ebx
push 4
push 1
push esi
call ebp
cmp eax, ebx
jne 0x40b430
push str.RemoveReadOnly_Successfully_changed_DACL_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0xc
call fcn.0040b670
mov dword [esp + 0x18], 1
jmp 0x40b55e
cmp eax, 5
je 0x40b453
push eax
push str.RemoveReadOnly_First_SetNamedSecurityInfo_call_failed:__u_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0x10
call fcn.0040b670
jmp 0x40b55e
lea ecx, [esp + 0x14]
push ecx
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40b48f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RemoveReadOnly_OpenProcessToken_failed:__u_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0x10
call fcn.0040b670
jmp 0x40b55e
mov edx, dword [esp + 0x14]
push edx
mov eax, 1
call fcn.0040b5b0
test eax, eax
jne 0x40b4a9
push str.RemoveReadOnly_You_must_be_logged_on_as_Administrator._n
jmp 0x40b4ef
mov eax, dword [esp + 0x24]
push ebx
push ebx
push ebx
push eax
push 1
push 1
push esi
call ebp
cmp eax, ebx
je 0x40b4da
push eax
push str.RemoveReadOnly_Could_not_set_owner._Error:__u_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0x10
call fcn.0040b670
jmp 0x40b55e
mov ecx, dword [esp + 0x14]
push ecx
xor eax, eax
call fcn.0040b5b0
test eax, eax
jne 0x40b504
push str.RemoveReadOnly_Failed_SetPrivilege_call_unexpectedly._n
push 0x400
push edi
call fcn.00442ff8
add esp, 0xc
call fcn.0040b670
jmp 0x40b55e
mov edx, dword [esp + 0x1c]
push ebx
push edx
push ebx
push ebx
push 4
push 1
push esi
call ebp
cmp eax, ebx
jne 0x40b539
push str.RemoveReadOnly_Successfully_changed_DACL_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0xc
call fcn.0040b670
mov dword [esp + 0x18], 1
jmp 0x40b552
push eax
push str.RemoveReadOnly_Second_SetNamedSecurityInfo_call_failed:__u_n
push 0x400
push edi
call fcn.00442ff8
add esp, 0x10
call fcn.0040b670
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp eax, ebx
je 0x40b56f
push eax
call esi
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40b57a
push eax
call esi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40b589
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40b598
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00442896
add esp, 0x54
ret