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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x48fb10
push 0x42d960
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [0x49a670]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x30]
push ecx
push esi
lea edx, [ebp - 0x34]
push edx
push esi
mov eax, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, esi
jne 0x401fdb
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x401b89
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov ecx, dword [ebp - 0x34]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x401bbc
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov edx, dword [ebp - 0x30]
lea eax, [edx + edx]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x44], eax
test eax, eax
je 0x401ba7
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x30]
push edx
push eax
lea eax, [ebp - 0x34]
push eax
push esi
mov ecx, dword [ebp + 0xc]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x401b74
lea edx, [ebp - 0x20]
push edx
push 0
push 0
push 4
mov eax, dword [ebp + 8]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call esi
test eax, eax
jne 0x401fdb
call ebx
cmp eax, 0x7a
je 0x401c2d
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov ecx, dword [ebp - 0x20]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov ebx, eax
mov dword [ebp - 0x3c], ebx
test ebx, ebx
jne 0x401c5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x20]
push eax
push ebx
push 4
mov ecx, dword [ebp + 8]
push ecx
call esi
xor esi, esi
cmp eax, esi
jne 0x401c8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
push 1
lea edx, [ebp - 0x74]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x401cb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x24]
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x401ce7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x5c], 8
mov eax, dword [ebp - 0x28]
cmp eax, esi
jne 0x401d4f
mov dword [ebp - 0x24], esi
mov ebx, dword [ebp - 0x38]
push ebx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edx, dword [ebp - 0x5c]
lea esi, [eax + edx + 8]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edi, eax
mov dword [ebp - 0x48], edi
test edi, edi
je 0x401c45
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x401d80
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InitializeAcl___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
cmp dword [ebp - 0x24], esi
je 0x401cfe
push 2
push 0xc
lea ecx, [ebp - 0x60]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x401cfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAclInformation___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
xor esi, esi
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x24], esi
je 0x401e24
cmp dword [ebp - 0x60], esi
je 0x401e24
mov dword [ebp - 0x2c], esi
cmp esi, dword [ebp - 0x60]
jae 0x401e27
lea eax, [ebp - 0x1c]
push eax
push esi
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x401dcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetAce___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov eax, dword [ebp - 0x1c]
test byte [eax + 1], 0x10
jne 0x401e27
add eax, 8
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401e1c
mov eax, dword [ebp - 0x1c]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x401e18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAce___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
add dword [ebp - 0x40], 1
add esi, 1
jmp 0x401d97
mov esi, dword [ebp - 0x2c]
push str.AddAccessAllowedAceEx
push 0x47f884
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
test eax, eax
je 0x401e6b
mov ecx, dword [ebp + 0x10]
push ecx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x401e95
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov edx, dword [ebp + 0x10]
push edx
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x401e95
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
cmp dword [ebp - 0x24], 0
je 0x401ee1
cmp dword [ebp - 0x60], 0
je 0x401ee1
cmp esi, dword [ebp - 0x60]
jae 0x401ee1
lea eax, [ebp - 0x1c]
push eax
push esi
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x401db6
mov eax, dword [ebp - 0x1c]
movzx edx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x401dff
add esi, 1
mov dword [ebp - 0x2c], esi
jmp 0x401ea1
push 0
push edi
push 1
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x401f0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
push str.SetSecurityDescriptorControl
push 0x47f884
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
xor esi, esi
cmp ebx, esi
je 0x401fa6
xor edi, edi
mov dword [ebp + 0xc], esi
mov dword [ebp + 0x10], esi
lea ecx, [ebp + 0x10]
push ecx
lea edx, [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x401f60
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov eax, dword [ebp + 0xc]
test eax, 0x400
je 0x401f71
mov esi, 0x500
jmp 0x401f7d
test eax, 0x1000
je 0x401f7f
mov esi, 0x1000
mov edi, esi
test si, si
je 0x401fa6
push edi
push esi
lea ecx, [ebp - 0x74]
push ecx
call ebx
test eax, eax
jne 0x401fa6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
lea edx, [ebp - 0x74]
push edx
mov eax, 4
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x401fd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.0042d8ac
add esp, 8
jmp 0x401fdb
mov dword [ebp - 0x4c], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.00401ffe
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc