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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x434388
push 0x4294b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x38]
push ecx
push esi
lea edx, [ebp - 0x2c]
push edx
push esi
mov eax, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov dword [ebp - 0x6c], eax
cmp eax, esi
jne 0x401551
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x401092
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov ecx, dword [ebp - 0x2c]
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 - 0x68], esi
test esi, esi
jne 0x4010c5
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov edx, dword [ebp - 0x38]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x4010f0
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
lea ecx, [ebp - 0x88]
push ecx
lea edx, [ebp - 0x38]
push edx
push eax
lea eax, [ebp - 0x2c]
push eax
push esi
mov ecx, dword [ebp + 0xc]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov dword [ebp - 0x6c], eax
test eax, eax
jne 0x401129
call ebx
push eax
push str.LookupAccountName___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
lea edx, [ebp - 0x5c]
push edx
push 0
push 0
push 4
mov eax, dword [ebp + 8]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
call esi
mov dword [ebp - 0x6c], eax
test eax, eax
jne 0x401551
call ebx
cmp eax, 0x7a
je 0x401166
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov ecx, dword [ebp - 0x5c]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x401191
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
lea edx, [ebp - 0x5c]
push edx
mov ecx, dword [ebp - 0x5c]
push ecx
push eax
push 4
mov edx, dword [ebp + 8]
push edx
call esi
mov dword [ebp - 0x6c], eax
xor esi, esi
cmp eax, esi
jne 0x4011c0
call ebx
push eax
push str.GetFileSecurity___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
push 1
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x4011e8
call ebx
push eax
push str.InitializeSecurityDescriptor___failed.Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x401217
call ebx
push eax
push str.GetSecurityDescriptorDacl___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], 8
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jne 0x40122e
mov dword [ebp - 0x3c], esi
cmp dword [ebp - 0x3c], esi
je 0x40125b
push 2
push 0xc
lea edx, [ebp - 0x58]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x40125b
call ebx
push eax
push str.GetAclInformation___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x54]
lea esi, [eax + ecx + 8]
mov dword [ebp - 0x20], esi
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edi, eax
mov dword [ebp - 0x30], edi
test edi, edi
jne 0x401299
call ebx
push eax
push str.HeapAlloc___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x4012bc
call ebx
push eax
push str.InitializeAcl___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
xor esi, esi
mov dword [ebp - 0x70], esi
cmp dword [ebp - 0x3c], esi
je 0x40133a
cmp dword [ebp - 0x58], esi
je 0x40133a
mov dword [ebp - 0x24], esi
cmp esi, dword [ebp - 0x58]
jae 0x40133d
lea edx, [ebp - 0x64]
push edx
push esi
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4012fb
call ebx
push eax
push str.GetAce___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov eax, dword [ebp - 0x64]
test byte [eax + 1], 0x10
jne 0x40133d
add eax, 8
push eax
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401337
xor edx, edx
mov eax, dword [ebp - 0x64]
mov dx, word [eax + 2]
push edx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x401402
inc dword [ebp - 0x70]
inc esi
jmp 0x4012cb
mov esi, dword [ebp - 0x24]
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 - 0x40], eax
test eax, eax
je 0x401383
mov ecx, dword [ebp - 0x68]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x4013ad
call ebx
push eax
push str.AddAccessAllowedAceEx___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x4013ad
call ebx
push eax
push str.AddAccessAllowedAce___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40141d
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40141d
cmp esi, dword [ebp - 0x58]
jae 0x40141d
lea edx, [ebp - 0x64]
push edx
push esi
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4013e8
call ebx
push eax
push str.GetAce___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
xor ecx, ecx
mov eax, dword [ebp - 0x64]
mov cx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x401417
call ebx
push eax
push str.AddAce___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
inc esi
mov dword [ebp - 0x24], esi
jmp 0x4013bb
push 0
push edi
push 1
lea edx, [ebp - 0x84]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x401448
call ebx
push eax
push str.SetSecurityDescriptorDacl___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
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
mov dword [ebp - 0x4c], ebx
xor esi, esi
cmp ebx, esi
je 0x401519
mov dword [ebp - 0x8c], esi
xor edi, edi
mov dword [ebp - 0x98], edi
mov dword [ebp - 0x90], esi
mov dword [ebp - 0x94], esi
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x90]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x4014bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSecurityDescriptorControl___failed.Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov eax, dword [ebp - 0x90]
test ah, 4
je 0x4014d7
mov esi, 0x500
mov dword [ebp - 0x8c], esi
mov edi, esi
jmp 0x4014e9
test ah, 0x10
je 0x4014ef
mov esi, 0x1000
mov dword [ebp - 0x8c], esi
mov edi, esi
mov dword [ebp - 0x98], edi
test si, si
je 0x401519
push edi
push esi
lea eax, [ebp - 0x84]
push eax
call ebx
test eax, eax
jne 0x401519
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetSecurityDescriptorControl___failed.Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
lea ecx, [ebp - 0x84]
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 0x40154a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFileSecurity___failed._Error__d_n
call fcn.0042937c
add esp, 8
jmp 0x401551
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xffffffff
call fcn.00401571
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret