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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x460ae0
push 0x42a590
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x4672b4]
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 - 0x64], 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 - 0x5c], ebx
mov dword [ebp - 0x30], ebx
xor edi, edi
xor esi, esi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x68]
push ecx
lea ecx, [ebp - 0x44]
push ecx
push esi
lea ecx, [ebp - 0x48]
push ecx
push esi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x401b60
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401b60
mov esi, dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x2c], esi
test esi, esi
je 0x401b60
mov eax, dword [ebp - 0x44]
lea esi, [eax + eax]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x64], eax
test eax, eax
je 0x401b60
lea ecx, [ebp - 0x68]
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_LookupAccountNameW]
test eax, eax
je 0x401b60
lea eax, [ebp - 0x34]
push eax
push edi
push edi
push 4
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
jne 0x401b60
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401b60
mov esi, dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x50], esi
test esi, esi
je 0x401b60
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
push esi
push 4
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
test eax, eax
je 0x401b60
push 1
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x401b60
lea eax, [ebp - 0x74]
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 0x401b60
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], 8
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x401983
mov dword [ebp - 0x38], eax
jmp 0x4019a0
cmp dword [ebp - 0x38], 0
je 0x4019a0
push 2
push 0xc
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x401b60
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 - 0x5c], ebx
test ebx, ebx
je 0x401b60
push 2
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x401b60
xor esi, esi
mov dword [ebp - 0x6c], esi
cmp dword [ebp - 0x38], esi
je 0x401a53
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401a53
xor edi, edi
mov dword [ebp - 0x58], edi
cmp edi, eax
jae 0x401a53
lea eax, [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x401b60
mov eax, dword [ebp - 0x30]
test byte [eax + 1], 0x10
jne 0x401a53
add eax, 8
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401a4a
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 0x401b60
inc esi
mov dword [ebp - 0x6c], esi
inc edi
mov dword [ebp - 0x58], edi
mov eax, dword [ebp - 0x28]
jmp 0x4019f6
push dword [ebp - 0x2c]
push dword [ebp + 0x10]
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x401b60
cmp dword [ebp - 0x38], 0
je 0x401ab6
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401ab6
cmp edi, eax
jae 0x401ab6
lea eax, [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x401b60
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 0x401b60
inc edi
mov dword [ebp - 0x58], edi
mov eax, dword [ebp - 0x28]
jmp 0x401a77
push 0
push ebx
push 1
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x401b60
push str.SetSecurityDescriptorControl
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x401b3c
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x70], 0
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x401b60
mov eax, dword [ebp - 0x40]
test eax, 0x400
je 0x401b21
mov eax, 0x500
jmp 0x401b2d
test eax, 0x1000
je 0x401b3c
mov eax, 0x1000
push eax
push eax
lea eax, [ebp - 0x88]
push eax
call esi
test eax, eax
je 0x401b60
lea eax, [ebp - 0x88]
push eax
push 4
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
xor esi, esi
mov ecx, 1
test eax, eax
cmovne esi, ecx
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 4], 0xfffffffe
call fcn.00401b94
mov eax, dword [ebp - 0x54]
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.00428d9d
mov esp, ebp
pop ebp
ret