Function at 0x10042140
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 0x10042181
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 0x10042211
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x88]
jbe 0x100422ad
push eax
lea ecx, [esp + 0x88]
call fcn.100420f0
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 0x100422ad
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x10042242
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 0x10042262
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.100420f0
test eax, eax
jne 0x100422d9
lea ecx, [esp + 0x28c]
call fcn.100420c0
lea ecx, [esp + 0x84]
call fcn.100420c0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x484
ret
mov eax, dword [esp + 0x84]
test eax, eax
je 0x100422cc
lea ecx, [esp + 0x8c]
cmp eax, ecx
je 0x100422cc
push eax
call fcn.10067c4e
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 0x10042288
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 0x10042288
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100423a6
mov eax, dword [esp + 0x10]
xor esi, esi
cmp word [eax + 4], si
jbe 0x100423a6
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 0x10042288
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0
jne 0x10042377
lea edx, [esp + 0x40]
push edx
add eax, 8
push eax
call ebx
test eax, eax
mov eax, dword [esp + 0x1c]
je 0x10042377
cmp dword [eax + 4], 0x100440
je 0x10042393
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 0x10042288
mov eax, dword [esp + 0x10]
movzx ecx, word [eax + 4]
inc esi
cmp esi, ecx
jb 0x10042341
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 0x10042288
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 0x1004228f
call fcn.100420c0
lea ecx, [esp + 0x84]
call fcn.100420c0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x484
ret