Function at 0x402db0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x42a368
push 0x4076f0
mov eax, dword fs:[0]
push eax
sub esp, 0x60
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 - 0x50], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
xor edi, edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x3c], 1
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x58], eax
xor ebx, ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x34], eax
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x40], 4
mov dword [ebp - 4], eax
lea eax, [ebp - 0x2c]
push eax
push esi
push esi
lea eax, [ebp - 0x40]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetUserObjectSecurity]
test eax, eax
jne 0x402e9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40309d
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 dword [ebp - 0x34], eax
test eax, eax
je 0x40309d
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 - 0x38], esi
test esi, esi
je 0x40309d
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x34]
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.USER32.dll_GetUserObjectSecurity]
test eax, eax
je 0x40309d
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40309d
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x40309d
xorps xmm0, xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 8
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40309d
push 2
push 0xc
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x40309d
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x24]
add ecx, 0x10
lea eax, [ecx + eax*2]
mov dword [ebp - 0x60], eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x5c], ebx
test ebx, ebx
je 0x40309d
push 2
push dword [ebp - 0x60]
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x40309d
cmp dword [ebp - 0x64], 0
je 0x402fd0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x402fd0
xor esi, esi
mov dword [ebp - 0x68], esi
nop dword [eax]
cmp esi, eax
jae 0x402fcd
lea eax, [ebp - 0x4c]
push eax
push esi
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40309d
mov ecx, dword [ebp - 0x4c]
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 0x40309d
mov eax, dword [ebp - 0x4c]
cmp byte [eax], 0
jne 0x402fc4
cmp dword [eax + 4], 0xf0000000
jne 0x402fc4
add eax, 8
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [ebp - 0x3c]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x70], ecx
inc esi
mov dword [ebp - 0x68], esi
mov eax, dword [ebp - 0x28]
jmp 0x402f60
mov esi, dword [ebp - 0x38]
cmp dword [ebp - 0x3c], 0
je 0x40306d
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea esi, [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x54], edi
test edi, edi
je 0x40309d
mov word [edi], 0xb00
mov esi, dword [ebp - 0x30]
push esi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
add eax, 8
mov word [edi + 2], ax
mov dword [edi + 4], 0xf0000000
push esi
lea eax, [edi + 8]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
push eax
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x40309d
movzx eax, word [edi + 2]
push eax
push edi
push 0xffffffffffffffff
push 2
push ebx
mov esi, dword [sym.imp.ADVAPI32.dll_AddAce]
call esi
test eax, eax
je 0x40309d
mov byte [edi + 1], 4
mov dword [edi + 4], 0xf037f
movzx eax, word [edi + 2]
push eax
push edi
push 0xffffffffffffffff
push 2
push ebx
call esi
test eax, eax
je 0x40309d
mov esi, dword [ebp - 0x38]
push 0
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40309d
push esi
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.USER32.dll_SetUserObjectSecurity]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 4], 0xfffffffe
call fcn.004030d4
mov eax, dword [ebp - 0x44]
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