Function at 0x402ac0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x42a388
push 0x4076f0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x42c0e0]
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 ecx, dword [ebp + 8]
mov dword [ebp - 0x4c], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x30], 1
xor edi, edi
mov dword [ebp - 0x54], edi
xor esi, esi
mov dword [ebp - 0x3c], esi
xor ebx, ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x38], 4
mov dword [ebp - 4], eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
lea eax, [ebp - 0x38]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetUserObjectSecurity]
test eax, eax
jne 0x402bab
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x402d18
mov esi, dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
je 0x402d18
mov esi, dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x58], ebx
test ebx, ebx
je 0x402d18
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
mov esi, dword [ebp - 0x3c]
push esi
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_GetUserObjectSecurity]
test eax, eax
je 0x402d18
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x402d18
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x5c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x402d18
xorps xmm0, xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 8
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x402c0b
push 2
push 0xc
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x402d18
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, dword [ebp - 0x24]
add esi, 8
add esi, eax
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x54], edi
test edi, edi
je 0x402d18
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x402d18
cmp dword [ebp - 0x5c], 0
je 0x402ccd
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x402ccd
xor esi, esi
mov dword [ebp - 0x60], esi
nop dword [eax]
cmp esi, eax
jae 0x402ccd
lea eax, [ebp - 0x48]
push eax
push esi
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x402d18
mov ecx, dword [ebp - 0x48]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x402d18
mov eax, dword [ebp - 0x48]
cmp byte [eax], 0
jne 0x402cc4
cmp dword [eax + 4], 0xf01ff
jne 0x402cc4
add eax, 8
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [ebp - 0x30]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x68], ecx
inc esi
mov dword [ebp - 0x60], esi
mov eax, dword [ebp - 0x28]
jmp 0x402c60
cmp dword [ebp - 0x30], 0
je 0x402ce8
push dword [ebp - 0x34]
push 0xf01ff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x402d18
push 0
push edi
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x402d18
push ebx
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_SetUserObjectSecurity]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 4], 0xfffffffe
call fcn.00402d4f
mov eax, dword [ebp - 0x40]
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.00406096
mov esp, ebp
pop ebp
ret