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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x444e90
push 0x424680
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x4495ec]
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 - 0x48], 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 - 0x4c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x50]
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]
cmp eax, esi
jne 0x4014a6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x401096
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
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
jne 0x4010c9
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
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 - 0x48], eax
test eax, eax
je 0x4010b4
lea ecx, [ebp - 0x50]
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]
test eax, eax
je 0x401081
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
test eax, eax
jne 0x4014a6
call ebx
cmp eax, 0x7a
je 0x40113a
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
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 0x4010b4
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
xor esi, esi
cmp eax, esi
je 0x401125
push 1
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x401190
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
lea ecx, [ebp - 0x5c]
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 0x4011bf
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x64], 8
mov eax, dword [ebp - 0x2c]
cmp eax, esi
jne 0x401223
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x64]
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 0x4010b4
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x401250
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
cmp dword [ebp - 0x28], esi
je 0x4011d6
push 2
push 0xc
lea edx, [ebp - 0x68]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4011d6
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
xor esi, esi
mov dword [ebp - 0x40], esi
cmp dword [ebp - 0x28], esi
je 0x4012eb
cmp dword [ebp - 0x68], esi
je 0x4012eb
mov dword [ebp - 0x30], esi
cmp esi, dword [ebp - 0x68]
jae 0x4012ee
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 0x401297
call ebx
push eax
push str.GetAce___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
mov eax, dword [ebp - 0x20]
test byte [eax + 1], 0x10
jne 0x4012ee
add eax, 8
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4012e3
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 0x4012df
call ebx
push eax
push str.AddAce___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
add dword [ebp - 0x40], 1
add esi, 1
jmp 0x401267
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]
test eax, eax
je 0x401333
mov ecx, dword [ebp - 0x1c]
push ecx
mov ecx, 0x10000000
push ecx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x40135f
call ebx
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
mov edx, dword [ebp - 0x1c]
push edx
mov eax, 0x10000000
push eax
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x40135f
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
cmp dword [ebp - 0x28], 0
je 0x4013b0
cmp dword [ebp - 0x68], 0
je 0x4013b0
jmp 0x401370
cmp esi, dword [ebp - 0x68]
jae 0x4013b0
lea eax, [ebp - 0x20]
push eax
push esi
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x401282
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 0x4012ca
add esi, 1
mov dword [ebp - 0x30], esi
jmp 0x401370
push 0
push edi
push 1
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4013d8
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
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
xor esi, esi
cmp ebx, esi
je 0x401471
xor edi, edi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x54], esi
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x40142b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
mov eax, dword [ebp - 0x44]
test eax, 0x400
je 0x40143c
mov esi, 0x500
jmp 0x401448
test eax, 0x1000
je 0x40144a
mov esi, 0x1000
mov edi, esi
test si, si
je 0x401471
push edi
push esi
lea ecx, [ebp - 0x7c]
push ecx
call ebx
test eax, eax
jne 0x401471
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
lea edx, [ebp - 0x7c]
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 0x40149f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.00421c60
add esp, 8
jmp 0x4014a6
mov dword [ebp - 0x58], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.004014c7
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret