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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1003a8b8
push 0x1001a770
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 0x100070ba
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x100070ba
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 0x100070ba
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 0x100070ba
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 0x100070ba
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 0x100070ba
call edi
cmp eax, 0x7a
jne 0x100070ba
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 0x100070ba
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 0x100070ba
push 1
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x100070ba
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 0x100070ba
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x12c], esi
mov dword [ebp - 0x130], 8
mov eax, dword [ebp - 0x160]
test eax, eax
jne 0x10006e13
mov dword [ebp - 0x124], eax
jmp 0x10006e36
cmp dword [ebp - 0x124], 0
je 0x10006e36
push 2
push 0xc
lea ecx, [ebp - 0x134]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x100070ba
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 0x100070ba
push 2
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x100070ba
xor edi, edi
mov dword [ebp - 0x18c], edi
cmp dword [ebp - 0x124], edi
je 0x10006f1a
mov eax, dword [ebp - 0x134]
test eax, eax
je 0x10006f1a
xor esi, esi
mov dword [ebp - 0x17c], esi
cmp esi, eax
jae 0x10006f1a
lea eax, [ebp - 0x158]
push eax
push esi
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x100070ba
mov eax, dword [ebp - 0x158]
test byte [eax + 1], 0x10
jne 0x10006f1a
add eax, 8
push eax
push dword [ebp - 0x16c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x10006f0b
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 0x100070ba
inc edi
mov dword [ebp - 0x18c], edi
inc esi
mov dword [ebp - 0x17c], esi
mov eax, dword [ebp - 0x134]
jmp 0x10006ea5
push 0x104
push 0
lea eax, [ebp - 0x120]
push eax
call fcn.10019d00
add esp, 0xc
lea edx, [ebp - 0x120]
mov ecx, str.advapi32.dll
call fcn.100072b0
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 0x10006f66
push 3
push 2
push ebx
call eax
jmp 0x10006f6f
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x100070ba
cmp dword [ebp - 0x124], 0
je 0x10006fde
mov eax, dword [ebp - 0x134]
test eax, eax
je 0x10006fde
nop word [eax + eax]
cmp esi, eax
jae 0x10006fde
lea eax, [ebp - 0x158]
push eax
push esi
push dword [ebp - 0x160]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x100070ba
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 0x100070ba
inc esi
mov dword [ebp - 0x17c], esi
mov eax, dword [ebp - 0x134]
jmp 0x10006f90
push 0
push ebx
push 1
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x100070ba
push 0x104
push 0
lea eax, [ebp - 0x120]
push eax
call fcn.10019d00
add esp, 0xc
lea edx, [ebp - 0x120]
mov ecx, str.advapi32.dll
call fcn.100072b0
push str.SetSecurityDescriptorControl
push eax
call edi
mov esi, eax
test esi, esi
je 0x1000708d
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 0x100070ba
mov eax, dword [ebp - 0x128]
test eax, 0x400
je 0x10007072
mov eax, 0x500
jmp 0x1000707e
test eax, 0x1000
je 0x1000708d
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x154]
push eax
call esi
test eax, eax
je 0x100070ba
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.100070fa
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.100184e9
mov esp, ebp
pop ebp
ret