Function at 0x485790
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x6554d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 0
mov byte [ebp - 0xa], 0
mov byte [ebp - 9], 0
mov byte [ebp - 8], 0
mov byte [ebp - 7], 1
mov eax, dword [ebp + 8]
push eax
call fcn.0045a810
add esp, 4
mov dword [ebp - 0x34], eax
push 0
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.00534f50
add esp, 8
test eax, eax
je 0x485804
mov eax, dword [ebp - 0x20]
jmp 0x485b2c
push 0xffffffffffffffff
mov edx, dword [ebp - 0x34]
push edx
call fcn.004851c0
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x485823
mov eax, dword [ebp - 0x20]
jmp 0x485b2c
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x24]
push eax
push 0
push 0
push 4
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
cmp dword [ebp - 0x24], 0
jne 0x48587d
push 0
lea edx, [ebp - 0x10]
push edx
push 0
call fcn.004840c0
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.00427a10
add esp, 4
push eax
push 0x5aefa4
call fcn.0041dc70
add esp, 8
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485afd
mov edx, dword [ebp - 0x24]
push edx
call fcn.0051f100
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4858a7
push str.add_remove_write_acl
call fcn.00402630
add esp, 4
mov dword [ebp - 0x20], eax
jmp 0x485afd
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push 4
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
jne 0x4858fc
push 0
lea ecx, [ebp - 0x10]
push ecx
push 0
call fcn.004840c0
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.00427a10
add esp, 4
push eax
push str._GetFileSecurity:__s_
call fcn.0041dc70
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485afd
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x48594f
push 0
lea edx, [ebp - 0x10]
push edx
push 0
call fcn.004840c0
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.00427a10
add esp, 4
push eax
push str._GetSecurityDescriptorDacl:__s_
call fcn.0041dc70
add esp, 8
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485afd
cmp dword [ebp - 0x44], 0
je 0x48595b
cmp dword [ebp - 0x28], 0
jne 0x485960
jmp 0x485afd
lea edx, [ebp - 0x40]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4859bd
push 0
lea ecx, [ebp - 0x10]
push ecx
push 0
call fcn.004840c0
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.00427a10
add esp, 4
push eax
push str._AllocateAndInitializeSid:__s_
call fcn.0041dc70
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485afd
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
jmp 0x4859d6
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x28]
movzx eax, word [edx + 4]
cmp dword [ebp - 0x2c], eax
jge 0x485a27
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x485a25
mov ecx, dword [ebp - 0x38]
movzx edx, byte [ecx]
test edx, edx
jne 0x485a25
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
add ecx, 8
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x485a25
jmp 0x485a27
jmp 0x4859cd
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 4]
cmp dword [ebp - 0x2c], edx
jge 0x485af3
mov dword [ebp - 0x30], 0
cmp dword [ebp + 0xc], 0
je 0x485a77
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
and ecx, 6
cmp ecx, 6
je 0x485a75
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [ebp - 0x30], 1
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 4]
or eax, 0x120116
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 4], eax
jmp 0x485a89
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [edx + 4], ecx
mov dword [ebp - 0x30], 1
cmp dword [ebp - 0x30], 0
je 0x485af3
mov edx, dword [ebp - 0x1c]
push edx
push 4
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x485af3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp dword [ebp + 0xc], 0
je 0x485abd
cmp dword [ebp - 0x3c], 5
je 0x485af3
push 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.004840c0
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.00427a10
add esp, 4
push eax
push str._SetFileSecurity:__s_
call fcn.0041dc70
add esp, 8
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x18], 0
je 0x485b0f
mov eax, dword [ebp - 0x18]
push eax
call fcn.0051f0d0
add esp, 4
xor ecx, ecx
jne 0x485afd
cmp dword [ebp - 0x1c], 0
je 0x485b25
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0051f0d0
add esp, 4
xor eax, eax
jne 0x485b13
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ce40
mov esp, ebp
pop ebp
ret