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

Disassembly:
push 0x70
push 0x4166a8
call fcn.0040cd10
xor esi, esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
lea eax, [ebp - 0x3c]
push eax
push esi
push dword [ebp + 0xc]
push esi
mov edi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
call edi
mov dword [ebp - 0x40], eax
cmp eax, esi
jne 0x402aad
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x4027c1
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
jmp 0x402aa1
push dword [ebp - 0x3c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call esi
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4027e9
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
jmp 0x402aa1
push dword [ebp - 0x38]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x44], eax
test eax, eax
je 0x4027dc
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push 0
call edi
mov dword [ebp - 0x40], eax
test eax, eax
je 0x4027b4
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 4
push dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call edi
mov dword [ebp - 0x40], eax
test eax, eax
jne 0x402aad
call ebx
cmp eax, 0x7a
je 0x402850
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
jmp 0x402aa1
push dword [ebp - 0x2c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4027dc
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x2c]
push eax
push 4
push dword [ebp + 8]
call edi
mov dword [ebp - 0x40], eax
xor edi, edi
cmp eax, edi
je 0x402843
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40289e
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
jmp 0x402aa1
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x4028c4
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x402aa1
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x68], 8
cmp dword [ebp - 0x24], edi
jne 0x4028d9
mov dword [ebp - 0x30], edi
cmp dword [ebp - 0x30], edi
je 0x402900
push 2
push 0xc
lea eax, [ebp - 0x6c]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x402900
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
jmp 0x402aa1
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x68]
lea edi, [eax + ecx + 8]
mov dword [ebp - 0x5c], edi
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov esi, eax
mov dword [ebp - 0x48], esi
test esi, esi
je 0x4027dc
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x402947
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
jmp 0x402aa1
xor edi, edi
mov dword [ebp - 0x4c], edi
cmp dword [ebp - 0x30], edi
je 0x4029c7
cmp dword [ebp - 0x6c], edi
je 0x4029c7
mov dword [ebp - 0x20], edi
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x6c]
jae 0x4029c7
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x402980
call ebx
push eax
push str.GetAce___failed._Error__d_n
jmp 0x402aa1
mov eax, dword [ebp - 0x28]
test byte [eax + 1], 0x10
jne 0x4029c7
add eax, 8
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4029c2
mov eax, dword [ebp - 0x28]
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 0x4029bf
call ebx
push eax
push str.AddAce___failed._Error__d_n
jmp 0x402aa1
inc dword [ebp - 0x4c]
inc dword [ebp - 0x20]
jmp 0x402959
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x60], eax
push dword [ebp - 0x1c]
push dword [ebp + 0x10]
cmp eax, edi
je 0x402a03
push 3
push 2
push esi
call eax
test eax, eax
jne 0x402a1d
call ebx
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
jmp 0x402aa1
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x402a1d
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
jmp 0x402aa1
cmp dword [ebp - 0x30], edi
je 0x402a66
cmp dword [ebp - 0x6c], edi
je 0x402a66
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x6c]
jae 0x402a66
lea ecx, [ebp - 0x28]
push ecx
push eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x402973
mov eax, dword [ebp - 0x28]
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
je 0x4029b2
inc dword [ebp - 0x20]
jmp 0x402a27
push edi
push esi
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x402a84
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
jmp 0x402aa1
lea eax, [ebp - 0x80]
push eax
push 4
pop eax
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x402aaa
call ebx
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.0040ce65
pop ecx
pop ecx
jmp 0x402aad
mov dword [ebp - 0x50], esi
or dword [ebp - 4], 0xffffffff
call fcn.00402ac1
mov eax, dword [ebp - 0x50]
call fcn.0040cd4b
ret 0xc