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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4c05d0
push 0x482f60
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x4cba68]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x38]
push ecx
push edi
lea edx, [ebp - 0x3c]
push edx
push edi
mov esi, dword [ebp + 0xc]
push esi
push edi
mov ebx, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
call ebx
cmp eax, edi
jne 0x431622
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
je 0x43123b
call edi
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov eax, dword [ebp - 0x3c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x431270
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov ecx, dword [ebp - 0x38]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x48], eax
test eax, eax
je 0x431257
lea edx, [ebp - 0x54]
push edx
lea ecx, [ebp - 0x38]
push ecx
push eax
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x1c]
push eax
push esi
push 0
call ebx
test eax, eax
jne 0x4312b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
lea ecx, [ebp - 0x24]
push ecx
push 0
push 0
push 4
mov edx, dword [ebp + 8]
push edx
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call esi
test eax, eax
jne 0x431622
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x4312f9
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov eax, dword [ebp - 0x24]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x431324
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x24]
push edx
push eax
push 4
mov eax, dword [ebp + 8]
push eax
call esi
xor esi, esi
cmp eax, esi
je 0x4312e4
push 1
lea ecx, [ebp - 0x80]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x431360
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
lea edx, [ebp - 0x60]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x43138f
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], 8
mov eax, dword [ebp - 0x2c]
cmp eax, esi
jne 0x4313f3
mov dword [ebp - 0x28], esi
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x68]
lea esi, [eax + ecx + 8]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edi, eax
mov dword [ebp - 0x4c], edi
test edi, edi
je 0x43130f
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x431420
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
cmp dword [ebp - 0x28], esi
je 0x4313a6
push 2
push 0xc
lea ecx, [ebp - 0x6c]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4313a6
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
xor esi, esi
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x28], esi
je 0x4314bb
cmp dword [ebp - 0x6c], esi
je 0x4314bb
mov dword [ebp - 0x30], esi
cmp esi, dword [ebp - 0x6c]
jae 0x4314be
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 0x431467
call ebx
push eax
push str.GetAce___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov eax, dword [ebp - 0x20]
test byte [eax + 1], 0x10
jne 0x4314be
add eax, 8
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4314b3
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
jne 0x4314af
call ebx
push eax
push str.AddAce___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
add dword [ebp - 0x40], 1
add esi, 1
jmp 0x431437
mov esi, dword [ebp - 0x30]
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 0x4314e8
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
cmp dword [ebp - 0x28], 0
je 0x431534
cmp dword [ebp - 0x6c], 0
je 0x431534
cmp esi, dword [ebp - 0x6c]
jae 0x431534
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 0x431452
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
je 0x43149a
add esi, 1
mov dword [ebp - 0x30], esi
jmp 0x4314f4
push 0
push edi
push 1
lea edx, [ebp - 0x80]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x43155c
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x4315f1
xor esi, esi
xor edi, edi
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x4315ae
call ebx
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov eax, dword [ebp - 0x44]
test eax, 0x400
je 0x4315bf
mov esi, 0x500
jmp 0x4315cb
test eax, 0x1000
je 0x4315cd
mov esi, 0x1000
mov edi, esi
test si, si
je 0x4315f1
push edi
push esi
lea eax, [ebp - 0x80]
push eax
call dword [ebp - 0x5c]
test eax, eax
jne 0x4315f1
call ebx
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
lea ecx, [ebp - 0x80]
push ecx
mov eax, 4
push eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x43161b
call ebx
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.00484e44
add esp, 8
jmp 0x431622
mov dword [ebp - 0x50], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.00431643
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret