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

Disassembly:
push 0x68
push 0x101f3318
call fcn.10088770
mov dword [ebp - 0x34], ecx
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x38]
push eax
push ebx
lea eax, [ebp - 0x3c]
push eax
push ebx
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, ebx
jne 0x10019349
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
je 0x10019018
call esi
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.100886c1
pop ecx
pop ecx
jmp 0x10019349
push dword [ebp - 0x3c]
push 8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call esi
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x10019043
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.HeapAlloc___failed._Error__d_n
jmp 0x1001900c
mov eax, dword [ebp - 0x38]
add eax, eax
push eax
push 8
call esi
push eax
call edi
mov dword [ebp - 0x44], eax
cmp eax, ebx
je 0x10019035
lea ecx, [ebp - 0x4c]
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x20]
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, ebx
jne 0x1001907d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10019006
push 1
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1001909e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
jmp 0x1001900c
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x100190c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x1001900c
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], 8
cmp dword [ebp - 0x2c], ebx
jne 0x100190dd
mov dword [ebp - 0x28], ebx
cmp dword [ebp - 0x28], ebx
je 0x10019108
push 2
push 0xc
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x10019108
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAclInformation___failed._Error__d_n
jmp 0x1001900c
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x60]
lea ebx, [eax + ecx + 8]
push ebx
push 8
call esi
push eax
call edi
mov esi, eax
mov dword [ebp - 0x24], esi
xor edi, edi
cmp esi, edi
je 0x10019035
push 2
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x1001914e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeAcl___failed._Error__d_n
jmp 0x1001900c
mov dword [ebp - 0x40], edi
cmp dword [ebp - 0x28], edi
je 0x100191da
cmp dword [ebp - 0x64], edi
je 0x100191da
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x1c], eax
jae 0x100191da
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x1001918f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAce___failed._Error__d_n
jmp 0x1001900c
mov eax, dword [ebp - 0x30]
test byte [eax + 1], 0x10
jne 0x100191da
add eax, 8
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x100191d5
mov eax, dword [ebp - 0x30]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x100191d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAce___failed._Error__d_n
jmp 0x1001900c
inc dword [ebp - 0x40]
inc dword [ebp - 0x1c]
jmp 0x10019162
push str.AddAccessAllowedAceEx
mov edi, str.advapi32.dll
push edi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call esi
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call ebx
push dword [ebp - 0x20]
push dword [ebp + 0xc]
test eax, eax
je 0x1001921e
push 3
push 2
push dword [ebp - 0x24]
call eax
test eax, eax
jne 0x1001923e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
jmp 0x1001900c
push 2
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x1001923e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
jmp 0x1001900c
cmp dword [ebp - 0x28], 0
je 0x1001928b
cmp dword [ebp - 0x64], 0
je 0x1001928b
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x64]
jae 0x1001928b
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x1001917e
mov eax, dword [ebp - 0x30]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x100191c1
inc dword [ebp - 0x1c]
jmp 0x1001924a
push 0
push dword [ebp - 0x24]
push 1
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x100192b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x1001900c
push str.SetSecurityDescriptorControl
push edi
call esi
push eax
call ebx
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x10019337
cmp dword [ebp - 0x34], edi
je 0x10019337
xor esi, esi
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], edi
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x100192f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
jmp 0x1001900c
test word [ebp + 8], 0x400
je 0x10019306
mov eax, 0x500
jmp 0x10019311
mov eax, 0x1000
test word [ebp + 8], ax
je 0x10019315
mov edi, eax
mov esi, eax
test si, si
je 0x10019337
push edi
push esi
lea eax, [ebp - 0x78]
push eax
call ebx
test eax, eax
jne 0x10019337
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
jmp 0x1001900c
mov dword [ebp - 0x48], 1
push 5
pop ecx
lea esi, [ebp - 0x78]
mov edi, dword [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], 0xfffffffe
call fcn.10019360
mov eax, dword [ebp - 0x48]
call fcn.100887b5
ret 8