Function at 0x424220
Capabilities:
Compare security identifiers
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x44baa8
push 0x42e570
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x44e310]
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 eax, dword [ebp + 8]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
xor ebx, ebx
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x54], ebx
xor esi, esi
xor eax, eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x64]
push eax
push esi
lea eax, [ebp - 0x60]
push eax
push esi
push str.Everyone
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x4245e8
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x4245e8
push dword [ebp - 0x60]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x68], eax
test eax, eax
je 0x4245e8
mov eax, dword [ebp - 0x64]
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x4245e8
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x64]
push ecx
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x68]
push str.Everyone
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x4245e8
lea eax, [ebp - 0x5c]
push eax
push esi
push esi
push 4
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
jne 0x4245e8
call edi
cmp eax, 0x7a
jne 0x4245e8
push dword [ebp - 0x5c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x70], edi
test edi, edi
je 0x4245e8
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x5c]
push edi
push 4
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
je 0x4245e8
push 1
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4245e8
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x4245e8
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], 8
mov eax, dword [ebp - 0x58]
test eax, eax
jne 0x4243dc
mov dword [ebp - 0x20], eax
jmp 0x4243f9
cmp dword [ebp - 0x20], 0
je 0x4243f9
push 2
push 0xc
lea ecx, [ebp - 0x30]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x4245e8
push dword [ebp - 0x68]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, dword [ebp - 0x2c]
add edi, 8
add edi, eax
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x84], ebx
test ebx, ebx
je 0x4245e8
push 2
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4245e8
xor edi, edi
mov dword [ebp - 0x8c], edi
cmp dword [ebp - 0x20], edi
je 0x4244b5
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4244b5
xor esi, esi
mov dword [ebp - 0x78], esi
cmp esi, eax
jae 0x4244b5
lea eax, [ebp - 0x54]
push eax
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x4245e8
mov eax, dword [ebp - 0x54]
test byte [eax + 1], 0x10
jne 0x4244b5
add eax, 8
push eax
push dword [ebp - 0x68]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4244ac
mov ecx, dword [ebp - 0x54]
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 0x4245e8
inc edi
mov dword [ebp - 0x8c], edi
inc esi
mov dword [ebp - 0x78], esi
mov eax, dword [ebp - 0x30]
jmp 0x424455
push str.AddAccessAllowedAceEx
push str.advapi32.dll
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x68]
push 0x10000000
test eax, eax
je 0x4244e3
push 3
push 2
push ebx
call eax
jmp 0x4244ec
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4245e8
cmp dword [ebp - 0x20], 0
je 0x424540
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x424540
cmp esi, eax
jae 0x424540
lea eax, [ebp - 0x54]
push eax
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x4245e8
mov ecx, dword [ebp - 0x54]
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 0x4245e8
inc esi
mov dword [ebp - 0x78], esi
mov eax, dword [ebp - 0x30]
jmp 0x424501
push 0
push ebx
push 1
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4245e8
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x88], eax
test eax, eax
je 0x4245c7
xor esi, esi
xor edi, edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x34], esi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x4245e8
mov eax, dword [ebp - 0x24]
test eax, 0x400
je 0x4245a4
mov esi, 0x500
jmp 0x4245b0
test eax, 0x1000
je 0x4245b2
mov esi, 0x1000
mov edi, esi
test si, si
je 0x4245c7
push edi
push esi
lea eax, [ebp - 0x50]
push eax
call dword [ebp - 0x88]
test eax, eax
je 0x4245e8
lea eax, [ebp - 0x50]
push eax
push 4
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x80], ecx
mov dword [ebp - 4], 0xfffffffe
call fcn.00424621
mov eax, dword [ebp - 0x74]
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.00429eaf
mov esp, ebp
pop ebp
ret 4