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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x537328
push 0x4ead10
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x5522c0]
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 - 0x50], eax
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x5c], edi
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x48]
push edx
push edi
lea eax, [ebp - 0x4c]
push eax
push edi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, edi
jne 0x45bba0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
je 0x45b883
call edi
jmp 0x45bba0
mov ecx, dword [ebp - 0x4c]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call edi
mov ebx, eax
mov dword [ebp - 0x44], ebx
test ebx, ebx
je 0x45ba7d
mov edx, dword [ebp - 0x48]
lea eax, [edx + edx]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x64], eax
test eax, eax
je 0x45ba7d
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x48]
push edx
push eax
lea eax, [ebp - 0x4c]
push eax
push ebx
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x45ba7d
lea ecx, [ebp - 0x3c]
push ecx
push 0
push 0
push 4
mov edx, dword [ebp - 0x50]
push edx
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
call esi
test eax, eax
jne 0x45bba0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
je 0x45b913
call ebx
jmp 0x45bba0
mov eax, dword [ebp - 0x3c]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov ebx, eax
mov dword [ebp - 0x40], ebx
test ebx, ebx
je 0x45ba7d
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
push ebx
push 4
mov eax, dword [ebp - 0x50]
push eax
call esi
xor esi, esi
cmp eax, esi
je 0x45ba7d
push 1
lea ecx, [ebp - 0x84]
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x45ba7d
lea edx, [ebp - 0x70]
push edx
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x30]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x45ba7d
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], 8
mov eax, dword [ebp - 0x38]
cmp eax, esi
jne 0x45b995
mov dword [ebp - 0x30], esi
jmp 0x45b9b1
cmp dword [ebp - 0x30], esi
je 0x45b9b1
push 2
push 0xc
lea edx, [ebp - 0x28]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x45ba7d
mov ebx, dword [ebp - 0x44]
push ebx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x24]
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 - 0x54], edi
test edi, edi
je 0x45ba7d
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x45ba7d
xor esi, esi
mov dword [ebp - 0x58], esi
cmp dword [ebp - 0x30], esi
je 0x45ba4d
cmp dword [ebp - 0x28], esi
je 0x45ba4d
mov dword [ebp - 0x34], esi
cmp esi, dword [ebp - 0x28]
jae 0x45ba50
lea edx, [ebp - 0x2c]
push edx
push esi
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x45ba7d
mov eax, dword [ebp - 0x2c]
test byte [eax + 1], 0x10
jne 0x45ba50
add eax, 8
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x45ba4a
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x45ba7d
inc dword [ebp - 0x58]
inc esi
jmp 0x45b9fc
mov esi, dword [ebp - 0x34]
push str.AddAccessAllowedAceEx
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
test eax, eax
je 0x45ba88
mov ecx, 0x10000000
push ecx
push 3
push 2
push edi
call eax
test eax, eax
jne 0x45baa6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x45bba0
mov eax, 0x10000000
push eax
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x45baa6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x45bba0
cmp dword [ebp - 0x30], 0
je 0x45bae8
cmp dword [ebp - 0x28], 0
je 0x45bae8
cmp esi, dword [ebp - 0x28]
jae 0x45bae8
lea edx, [ebp - 0x2c]
push edx
push esi
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x45ba7d
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
je 0x45ba7d
inc esi
mov dword [ebp - 0x34], esi
jmp 0x45bab2
push 0
push edi
push 1
lea edx, [ebp - 0x84]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x45ba7d
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 0x45bb7a
xor edi, edi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x6c], esi
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x45ba7d
mov eax, dword [ebp - 0x60]
test eax, 0x400
je 0x45bb54
mov esi, 0x500
jmp 0x45bb60
test eax, 0x1000
je 0x45bb62
mov esi, 0x1000
mov edi, esi
test si, si
je 0x45bb7a
push edi
push esi
lea eax, [ebp - 0x84]
push eax
call ebx
test eax, eax
je 0x45ba7d
lea ecx, [ebp - 0x84]
push ecx
mov eax, 4
push eax
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x45ba7d
mov dword [ebp - 0x5c], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0045bbcb
mov eax, dword [ebp - 0x5c]
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.004e4840
mov esp, ebp
pop ebp
ret