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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4050c0
push 0x403e30
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x4010c0]
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 - 0x4c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x3c], 0
xor ebx, ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x30], ebx
xor edi, edi
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x44]
push ecx
push edi
lea ecx, [ebp - 0x48]
push ecx
push edi
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x401f8a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
jne 0x401f8a
push dword [ebp - 0x48]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x401f8a
push dword [ebp - 0x44]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x401f8a
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x44]
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x40]
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x401f8a
lea eax, [ebp - 0x34]
push eax
push edi
push edi
push 4
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
test eax, eax
jne 0x401f8a
call esi
cmp eax, 0x7a
jne 0x401f8a
push dword [ebp - 0x34]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x50], esi
test esi, esi
je 0x401f8a
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
push esi
push 4
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
test eax, eax
je 0x401f8a
push 1
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x401f8a
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x401f8a
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], 8
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x401d91
mov dword [ebp - 0x38], eax
jmp 0x401dae
cmp dword [ebp - 0x38], 0
je 0x401dae
push 2
push 0xc
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x401f8a
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, dword [ebp - 0x24]
add esi, 8
add esi, eax
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x58], ebx
push 2
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x401f8a
xor esi, esi
mov dword [ebp - 0x68], esi
cmp dword [ebp - 0x38], esi
je 0x401e5d
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401e5d
xor edi, edi
mov dword [ebp - 0x54], edi
nop dword [eax]
cmp edi, eax
jae 0x401e5d
lea eax, [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x401f8a
mov eax, dword [ebp - 0x30]
test byte [eax + 1], 0x10
jne 0x401e5d
add eax, 8
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401e54
mov ecx, dword [ebp - 0x30]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x401f8a
inc esi
mov dword [ebp - 0x68], esi
inc edi
mov dword [ebp - 0x54], edi
mov eax, dword [ebp - 0x28]
jmp 0x401e00
push 0x4011b0
push 0x4011c8
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x2c]
push dword [ebp + 0x10]
test eax, eax
je 0x401e89
push 3
push 2
push ebx
call eax
jmp 0x401e92
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x401f8a
cmp dword [ebp - 0x38], 0
je 0x401ee6
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401ee6
cmp edi, eax
jae 0x401ee6
lea eax, [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x401f8a
mov ecx, dword [ebp - 0x30]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x401f8a
inc edi
mov dword [ebp - 0x54], edi
mov eax, dword [ebp - 0x28]
jmp 0x401ea7
push 0
push ebx
push 1
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x401f8a
push 0x4011d8
push 0x4011c8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x401f68
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x6c], 0
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x401f8a
mov eax, dword [ebp - 0x40]
test eax, 0x400
je 0x401f4d
mov eax, 0x500
jmp 0x401f59
test eax, 0x1000
je 0x401f68
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x84]
push eax
call esi
test eax, eax
je 0x401f8a
lea eax, [ebp - 0x84]
push eax
push 4
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
mov ecx, dword [ebp - 0x60]
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 4], 0xfffffffe
call fcn.00401fb8
mov eax, dword [ebp - 0x60]
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.00403e22
mov esp, ebp
pop ebp
ret