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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1003a898
push 0x1001a770
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x1003e030]
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, edx
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x274], ecx
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x264], 0
xor ebx, ebx
mov dword [ebp - 0x284], ebx
mov dword [ebp - 0x25c], ebx
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0x27c], ecx
mov dword [ebp - 0x288], ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x23c]
push ecx
lea ecx, [ebp - 0x268]
push ecx
push esi
lea ecx, [ebp - 0x26c]
push ecx
push esi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x10006b3a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x10006b3a
push dword [ebp - 0x26c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x270], eax
test eax, eax
je 0x10006b3a
mov eax, dword [ebp - 0x268]
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x28c], eax
test eax, eax
je 0x10006b3a
lea ecx, [ebp - 0x23c]
push ecx
lea ecx, [ebp - 0x268]
push ecx
push eax
lea eax, [ebp - 0x26c]
push eax
push dword [ebp - 0x270]
push dword [ebp - 0x22c]
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x10006b3a
lea eax, [ebp - 0x260]
push eax
push esi
push esi
push 4
push dword [ebp - 0x274]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
jne 0x10006b3a
call edi
cmp eax, 0x7a
jne 0x10006b3a
push dword [ebp - 0x260]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x278], edi
test edi, edi
je 0x10006b3a
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x260]
push edi
push 4
push dword [ebp - 0x274]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
je 0x10006b3a
push 1
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x10006b3a
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x228]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x10006b3a
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x234], 8
mov eax, dword [ebp - 0x264]
test eax, eax
jne 0x10006893
mov dword [ebp - 0x228], eax
jmp 0x100068b6
cmp dword [ebp - 0x228], 0
je 0x100068b6
push 2
push 0xc
lea ecx, [ebp - 0x238]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x10006b3a
push dword [ebp - 0x270]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, dword [ebp - 0x234]
add edi, 8
add edi, eax
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x284], ebx
test ebx, ebx
je 0x10006b3a
push 2
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x10006b3a
xor edi, edi
mov dword [ebp - 0x290], edi
cmp dword [ebp - 0x228], edi
je 0x1000699a
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x1000699a
xor esi, esi
mov dword [ebp - 0x280], esi
cmp esi, eax
jae 0x1000699a
lea eax, [ebp - 0x25c]
push eax
push esi
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x10006b3a
mov eax, dword [ebp - 0x25c]
test byte [eax + 1], 0x10
jne 0x1000699a
add eax, 8
push eax
push dword [ebp - 0x270]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x1000698b
mov ecx, dword [ebp - 0x25c]
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 0x10006b3a
inc edi
mov dword [ebp - 0x290], edi
inc esi
mov dword [ebp - 0x280], esi
mov eax, dword [ebp - 0x238]
jmp 0x10006925
push 0x208
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.10019d00
add esp, 0xc
lea edx, [ebp - 0x224]
mov ecx, 0x10039100
call fcn.10007270
push str.AddAccessAllowedAceEx
push eax
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call edi
push dword [ebp - 0x270]
push 0x10000000
test eax, eax
je 0x100069e6
push 3
push 2
push ebx
call eax
jmp 0x100069ef
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x10006b3a
cmp dword [ebp - 0x228], 0
je 0x10006a5e
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x10006a5e
nop word [eax + eax]
cmp esi, eax
jae 0x10006a5e
lea eax, [ebp - 0x25c]
push eax
push esi
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x10006b3a
mov ecx, dword [ebp - 0x25c]
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 0x10006b3a
inc esi
mov dword [ebp - 0x280], esi
mov eax, dword [ebp - 0x238]
jmp 0x10006a10
push 0
push ebx
push 1
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x10006b3a
push 0x208
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.10019d00
add esp, 0xc
lea edx, [ebp - 0x224]
mov ecx, 0x10039100
call fcn.10007270
push str.SetSecurityDescriptorControl
push eax
call edi
mov esi, eax
test esi, esi
je 0x10006b0d
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x240], 0
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x278]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x10006b3a
mov eax, dword [ebp - 0x22c]
test eax, 0x400
je 0x10006af2
mov eax, 0x500
jmp 0x10006afe
test eax, 0x1000
je 0x10006b0d
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x258]
push eax
call esi
test eax, eax
je 0x10006b3a
lea eax, [ebp - 0x258]
push eax
push 4
push dword [ebp - 0x274]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x27c], ecx
mov dword [ebp - 0x288], ecx
mov dword [ebp - 4], 0xfffffffe
call fcn.10006b7a
mov eax, dword [ebp - 0x27c]
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.100184e9
mov esp, ebp
pop ebp
ret