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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44c0e0
push 0x429b40
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x38]
push ecx
push esi
lea edx, [ebp - 0x3c]
push edx
push esi
mov eax, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov dword [ebp - 0x40], eax
cmp eax, esi
jne 0x40f693
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
jne 0x40f2ad
mov ecx, dword [ebp - 0x3c]
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 - 0x1c], esi
test esi, esi
je 0x40f3f7
mov edx, dword [ebp - 0x38]
lea eax, [edx + edx]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x54], eax
test eax, eax
je 0x40f3f7
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x38]
push edx
push eax
lea eax, [ebp - 0x3c]
push eax
push esi
mov ecx, dword [ebp + 0xc]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x40f2c2
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
lea edx, [ebp - 0x24]
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
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x40f693
call ebx
cmp eax, 0x7a
jne 0x40f31e
mov ecx, dword [ebp - 0x24]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x34], eax
test eax, eax
je 0x40f3f7
lea edx, [ebp - 0x24]
push edx
mov ecx, dword [ebp - 0x24]
push ecx
push eax
push 4
mov edx, dword [ebp + 8]
push edx
call esi
mov dword [ebp - 0x40], eax
xor esi, esi
cmp eax, esi
jne 0x40f333
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
push 1
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40f35b
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x40f38a
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x7c], 8
mov eax, dword [ebp - 0x2c]
cmp eax, esi
jne 0x40f3a1
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x28], esi
je 0x40f3ce
push 2
push 0xc
lea edx, [ebp - 0x80]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x40f3ce
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x7c]
lea esi, [eax + ecx + 8]
mov dword [ebp - 0x6c], esi
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edi, eax
mov dword [ebp - 0x58], edi
test edi, edi
jne 0x40f40c
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x40f42f
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
xor esi, esi
mov dword [ebp - 0x44], esi
cmp dword [ebp - 0x28], esi
je 0x40f49a
cmp dword [ebp - 0x80], esi
je 0x40f49a
mov dword [ebp - 0x30], esi
cmp esi, dword [ebp - 0x80]
jae 0x40f49d
lea edx, [ebp - 0x20]
push edx
push esi
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40f538
mov eax, dword [ebp - 0x20]
test byte [eax + 1], 0x10
jne 0x40f49d
add eax, 8
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40f497
mov eax, dword [ebp - 0x20]
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 0x40f565
inc dword [ebp - 0x44]
inc esi
jmp 0x40f43e
mov esi, dword [ebp - 0x30]
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x70], eax
test eax, eax
je 0x40f4e3
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x40f50d
call ebx
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x40f50d
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40f580
mov eax, dword [ebp - 0x80]
test eax, eax
je 0x40f580
jmp 0x40f520
cmp esi, dword [ebp - 0x80]
jae 0x40f580
lea edx, [ebp - 0x20]
push edx
push esi
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x40f54d
call ebx
push eax
push str.GetAce___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x40f57a
call ebx
push eax
push str.AddAce___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
inc esi
mov dword [ebp - 0x30], esi
jmp 0x40f520
push 0
push edi
push 1
lea edx, [ebp - 0x94]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x40f5ab
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov dword [ebp - 0x74], ebx
xor esi, esi
cmp ebx, esi
je 0x40f65b
mov dword [ebp - 0x4c], esi
xor edi, edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x64], esi
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x40f60e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov eax, dword [ebp - 0x48]
test ah, 4
je 0x40f61f
mov esi, 0x500
mov edi, esi
jmp 0x40f62b
test ah, 0x10
je 0x40f631
mov esi, 0x1000
mov edi, esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x50], edi
test si, si
je 0x40f65b
push edi
push esi
lea eax, [ebp - 0x94]
push eax
call ebx
test eax, eax
jne 0x40f65b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
lea ecx, [ebp - 0x94]
push ecx
mov eax, 4
push eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x40f68c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.00429ad0
add esp, 8
jmp 0x40f693
mov dword [ebp - 0x5c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.0040f6b5
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc