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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x1003a8c8
push 0x1001a6e0
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 0x10006aba
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x10006aba
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 0x10006aba
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 0x10006aba
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 0x10006aba
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 0x10006aba
call edi
cmp eax, 0x7a
jne 0x10006aba
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 0x10006aba
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 0x10006aba
push 1
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x10006aba
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 0x10006aba
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x234], 8
mov eax, dword [ebp - 0x264]
test eax, eax
jne 0x10006813
mov dword [ebp - 0x228], eax
jmp 0x10006836
cmp dword [ebp - 0x228], 0
je 0x10006836
push 2
push 0xc
lea ecx, [ebp - 0x238]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x10006aba
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 0x10006aba
push 2
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x10006aba
xor edi, edi
mov dword [ebp - 0x290], edi
cmp dword [ebp - 0x228], edi
je 0x1000691a
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x1000691a
xor esi, esi
mov dword [ebp - 0x280], esi
cmp esi, eax
jae 0x1000691a
lea eax, [ebp - 0x25c]
push eax
push esi
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x10006aba
mov eax, dword [ebp - 0x25c]
test byte [eax + 1], 0x10
jne 0x1000691a
add eax, 8
push eax
push dword [ebp - 0x270]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x1000690b
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 0x10006aba
inc edi
mov dword [ebp - 0x290], edi
inc esi
mov dword [ebp - 0x280], esi
mov eax, dword [ebp - 0x238]
jmp 0x100068a5
push 0x208
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.10019c70
add esp, 0xc
lea edx, [ebp - 0x224]
mov ecx, 0x10039100
call fcn.100071f0
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 0x10006966
push 3
push 2
push ebx
call eax
jmp 0x1000696f
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x10006aba
cmp dword [ebp - 0x228], 0
je 0x100069de
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x100069de
nop word [eax + eax]
cmp esi, eax
jae 0x100069de
lea eax, [ebp - 0x25c]
push eax
push esi
push dword [ebp - 0x264]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x10006aba
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 0x10006aba
inc esi
mov dword [ebp - 0x280], esi
mov eax, dword [ebp - 0x238]
jmp 0x10006990
push 0
push ebx
push 1
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x10006aba
push 0x208
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.10019c70
add esp, 0xc
lea edx, [ebp - 0x224]
mov ecx, 0x10039100
call fcn.100071f0
push str.SetSecurityDescriptorControl
push eax
call edi
mov esi, eax
test esi, esi
je 0x10006a8d
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 0x10006aba
mov eax, dword [ebp - 0x22c]
test eax, 0x400
je 0x10006a72
mov eax, 0x500
jmp 0x10006a7e
test eax, 0x1000
je 0x10006a8d
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x258]
push eax
call esi
test eax, eax
je 0x10006aba
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.10006afa
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.10018459
mov esp, ebp
pop ebp
ret