Function at 0x419180
Capabilities:
Compare security identifiers
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x4aa6b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
push esi
push edi
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x2c]
push edx
mov dword [ebp - 0x28], eax
xor eax, eax
push eax
lea ecx, [ebp - 0x24]
push ecx
push eax
push str.Users
push eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], eax
call ebx
mov edx, dword [ebp - 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edx
push 8
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x2c]
lea ecx, [eax + eax]
push ecx
push 8
call esi
push eax
call edi
lea edx, [ebp - 0x34]
push edx
lea ecx, [ebp - 0x2c]
push ecx
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x24]
push edx
push eax
push str.Users
push 0
call ebx
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x20]
push ecx
push 0
push 0
push 4
push edx
mov dword [ebp - 0x20], 0
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
mov eax, dword [ebp - 0x20]
push eax
push 8
call esi
push eax
call edi
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x20]
push ecx
push edx
mov ebx, eax
mov eax, dword [ebp - 0x28]
push ebx
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
push 1
lea ecx, [ebp - 0x4c]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
lea edx, [ebp - 0x38]
mov dword [ebp - 0x1c], 0
push edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x30]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 8
cmp dword [ebp - 0x30], eax
je 0x419288
mov eax, dword [ebp - 0x1c]
push 2
push 0xc
lea edx, [ebp - 0x10]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, dword [ebp - 0xc]
lea ebx, [eax + edx + 0xa]
push ebx
push 8
call esi
push eax
call edi
push 2
mov edi, eax
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov ebx, dword [sym.imp.ADVAPI32.dll_AddAce]
xor esi, esi
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x30], esi
je 0x419302
cmp dword [ebp - 0x10], esi
je 0x419302
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov eax, dword [ebp - 0x14]
cmp byte [eax + 1], 0x10
je 0x419302
mov edx, dword [ebp - 0x18]
add eax, 8
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4192fc
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edi
call ebx
inc esi
cmp esi, dword [ebp - 0x10]
jne 0x4192c2
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x18]
push edx
push 0x10000000
push 3
push 2
push edi
call eax
cmp dword [ebp - 0x30], 0
je 0x419365
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x419365
cmp esi, eax
je 0x419365
lea ebx, [ebx]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov eax, dword [ebp - 0x14]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push edi
call ebx
inc esi
cmp esi, dword [ebp - 0x10]
jne 0x419340
push 0
push edi
push 1
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x4c]
push ecx
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0041d331
mov esp, ebp
pop ebp
ret