Function at 0x40c6d0
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x34
mov eax, ecx
push ebx
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0xc], ebx
test eax, eax
jne 0x40c70f
xor al, al
jmp 0x40ca03
lea eax, [esp + 4]
push eax
push 8
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40c708
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push edi
lea eax, [esp + 0x10]
push eax
push ebx
push ebx
push 2
push dword [esp + 0x1c]
call ebp
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x40c756
call edi
cmp eax, 0x7a
je 0x40c756
xor al, al
jmp 0x40ca01
push esi
push 0x449d68
push dword [esp + 0x18]
call fcn.004100a8
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40c854
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push esi
push 2
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x40c7bb
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 1
push dword [esp + 0x20]
call ebp
test eax, eax
jne 0x40c7a1
call edi
cmp eax, 0x7a
jne 0x40c7bb
push 0x449d68
push dword [esp + 0x18]
call fcn.004100a8
mov edi, eax
pop ecx
pop ecx
mov dword [esp + 0x30], edi
test edi, edi
jne 0x40c7c3
push esi
call fcn.004100a3
jmp 0x40c822
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push edi
push 1
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x40c815
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 7
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
jne 0x40c7fb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
jne 0x40c815
push 0x449d68
push dword [esp + 0x18]
call fcn.004100a8
mov ebp, eax
pop ecx
pop ecx
mov dword [esp + 0x34], ebp
test ebp, ebp
jne 0x40c825
push esi
call fcn.004100a3
push edi
call fcn.004100a3
pop ecx
pop ecx
jmp 0x40c854
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push ebp
push 7
push dword [esp + 0x38]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
jne 0x40c865
push esi
call fcn.004100a3
push edi
call fcn.004100a3
push ebp
call fcn.004100a3
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor al, al
jmp 0x40ca00
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x40c8a0
cmp dword [esp + 0x24], ebx
jne 0x40c889
mov bl, 1
jmp 0x40c8a0
push 2
push 0xc
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x40c8c6
push esi
call fcn.004100a3
push edi
call fcn.004100a3
push ebp
call fcn.004100a3
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov al, bl
jmp 0x40ca00
mov eax, ebx
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x38], eax
jbe 0x40c9c5
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40c9ae
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40c9ae
cmp byte [eax], 1
jne 0x40c954
push dword [edi]
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x40c91e
mov ecx, dword [esp + 0x20]
or ecx, dword [eax + 4]
mov dword [esp + 0x20], ecx
mov ebp, ebx
cmp dword [esi], ebx
jbe 0x40c954
mov ebx, dword [esp + 0x20]
lea edi, [esi + 4]
push dword [edi]
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x40c942
or ebx, dword [eax + 4]
inc ebp
add edi, 8
cmp ebp, dword [esi]
jb 0x40c92b
mov edi, dword [esp + 0x30]
mov dword [esp + 0x20], ebx
xor ebx, ebx
cmp byte [eax], 0
jne 0x40c9ae
push dword [edi]
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x40c978
mov ecx, dword [esp + 0x1c]
or ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov ebp, ebx
cmp dword [esi], ebx
jbe 0x40c9ae
mov ebx, dword [esp + 0x1c]
lea edi, [esi + 4]
push dword [edi]
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x40c99c
or ebx, dword [eax + 4]
inc ebp
add edi, 8
cmp ebp, dword [esi]
jb 0x40c985
mov edi, dword [esp + 0x30]
mov dword [esp + 0x1c], ebx
xor ebx, ebx
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x38]
jb 0x40c8d6
mov ebp, dword [esp + 0x34]
push esi
call fcn.004100a3
push edi
call fcn.004100a3
push ebp
call fcn.004100a3
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x1c]
mov ecx, 0x1201b6
and eax, ecx
cmp eax, ecx
jne 0x40c9fe
test dword [esp + 0x20], ecx
jne 0x40c9fe
xor eax, eax
inc eax
jmp 0x40ca00
mov eax, ebx
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x34
ret