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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e2d0
push 0x448a88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push esi
push edi
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], 0
xor edi, edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x3c]
push eax
push edi
lea eax, [ebp - 0x40]
push eax
push edi
push 0x455490
push edi
mov ebx, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call ebx
test eax, eax
jne 0x41d3aa
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x7a
je 0x41d3ce
call esi
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
call fcn.0041d6a8
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push dword [ebp - 0x40]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x41d3a8
mov eax, dword [ebp - 0x3c]
add eax, eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x50], eax
test eax, eax
je 0x41d3a8
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x20]
push 0x455490
push 0
call ebx
test eax, eax
je 0x41d3a8
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 4
push dword [ebp - 0x44]
mov ebx, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call ebx
test eax, eax
jne 0x41d3aa
call esi
cmp eax, 0x7a
jne 0x41d3a8
push dword [ebp - 0x2c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x41d3a8
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x2c]
push eax
push 4
push dword [ebp - 0x44]
call ebx
test eax, eax
je 0x41d3a8
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x41d3a8
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x41d3a8
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x68], 8
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x41d4ce
mov dword [ebp - 0x24], eax
jmp 0x41d4eb
cmp dword [ebp - 0x24], 0
je 0x41d4eb
push 2
push 0xc
lea ecx, [ebp - 0x6c]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x41d3a8
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ebx, dword [ebp - 0x68]
add ebx, 8
add ebx, eax
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x41d3a8
push 2
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x41d3a8
xor ebx, ebx
mov dword [ebp - 0x5c], ebx
cmp dword [ebp - 0x24], ebx
je 0x41d59f
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x41d59f
xor edi, edi
mov dword [ebp - 0x48], edi
nop
cmp edi, eax
jae 0x41d59f
lea eax, [ebp - 0x28]
push eax
push edi
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x41d3a8
mov eax, dword [ebp - 0x28]
test byte [eax + 1], 0x10
jne 0x41d59f
add eax, 8
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x41d596
mov ecx, dword [ebp - 0x28]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x41d3a8
inc ebx
mov dword [ebp - 0x5c], ebx
inc edi
mov dword [ebp - 0x48], edi
mov eax, dword [ebp - 0x6c]
jmp 0x41d540
push dword [ebp - 0x20]
push 0x10000000
push 3
push 2
mov ebx, dword [ebp - 0x38]
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
test eax, eax
je 0x41d3a8
cmp dword [ebp - 0x24], 0
je 0x41d60f
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x41d60f
lea ebx, [ebx]
cmp edi, eax
jae 0x41d60f
lea eax, [ebp - 0x28]
push eax
push edi
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x41d3a8
mov ecx, dword [ebp - 0x28]
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 0x41d3a8
inc edi
mov dword [ebp - 0x48], edi
mov eax, dword [ebp - 0x6c]
jmp 0x41d5d0
push 0
push ebx
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x41d3a8
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x60], ebx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x41d3a8
mov eax, dword [ebp - 0x4c]
test eax, 0x400
je 0x41d65a
mov edi, 0x500
jmp 0x41d666
test eax, 0x1000
je 0x41d668
mov edi, 0x1000
mov ebx, edi
test di, di
je 0x41d681
push ebx
push edi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorControl]
test eax, eax
je 0x41d3a8
lea eax, [ebp - 0x80]
push eax
push 4
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x41d3a8
mov edi, 1
mov dword [ebp - 0x1c], edi
jmp 0x41d3ad