Function at 0x417f00
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5e52c0
push 0x56f7e0
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x5f9e74]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x44], eax
cmp byte [0x605378], 0
jne 0x417f48
xor al, al
jmp 0x4182a0
push 0
push eax
call fcn.00572444
add esp, 8
test eax, eax
jne 0x417f41
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], eax
xor ebx, ebx
mov dword [ebp - 0x50], ebx
xor edi, edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 4], ebx
push str.CreateWellKnownSid
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x41828b
mov dword [ebp - 0x58], 0x44
push 0x44
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x41828b
lea ecx, [ebp - 0x58]
push ecx
push eax
push ebx
push 1
call esi
test eax, eax
je 0x41828b
mov dword [ebp - 0x34], ebx
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push 4
push dword [ebp - 0x44]
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call esi
test eax, eax
jne 0x41828b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x41828b
push dword [ebp - 0x34]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x40], eax
test eax, eax
je 0x41828b
lea ecx, [ebp - 0x34]
push ecx
push dword [ebp - 0x34]
push eax
push 4
push dword [ebp - 0x44]
call esi
test eax, eax
je 0x41828b
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x41828b
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x41828b
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41828b
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], 8
cmp dword [ebp - 0x38], ebx
je 0x418093
push 2
push 0xc
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x41828b
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, dword [ebp - 0x24]
add esi, 8
add esi, eax
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov ebx, eax
mov dword [ebp - 0x50], ebx
test ebx, ebx
je 0x41828b
push 2
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x41828b
xor edi, edi
mov dword [ebp - 0x60], edi
cmp dword [ebp - 0x38], edi
je 0x418147
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x418147
xor esi, esi
mov dword [ebp - 0x64], esi
cmp esi, eax
jae 0x418147
lea eax, [ebp - 0x30]
push eax
push esi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x41828b
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x41828b
test byte [eax + 1], 0x10
jne 0x418147
add eax, 8
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x418141
mov ecx, dword [ebp - 0x30]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x41828b
inc edi
mov dword [ebp - 0x60], edi
inc esi
mov eax, dword [ebp - 0x28]
jmp 0x4180e2
push str.AddAccessAllowedAceEx
push str.advapi32.dll
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
push dword [ebp - 0x2c]
push 0x10000000
test eax, eax
je 0x418177
push 3
push 2
push ebx
call eax
jmp 0x418180
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x41828b
cmp dword [ebp - 0x38], 0
je 0x4181e4
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4181e4
xor esi, esi
mov dword [ebp - 0x68], esi
cmp esi, eax
jae 0x4181de
lea eax, [ebp - 0x30]
push eax
push esi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x41828b
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x41828b
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x41828b
inc esi
mov eax, dword [ebp - 0x28]
jmp 0x418197
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push ebx
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x41828b
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call edi
push eax
call esi
mov esi, eax
test esi, esi
je 0x41825c
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x6c], 0
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x41828b
mov eax, dword [ebp - 0x4c]
test eax, 0x400
je 0x418244
mov eax, 0x500
jmp 0x418250
test eax, 0x1000
je 0x41825c
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x80]
push eax
call esi
test eax, eax
je 0x41828b
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x41828b
lea eax, [ebp - 0x80]
push eax
push 4
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
xor edi, edi
mov ecx, 1
test eax, eax
cmovne edi, ecx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 4], 0xfffffffe
call fcn.004182c5
xor eax, eax
cmp dword [ebp - 0x48], 1
sete al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00568e6a
mov esp, ebp
pop ebp
ret