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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x450a70
push 0x43b37c
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x45c4f4]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov ecx, dword [str.Users]
mov dword [ebp - 0x24], ecx
mov dx, word [0x4469dc]
mov word [ebp - 0x20], dx
xor esi, esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x54]
push ecx
push esi
lea edx, [ebp - 0x50]
push edx
push esi
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
cmp eax, esi
jne 0x40c828
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x40c404
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov ecx, dword [ebp - 0x50]
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 - 0x34], esi
test esi, esi
jne 0x40c438
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov edx, dword [ebp - 0x54]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x64], eax
test eax, eax
je 0x40c422
lea ecx, [ebp - 0x74]
push ecx
lea edx, [ebp - 0x54]
push edx
push eax
lea eax, [ebp - 0x50]
push eax
push esi
lea ecx, [ebp - 0x24]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x40c3ee
lea edx, [ebp - 0x44]
push edx
push 0
push 0
push 4
mov eax, dword [ebp - 0x58]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call esi
test eax, eax
jne 0x40c828
call ebx
cmp eax, 0x7a
je 0x40c4a7
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov ecx, dword [ebp - 0x44]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x40], eax
test eax, eax
je 0x40c422
lea edx, [ebp - 0x44]
push edx
mov ecx, dword [ebp - 0x44]
push ecx
push eax
push 4
mov edx, dword [ebp - 0x58]
push edx
call esi
xor esi, esi
cmp eax, esi
je 0x40c491
push 1
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x40c501
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
lea ecx, [ebp - 0x78]
push ecx
lea edx, [ebp - 0x48]
push edx
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x40c531
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], 8
mov eax, dword [ebp - 0x48]
cmp eax, esi
jne 0x40c596
mov dword [ebp - 0x4c], esi
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x2c]
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 - 0x60], edi
test edi, edi
je 0x40c422
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x40c5c4
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
cmp dword [ebp - 0x4c], esi
je 0x40c548
push 2
push 0xc
lea edx, [ebp - 0x30]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x40c548
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
xor esi, esi
mov dword [ebp - 0x5c], esi
cmp dword [ebp - 0x4c], esi
je 0x40c65b
cmp dword [ebp - 0x30], esi
je 0x40c65b
mov dword [ebp - 0x3c], esi
cmp esi, dword [ebp - 0x30]
jae 0x40c65e
lea edx, [ebp - 0x38]
push edx
push esi
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x40c60c
call ebx
push eax
push str.GetAce___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov eax, dword [ebp - 0x38]
test byte [eax + 1], 0x10
jne 0x40c65e
add eax, 8
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40c658
mov eax, dword [ebp - 0x38]
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 0x40c655
call ebx
push eax
push str.AddAce___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
inc dword [ebp - 0x5c]
inc esi
jmp 0x40c5db
mov esi, dword [ebp - 0x3c]
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c6a4
mov ecx, dword [ebp - 0x34]
push ecx
mov ecx, 0x10000000
push ecx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x40c6d1
call ebx
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov edx, dword [ebp - 0x34]
push edx
mov eax, 0x10000000
push eax
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x40c6d1
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
cmp dword [ebp - 0x4c], 0
je 0x40c71e
cmp dword [ebp - 0x30], 0
je 0x40c71e
lea ecx, [ecx]
cmp esi, dword [ebp - 0x30]
jae 0x40c71e
lea eax, [ebp - 0x38]
push eax
push esi
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x40c5f6
mov eax, dword [ebp - 0x38]
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 0x40c63f
inc esi
mov dword [ebp - 0x3c], esi
jmp 0x40c6e0
push 0
push edi
push 1
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x40c74a
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
xor esi, esi
cmp ebx, esi
je 0x40c7ef
xor edi, edi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x70], esi
lea ecx, [ebp - 0x70]
push ecx
lea edx, [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x40c7a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov eax, dword [ebp - 0x68]
test eax, 0x400
je 0x40c7b6
mov esi, 0x500
jmp 0x40c7c2
test eax, 0x1000
je 0x40c7c4
mov esi, 0x1000
mov edi, esi
test si, si
je 0x40c7ef
push edi
push esi
lea ecx, [ebp - 0x8c]
push ecx
call ebx
test eax, eax
jne 0x40c7ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
lea edx, [ebp - 0x8c]
push edx
mov eax, 4
push eax
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
jne 0x40c821
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
jmp 0x40c828
mov dword [ebp - 0x6c], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0040c853
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0043b28c
mov esp, ebp
pop ebp
ret