Function at 0x45ac54
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
mov eax, 0x5308a1
call fcn.004d57f0
xor edx, edx
mov dword [ebp - 0x2c], edx
mov word [ebp - 0x14], 8
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x45ac9a
mov eax, dword [ebp + 0x10]
xor edx, edx
mov dword [eax], edx
mov eax, 1
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x45ae8c
push edi
call sub.ADVAPI32.dll_IsValidSid
test eax, eax
jne 0x45acb5
xor eax, eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x45ae8c
push 2
lea ecx, [ebp - 0x38]
push 0xc
push ecx
mov eax, dword [ebp + 0xc]
push eax
call sub.ADVAPI32.dll_GetAclInformation
test eax, eax
jne 0x45acdb
xor eax, eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x45ae8c
test esi, esi
je 0x45acf4
push edi
call sub.ADVAPI32.dll_GetLengthSid
mov ebx, eax
mov eax, dword [ebp - 0x34]
add ebx, eax
add ebx, 0xc
sub ebx, 4
jmp 0x45ad05
push edi
call sub.ADVAPI32.dll_GetLengthSid
mov ebx, dword [ebp - 0x34]
sub ebx, 0xc
sub ebx, eax
add ebx, 4
push ebx
push 8
call sub.KERNEL32.dll_GetProcessHeap
push eax
call sub.KERNEL32.dll_HeapAlloc
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
test ecx, ecx
jne 0x45ad32
xor eax, eax
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
jmp 0x45ae8c
push 2
push ebx
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
push eax
call sub.ADVAPI32.dll_InitializeAcl
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
test edx, edx
jne 0x45ad55
mov word [ebp - 0x14], 0
jmp 0x45ae15
xor ebx, ebx
jmp 0x45adce
lea eax, [ebp - 0x28]
push eax
push ebx
mov edx, dword [ebp + 0xc]
push edx
call sub.ADVAPI32.dll_GetAce
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
jne 0x45ad7c
mov word [ebp - 0x14], 0
jmp 0x45ae15
test esi, esi
jne 0x45ada0
mov eax, dword [ebp - 0x28]
mov dl, byte [eax]
test dl, dl
jne 0x45ada0
mov eax, dword [ebp - 0x28]
add eax, 8
mov word [ebp - 0x14], 8
push eax
push edi
call sub.ADVAPI32.dll_EqualSid
test eax, eax
jne 0x45adcd
mov edx, dword [ebp - 0x28]
movzx ecx, word [edx + 2]
push ecx
mov eax, dword [ebp - 0x28]
push eax
push 0
push 2
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx]
push ecx
call sub.ADVAPI32.dll_AddAce
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x45adcd
mov word [ebp - 0x14], 0
jmp 0x45ae15
inc ebx
mov edx, dword [ebp - 0x38]
cmp ebx, edx
jb 0x45ad59
test esi, esi
je 0x45adee
push edi
mov ecx, dword [ebp + 0x14]
push ecx
push 2
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
push edx
call sub.ADVAPI32.dll_AddAccessAllowedAce
mov dword [ebp - 0x2c], eax
mov word [ebp - 0x14], 0
jmp 0x45ae15
mov word [ebp - 0x14], 0x14
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x45ae40
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx]
test ecx, ecx
je 0x45ae58
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
push edx
push 0
call sub.KERNEL32.dll_GetProcessHeap
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x45ae58
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x45ae58
mov eax, dword [ebp + 0xc]
push eax
push 0
call sub.KERNEL32.dll_GetProcessHeap
push eax
call sub.KERNEL32.dll_HeapFree
mov word [ebp - 0x14], 0
jmp 0x45ae7f
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
mov esp, ebp
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x3c]
pop ebp
ret