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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1003a8e8
push 0x1001a6e0
mov eax, dword fs:[0]
push eax
sub esp, 0x17c
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 - 0x128], eax
mov dword [ebp - 0x170], ecx
mov dword [ebp - 0x188], 0
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x16c], 0
mov dword [ebp - 0x168], 0
mov dword [ebp - 0x174], 0
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x160], 0
xor ebx, ebx
mov dword [ebp - 0x180], ebx
mov dword [ebp - 0x158], ebx
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0x178], ecx
mov dword [ebp - 0x184], ecx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x138]
push ecx
lea ecx, [ebp - 0x164]
push ecx
push esi
lea ecx, [ebp - 0x168]
push ecx
push esi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x1000703a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x1000703a
push dword [ebp - 0x168]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x16c], eax
test eax, eax
je 0x1000703a
mov eax, dword [ebp - 0x164]
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 - 0x188], eax
test eax, eax
je 0x1000703a
lea ecx, [ebp - 0x138]
push ecx
lea ecx, [ebp - 0x164]
push ecx
push eax
lea eax, [ebp - 0x168]
push eax
push dword [ebp - 0x16c]
push dword [ebp - 0x128]
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x1000703a
lea eax, [ebp - 0x15c]
push eax
push esi
push esi
push 4
push dword [ebp - 0x170]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
test eax, eax
jne 0x1000703a
call edi
cmp eax, 0x7a
jne 0x1000703a
push dword [ebp - 0x15c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x174], edi
test edi, edi
je 0x1000703a
lea eax, [ebp - 0x15c]
push eax
push dword [ebp - 0x15c]
push edi
push 4
push dword [ebp - 0x170]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
test eax, eax
je 0x1000703a
push 1
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x1000703a
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x124]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x1000703a
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x12c], esi
mov dword [ebp - 0x130], 8
mov eax, dword [ebp - 0x160]
test eax, eax
jne 0x10006d93
mov dword [ebp - 0x124], eax
jmp 0x10006db6
cmp dword [ebp - 0x124], 0
je 0x10006db6
push 2
push 0xc
lea ecx, [ebp - 0x134]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x1000703a
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, dword [ebp - 0x130]
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 - 0x180], ebx
test ebx, ebx
je 0x1000703a
push 2
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x1000703a
xor edi, edi
mov dword [ebp - 0x18c], edi
cmp dword [ebp - 0x124], edi
je 0x10006e9a
mov eax, dword [ebp - 0x134]
test eax, eax
je 0x10006e9a
xor esi, esi
mov dword [ebp - 0x17c], esi
cmp esi, eax
jae 0x10006e9a
lea eax, [ebp - 0x158]
push eax
push esi
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x1000703a
mov eax, dword [ebp - 0x158]
test byte [eax + 1], 0x10
jne 0x10006e9a
add eax, 8
push eax
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x10006e8b
mov ecx, dword [ebp - 0x158]
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 0x1000703a
inc edi
mov dword [ebp - 0x18c], edi
inc esi
mov dword [ebp - 0x17c], esi
mov eax, dword [ebp - 0x134]
jmp 0x10006e25
push 0x104
push 0
lea eax, [ebp - 0x120]
push eax
call fcn.10019c70
add esp, 0xc
lea edx, [ebp - 0x120]
mov ecx, str.advapi32.dll
call fcn.10007230
push str.AddAccessAllowedAceEx
push eax
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call edi
push dword [ebp - 0x16c]
push 0x10000000
test eax, eax
je 0x10006ee6
push 3
push 2
push ebx
call eax
jmp 0x10006eef
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x1000703a
cmp dword [ebp - 0x124], 0
je 0x10006f5e
mov eax, dword [ebp - 0x134]
test eax, eax
je 0x10006f5e
nop word [eax + eax]
cmp esi, eax
jae 0x10006f5e
lea eax, [ebp - 0x158]
push eax
push esi
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x1000703a
mov ecx, dword [ebp - 0x158]
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 0x1000703a
inc esi
mov dword [ebp - 0x17c], esi
mov eax, dword [ebp - 0x134]
jmp 0x10006f10
push 0
push ebx
push 1
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x1000703a
push 0x104
push 0
lea eax, [ebp - 0x120]
push eax
call fcn.10019c70
add esp, 0xc
lea edx, [ebp - 0x120]
mov ecx, str.advapi32.dll
call fcn.10007230
push str.SetSecurityDescriptorControl
push eax
call edi
mov esi, eax
test esi, esi
je 0x1000700d
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x13c], 0
lea eax, [ebp - 0x13c]
push eax
lea eax, [ebp - 0x128]
push eax
push dword [ebp - 0x174]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x1000703a
mov eax, dword [ebp - 0x128]
test eax, 0x400
je 0x10006ff2
mov eax, 0x500
jmp 0x10006ffe
test eax, 0x1000
je 0x1000700d
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x154]
push eax
call esi
test eax, eax
je 0x1000703a
lea eax, [ebp - 0x154]
push eax
push 4
push dword [ebp - 0x170]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x178], ecx
mov dword [ebp - 0x184], ecx
mov dword [ebp - 4], 0xfffffffe
call fcn.1000707a
mov eax, dword [ebp - 0x178]
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.10018459
mov esp, ebp
pop ebp
ret