Function at 0x40f408
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
push edi
xor eax, eax
mov dword [esp + 0x28], ecx
lea edi, [esp + 0x38]
xor ebx, ebx
stosd dword es:[edi], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
stosd dword es:[edi], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
stosd dword es:[edi], eax
mov dword [esp + 0x18], ebx
test ecx, ecx
je 0x40f49c
lea eax, [esp + 0x10]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f49c
mov ebp, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 2
push dword [esp + 0x20]
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40f47c
call edi
cmp eax, 0x7a
jne 0x40f49c
push 0x45f8cc
push dword [esp + 0x18]
call fcn.0041bcdd
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40f4a6
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push esi
push 2
push dword [esp + 0x20]
call ebp
test eax, eax
jne 0x40f4c5
push esi
call fcn.0041bce6
pop ecx
jmp 0x40f492
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 1
push dword [esp + 0x20]
call ebp
test eax, eax
jne 0x40f4df
call edi
cmp eax, 0x7a
jne 0x40f4bc
push 0x45f8cc
push dword [esp + 0x18]
call fcn.0041bcdd
mov edi, eax
mov dword [esp + 0x38], edi
pop ecx
pop ecx
test edi, edi
je 0x40f4bc
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push edi
push 1
push dword [esp + 0x20]
call ebp
test eax, eax
jne 0x40f51e
push esi
call fcn.0041bce6
push edi
call fcn.0041bce6
pop ecx
jmp 0x40f4c2
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 0x40f540
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40f50f
push 0x45f8cc
push dword [esp + 0x18]
call fcn.0041bcdd
mov ebp, eax
mov dword [esp + 0x3c], ebp
pop ecx
pop ecx
test ebp, ebp
je 0x40f50f
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 0x40f58e
push esi
call fcn.0041bce6
push edi
call fcn.0041bce6
push ebp
call fcn.0041bce6
add esp, 0xc
jmp 0x40f492
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 0x40f5c9
cmp dword [esp + 0x24], ebx
jne 0x40f5b2
mov bl, 1
jmp 0x40f5c9
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 0x40f5ef
push esi
call fcn.0041bce6
push edi
call fcn.0041bce6
push ebp
call fcn.0041bce6
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
jmp 0x40f49e
mov eax, ebx
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x38], eax
jbe 0x40f6ee
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40f6d7
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40f6d7
cmp byte [eax], 1
jne 0x40f67d
push dword [edi]
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x40f647
mov ecx, dword [esp + 0x20]
or ecx, dword [eax + 4]
mov dword [esp + 0x20], ecx
mov ebp, ebx
cmp dword [esi], ebx
jbe 0x40f67d
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 0x40f66b
or ebx, dword [eax + 4]
inc ebp
add edi, 8
cmp ebp, dword [esi]
jb 0x40f654
mov edi, dword [esp + 0x30]
mov dword [esp + 0x20], ebx
xor ebx, ebx
cmp byte [eax], 0
jne 0x40f6d7
push dword [edi]
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
mov eax, dword [esp + 0x18]
je 0x40f6a1
mov ecx, dword [esp + 0x1c]
or ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov ebp, ebx
cmp dword [esi], ebx
jbe 0x40f6d7
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 0x40f6c5
or ebx, dword [eax + 4]
inc ebp
add edi, 8
cmp ebp, dword [esi]
jb 0x40f6ae
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 0x40f5ff
mov ebp, dword [esp + 0x34]
push esi
call fcn.0041bce6
push edi
call fcn.0041bce6
push ebp
call fcn.0041bce6
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 0x40f5e8
test dword [esp + 0x20], ecx
jne 0x40f5e8
xor eax, eax
inc eax
jmp 0x40f49e