Function at 0x4c41430
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x484
push 1
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0x10], 0
mov byte [esp + 0x11], 0
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0x14], 0
mov byte [esp + 0x15], 1
call dword [sym.imp.ADVAPI32.dll_InitializeSid]
test eax, eax
jne 0x4c41471
add esp, 0x484
ret
push ebx
push ebp
push esi
push edi
push 0
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x24]
push ecx
mov edi, 0x200
push edi
mov dword [eax], 0
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0x98]
push 4
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], edi
call ebx
mov esi, dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
push eax
call esi
test eax, eax
jne 0x4c41501
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x88]
jbe 0x4c4159d
push eax
lea ecx, [esp + 0x88]
call fcn.04c413e0
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
lea eax, [esp + 0x24]
push eax
push ecx
push edx
push 4
call ebx
push eax
call esi
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x88]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x4c4159d
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x4c41532
mov dword [esp + 0x20], 0
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [esp + 0x20]
add eax, 0x10
test ecx, ecx
je 0x4c41552
mov ecx, dword [esp + 0x10]
movzx edx, word [ecx + 2]
add eax, edx
lea ecx, [esp + 0x294]
mov dword [esp + 0x28c], ecx
push eax
lea ecx, [esp + 0x290]
mov dword [esp + 0x294], edi
call fcn.04c413e0
test eax, eax
jne 0x4c415c9
lea ecx, [esp + 0x28c]
call fcn.04c413b0
lea ecx, [esp + 0x84]
call fcn.04c413b0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x484
ret
mov eax, dword [esp + 0x84]
test eax, eax
je 0x4c415bc
lea ecx, [esp + 0x8c]
cmp eax, ecx
je 0x4c415bc
push eax
call fcn.04c59b0d
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x484
ret
mov edx, dword [esp + 0x290]
mov eax, dword [esp + 0x28c]
push 2
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4c41578
mov edx, dword [esp + 0x28c]
lea ecx, [esp + 0x40]
push ecx
push 0x100440
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4c41578
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4c41696
mov eax, dword [esp + 0x10]
xor esi, esi
cmp word [eax + 4], si
jbe 0x4c41696
mov ebp, dword [sym.imp.ADVAPI32.dll_GetAce]
mov ebx, dword [sym.imp.ADVAPI32.dll_EqualSid]
mov edi, dword [sym.imp.ADVAPI32.dll_AddAce]
lea ecx, [esp + 0x1c]
push ecx
push esi
push eax
call ebp
test eax, eax
je 0x4c41578
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0
jne 0x4c41667
lea edx, [esp + 0x40]
push edx
add eax, 8
push eax
call ebx
test eax, eax
mov eax, dword [esp + 0x1c]
je 0x4c41667
cmp dword [eax + 4], 0x100440
je 0x4c41683
movzx ecx, word [eax + 2]
mov edx, dword [esp + 0x28c]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edx
call edi
test eax, eax
je 0x4c41578
mov eax, dword [esp + 0x10]
movzx ecx, word [eax + 4]
inc esi
cmp esi, ecx
jb 0x4c41631
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 1
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
mov eax, dword [esp + 0x28c]
push 0
push eax
push 1
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4c41578
lea edx, [esp + 0x2c]
push edx
push 4
call ebx
push eax
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
lea ecx, [esp + 0x28c]
je 0x4c4157f
call fcn.04c413b0
lea ecx, [esp + 0x84]
call fcn.04c413b0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x484
ret