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

Disassembly:
push 0x68
push 0x4e3b80
call fcn.004618e0
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x3c]
push eax
push ebx
lea eax, [ebp - 0x40]
push eax
push ebx
push dword [ebp + 0xc]
push ebx
mov edi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call edi
cmp eax, ebx
jne 0x408835
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
je 0x408489
call esi
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.0046182e
pop ecx
pop ecx
jmp 0x408835
push dword [ebp - 0x40]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call esi
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x4084b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.HeapAlloc___failed._Error__d_n
jmp 0x40847d
mov eax, dword [ebp - 0x3c]
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x44], eax
cmp eax, ebx
je 0x4084a4
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x20]
push dword [ebp + 0xc]
push ebx
call edi
cmp eax, ebx
jne 0x4084ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x408477
lea eax, [ebp - 0x34]
push eax
push ebx
push ebx
push 4
push dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call edi
cmp eax, ebx
jne 0x408835
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x408523
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetFileSecurity___failed._Error__d_n
jmp 0x40847d
push dword [ebp - 0x34]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x4084a4
lea ecx, [ebp - 0x34]
push ecx
push dword [ebp - 0x34]
push eax
push 4
push dword [ebp + 8]
call edi
cmp eax, ebx
je 0x408512
push 1
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x408570
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
jmp 0x40847d
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x40859a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x40847d
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], 8
cmp dword [ebp - 0x28], ebx
jne 0x4085af
mov dword [ebp - 0x38], ebx
cmp dword [ebp - 0x38], ebx
je 0x4085da
push 2
push 0xc
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4085da
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAclInformation___failed._Error__d_n
jmp 0x40847d
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x60]
lea edi, [eax + ecx + 8]
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov esi, eax
mov dword [ebp - 0x24], esi
cmp esi, ebx
je 0x4084a4
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x408622
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeAcl___failed._Error__d_n
jmp 0x40847d
mov dword [ebp - 0x48], ebx
cmp dword [ebp - 0x38], ebx
je 0x4086ae
cmp dword [ebp - 0x64], ebx
je 0x4086ae
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x1c], eax
jae 0x4086ae
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x408663
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAce___failed._Error__d_n
jmp 0x40847d
mov eax, dword [ebp - 0x2c]
test byte [eax + 1], 0x10
jne 0x4086ae
add eax, 8
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4086a9
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x4086a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAce___failed._Error__d_n
jmp 0x40847d
inc dword [ebp - 0x48]
inc dword [ebp - 0x1c]
jmp 0x408636
push str.AddAccessAllowedAceEx
push str.advapi32.dll
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call edi
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
push dword [ebp - 0x20]
push dword [ebp + 0x10]
cmp eax, ebx
je 0x4086f1
push 3
push 2
push dword [ebp - 0x24]
call eax
test eax, eax
jne 0x408711
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
jmp 0x40847d
push 2
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x408711
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
jmp 0x40847d
cmp dword [ebp - 0x38], ebx
je 0x40875c
cmp dword [ebp - 0x64], ebx
je 0x40875c
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x64]
jae 0x40875c
lea ecx, [ebp - 0x2c]
push ecx
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x408652
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x408695
inc dword [ebp - 0x1c]
jmp 0x40871b
push ebx
push dword [ebp - 0x24]
push 1
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x408781
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x40847d
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call edi
push eax
call esi
mov dword [ebp - 0x54], eax
cmp eax, ebx
je 0x408808
xor esi, esi
xor edi, edi
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], ebx
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x4087c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
jmp 0x40847d
test word [ebp + 0xc], 0x400
je 0x4087d6
mov eax, 0x500
jmp 0x4087e1
mov eax, 0x1000
test word [ebp + 0xc], ax
je 0x4087e5
mov edi, eax
mov esi, eax
cmp si, bx
je 0x408808
push edi
push esi
lea eax, [ebp - 0x78]
push eax
call dword [ebp - 0x54]
test eax, eax
jne 0x408808
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
jmp 0x40847d
lea eax, [ebp - 0x78]
push eax
push 4
pop eax
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x40882e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
jmp 0x40847d
mov dword [ebp - 0x4c], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0040884e
mov eax, dword [ebp - 0x4c]
call fcn.00461925
ret 0xc