Function at 0x485850
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x6552e0]
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.0045a700
add esp, 4
mov dword [ebp - 0x34], eax
push 0
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.00535790
add esp, 8
test eax, eax
je 0x4858c4
mov eax, dword [ebp - 0x20]
jmp 0x485bea
mov edx, dword [ebp - 0x34]
push edx
call fcn.00403310
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4858e1
mov eax, dword [ebp - 0x20]
jmp 0x485bea
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_GetFileSecurityA]
cmp dword [ebp - 0x24], 0
jne 0x48593b
push 0
lea edx, [ebp - 0x10]
push edx
push 0
call fcn.004841f0
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.004278c0
add esp, 4
push eax
push 0x5aee34
call fcn.0041db70
add esp, 8
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485bbb
mov edx, dword [ebp - 0x24]
push edx
call fcn.0051f100
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x485965
push str.add_remove_write_acl
call fcn.00402610
add esp, 4
mov dword [ebp - 0x20], eax
jmp 0x485bbb
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_GetFileSecurityA]
test eax, eax
jne 0x4859ba
push 0
lea ecx, [ebp - 0x10]
push ecx
push 0
call fcn.004841f0
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.004278c0
add esp, 4
push eax
push str._GetFileSecurity:__s_
call fcn.0041db70
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485bbb
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 0x485a0d
push 0
lea edx, [ebp - 0x10]
push edx
push 0
call fcn.004841f0
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.004278c0
add esp, 4
push eax
push str._GetSecurityDescriptorDacl:__s_
call fcn.0041db70
add esp, 8
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485bbb
cmp dword [ebp - 0x44], 0
je 0x485a19
cmp dword [ebp - 0x28], 0
jne 0x485a1e
jmp 0x485bbb
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 0x485a7b
push 0
lea ecx, [ebp - 0x10]
push ecx
push 0
call fcn.004841f0
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.004278c0
add esp, 4
push eax
push str._AllocateAndInitializeSid:__s_
call fcn.0041db70
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x485bbb
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
jmp 0x485a94
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 0x485ae5
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 0x485ae3
mov ecx, dword [ebp - 0x38]
movzx edx, byte [ecx]
test edx, edx
jne 0x485ae3
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 0x485ae3
jmp 0x485ae5
jmp 0x485a8b
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 4]
cmp dword [ebp - 0x2c], edx
jge 0x485bb1
mov dword [ebp - 0x30], 0
cmp dword [ebp + 0xc], 0
je 0x485b35
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
and ecx, 6
cmp ecx, 6
je 0x485b33
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 0x485b47
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 0x485bb1
mov edx, dword [ebp - 0x1c]
push edx
push 4
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x485bb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp dword [ebp + 0xc], 0
je 0x485b7b
cmp dword [ebp - 0x3c], 5
je 0x485bb1
push 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.004841f0
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.004278c0
add esp, 4
push eax
push str._SetFileSecurity:__s_
call fcn.0041db70
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 0x485bcd
mov eax, dword [ebp - 0x18]
push eax
call fcn.0051f0d0
add esp, 4
xor ecx, ecx
jne 0x485bbb
cmp dword [ebp - 0x1c], 0
je 0x485be3
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0051f0d0
add esp, 4
xor eax, eax
jne 0x485bd1
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ce40
mov esp, ebp
pop ebp
ret