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

Disassembly:
push 0x70
push 0x100ee928
call fcn.100ab584
xor esi, esi
cmp dword [ecx + 0x10b0], esi
je 0x1006df78
xor eax, eax
inc eax
jmp 0x1006e2d3
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
lea eax, [ebp - 0x3c]
push eax
push esi
push dword [ebp + 0xc]
push esi
mov edi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
call edi
mov dword [ebp - 0x40], eax
cmp eax, esi
jne 0x1006e2c7
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x1006dfdb
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
jmp 0x1006e2bb
push dword [ebp - 0x3c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call esi
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x1006e003
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
jmp 0x1006e2bb
push dword [ebp - 0x38]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x44], eax
test eax, eax
je 0x1006dff6
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push 0
call edi
mov dword [ebp - 0x40], eax
test eax, eax
je 0x1006dfce
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 4
push dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call edi
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x1006e2c7
call ebx
cmp eax, 0x7a
je 0x1006e06a
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
jmp 0x1006e2bb
push dword [ebp - 0x2c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x34], eax
test eax, eax
je 0x1006dff6
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x2c]
push eax
push 4
push dword [ebp + 8]
call edi
mov dword [ebp - 0x40], eax
xor edi, edi
cmp eax, edi
je 0x1006e05d
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1006e0b8
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
jmp 0x1006e2bb
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x1006e0de
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x1006e2bb
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x68], 8
cmp dword [ebp - 0x24], edi
jne 0x1006e0f3
mov dword [ebp - 0x30], edi
cmp dword [ebp - 0x30], edi
je 0x1006e11a
push 2
push 0xc
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x1006e11a
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
jmp 0x1006e2bb
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x68]
lea edi, [eax + ecx + 8]
mov dword [ebp - 0x5c], edi
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov esi, eax
mov dword [ebp - 0x48], esi
test esi, esi
je 0x1006dff6
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x1006e161
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
jmp 0x1006e2bb
xor edi, edi
mov dword [ebp - 0x4c], edi
cmp dword [ebp - 0x30], edi
je 0x1006e1e1
cmp dword [ebp - 0x6c], edi
je 0x1006e1e1
mov dword [ebp - 0x20], edi
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x6c]
jae 0x1006e1e1
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x1006e19a
call ebx
push eax
push str.GetAce___failed._Error__d_n
jmp 0x1006e2bb
mov eax, dword [ebp - 0x28]
test byte [eax + 1], 0x10
jne 0x1006e1e1
add eax, 8
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x1006e1dc
mov eax, dword [ebp - 0x28]
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 0x1006e1d9
call ebx
push eax
push str.AddAce___failed._Error__d_n
jmp 0x1006e2bb
inc dword [ebp - 0x4c]
inc dword [ebp - 0x20]
jmp 0x1006e173
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x60], eax
push dword [ebp - 0x1c]
push dword [ebp + 0x10]
cmp eax, edi
je 0x1006e21d
push 3
push 2
push esi
call eax
test eax, eax
jne 0x1006e237
call ebx
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
jmp 0x1006e2bb
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x1006e237
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
jmp 0x1006e2bb
cmp dword [ebp - 0x30], edi
je 0x1006e280
cmp dword [ebp - 0x6c], edi
je 0x1006e280
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x6c]
jae 0x1006e280
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x1006e18d
mov eax, dword [ebp - 0x28]
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
je 0x1006e1cc
inc dword [ebp - 0x20]
jmp 0x1006e241
push edi
push esi
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x1006e29e
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x1006e2bb
lea eax, [ebp - 0x80]
push eax
push 4
pop eax
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x1006e2c4
call ebx
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.100afc99
pop ecx
pop ecx
jmp 0x1006e2c7
mov dword [ebp - 0x50], esi
or dword [ebp - 4], 0xffffffff
call fcn.1006e2db
mov eax, dword [ebp - 0x50]
call fcn.100ab5bf
ret 0xc