Function at 0x4053c7
Capabilities:
Compare security identifiers

Disassembly:
push 0x38
push 0x40c890
call fcn.0040c4bc
mov eax, ecx
mov dword [ebp - 0x48], eax
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], ebx
mov esi, ebx
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], 0x500
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x3c], ebx
mov edi, ebx
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], ebx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4055f1
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4055f1
lea eax, [ebp - 0x38]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4055f1
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x13
push 1
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4055f1
lea eax, [ebp - 0x30]
push eax
push 1
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x4054bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x4055f1
lea eax, [ebp - 0x30]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4055f1
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4055f1
lea ecx, [ebp - 0x3c]
push ecx
push ebx
push ebx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4055f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4055f1
push dword [ebp - 0x3c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x28], edi
test edi, edi
je 0x4055ee
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x3c]
push edi
push 1
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x4055ee
push dword [edi]
mov edi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
call edi
mov esi, eax
push dword [ebp - 0x2c]
call edi
add esi, eax
push dword [ebp - 0x38]
call edi
add esi, eax
push dword [ebp - 0x34]
call edi
lea edi, [esi + 0x34]
add edi, eax
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 - 0x40], esi
test esi, esi
je 0x4055ee
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4055ee
push dword [ebp - 0x34]
push 0xc01f0000
push 2
push esi
mov edi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
call edi
test eax, eax
je 0x4055ee
push dword [ebp - 0x38]
push 0xc01f0000
push 2
push esi
call edi
test eax, eax
je 0x4055ee
push dword [ebp - 0x2c]
push 0xc0110000
push 2
push esi
call edi
mov edi, dword [ebp - 0x28]
test eax, eax
je 0x4055f1
push dword [edi]
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4055d8
push dword [edi]
push 0xc01f0000
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4055ee
push ebx
push esi
xor edi, edi
inc edi
push edi
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4055ee
mov dword [ebp - 0x44], edi
mov edi, dword [ebp - 0x28]
mov dword [ebp - 4], 0xfffffffe
call fcn.00405628
cmp dword [ebp - 0x44], 0
jne 0x405618
test esi, esi
je 0x405618
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, ebx
mov eax, esi
call fcn.0040c504
ret