Function at 0x474040
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4a72a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x20], ecx
call fcn.00450bf2
test al, al
je 0x47407e
mov ecx, dword [ebp + 4]
mov esi, 0x80070057
push esi
push 0x410908
push 0x14
pop edx
call fcn.0041ff4a
mov eax, esi
jmp 0x47426b
xor ebx, ebx
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
push ebx
push ebx
push 4
push 1
push ecx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
je 0x4740b4
push eax
push ecx
mov ecx, dword [ebp + 4]
push 0x1c
pop edx
call fcn.00475d1d
mov ebx, eax
jmp 0x47425a
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 1
push 2
push 2
lea eax, [ebp - 0xc]
mov word [ebp - 8], 0xf00
push eax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4740ea
push 0x410908
push 0x2c
jmp 0x4741a2
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x1c], ebx
mov edi, ebx
cmp ax, word [ecx + 4]
jae 0x474145
lea eax, [ebp - 0x1c]
push eax
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x47419b
mov esi, dword [ebp - 0x1c]
cmp byte [esi], bl
jne 0x474139
test byte [esi + 1], 8
jne 0x474139
push dword [ebp - 0x10]
lea eax, [esi + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x474139
test dword [esi + 4], 0x120089
jne 0x47424b
mov ecx, dword [ebp - 0x14]
inc edi
movzx eax, word [ecx + 4]
cmp edi, eax
jb 0x4740fa
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea ecx, [eax + 0xc]
cmp ecx, eax
jb 0x474235
mov eax, dword [ebp - 0x14]
movzx edi, word [eax + 2]
add edi, ecx
cmp edi, ecx
jb 0x474226
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
jne 0x4741b2
mov ecx, dword [ebp + 4]
mov ebx, 0x8007000e
push ebx
push 0x410908
push 0x48
pop edx
call fcn.0041ff4a
jmp 0x474217
push 0x410908
push 0x31
mov ecx, dword [ebp + 4]
pop edx
call fcn.0041ff67
mov ebx, eax
jmp 0x47424b
mov ecx, dword [ebp - 0x14]
movzx eax, word [ecx + 2]
push eax
push ecx
push edi
push esi
call dword [sym.imp.msvcrt.dll_memcpy_s]
add esp, 0x10
mov word [esi + 2], di
push dword [ebp - 0x10]
push 0x120089
push 3
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
test eax, eax
jne 0x4741f3
mov ecx, dword [ebp + 4]
push 0x410908
push 0x4d
pop edx
call fcn.0041ff67
jmp 0x474215
push ebx
push esi
push ebx
push ebx
push 4
push 1
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
je 0x47421a
push eax
push ecx
mov ecx, dword [ebp + 4]
push 0x50
pop edx
call fcn.00475d1d
mov ebx, eax
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x47424b
push esi
call fcn.00468e04
jmp 0x47424b
mov ebx, 0x80070216
push ebx
push 0x410908
push 0x45
jmp 0x474242
mov ebx, 0x80070216
push ebx
push 0x410908
push 0x44
mov ecx, dword [ebp + 4]
pop edx
call fcn.0041ff4a
cmp dword [ebp - 0x10], 0
je 0x47425a
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x18], 0
je 0x474269
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004981f0
leave
ret