Function at 0x479490
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x34
mov eax, dword [0x66e5c0]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push ebp
mov ebx, ecx
mov dword [esp + 0x18], 0
lea eax, [esp + 0x18]
mov dword [esp + 0x10], ebx
push eax
push 0
lea ebp, [ebx + 4]
push ebp
push 0
push 0
push 4
push 4
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
jne 0x4796bc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4796bc
cmp dword [ebp], 0
jne 0x4794fb
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebp
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004c3ed9
add esp, 0x34
ret
push edi
push dword [ebx + 8]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x101
xorps xmm0, xmm0
mov dword [esp + 0x28], 0x5000000
push eax
mov dword [esp + 0x30], 0x12
movq qword [esp + 0x38], xmm0
mov dword [esp + 0x40], 0
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4796b1
mov edi, dword [sym.imp.ADVAPI32.dll_GetAclInformation]
lea eax, [esp + 0x30]
push 2
push 0xc
push eax
push dword [ebp]
call edi
test eax, eax
je 0x4796b1
push esi
push 1
push 4
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
push eax
push dword [ebp]
mov esi, 2
call edi
push dword [ebx + 8]
test eax, eax
cmovne esi, dword [esp + 0x34]
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [esp + 0x10], eax
lea edx, [eax + 8]
mov eax, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x1c], eax
lea ecx, [eax + edx]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov eax, dword [esp + 0x10]
add eax, 8
cmp eax, 0xffff
ja 0x479694
mov eax, dword [esp + 0x1c]
cmp eax, 0xffff
ja 0x479694
test edi, edi
je 0x479694
push esi
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov esi, dword [esp + 0x1c]
mov eax, 2
mov ecx, dword [esp + 0x10]
add esi, edi
push ecx
mov word [esi + 4], ax
lea eax, [ecx + 8]
mov word [esi + 2], ax
lea eax, [esi + 8]
mov byte [esi], 1
push dword [ebx + 8]
push eax
call fcn.004ce090
mov eax, dword [esp + 0x1c]
add esp, 0xc
add eax, 8
push eax
push esi
push 0xffffffffffffffff
push dword [esp + 0x20]
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x47968d
xor esi, esi
mov bl, 1
cmp dword [esp + 0x34], esi
jbe 0x479673
nop dword [eax]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push esi
push dword [ebp]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x479668
mov ecx, dword [esp + 0x1c]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push dword [esp + 0x20]
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
neg eax
sbb al, al
and bl, al
inc esi
cmp esi, dword [esp + 0x34]
jb 0x479630
test bl, bl
je 0x47968d
mov eax, dword [esp + 0x18]
push 0
push edi
push 0
push 0
push 0x20000004
push 4
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004c3ed9
add esp, 0x34
ret
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov ecx, dword [esp + 0x38]
pop ebp
pop ebx
xor ecx, esp
call fcn.004c3ed9
add esp, 0x34
ret