Function at 0x4d0058
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
call fcn.0040596c
lea edi, [ebp - 8]
xor eax, eax
push ebp
push 0x4d0677
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
mov eax, dword [ebp + 0xc]
push eax
call sub.advapi32.dll_IsValidSid
test eax, eax
je 0x4d0661
mov eax, dword [ebp + 8]
call fcn.0040a4f8
mov byte [ebp - 0x21], al
xor eax, eax
mov dword [edi], eax
call fcn.004cfc5c
test al, al
jne 0x4d00d3
lea eax, [ebp - 0x10]
push eax
push 0
push edi
push 0
push 0
push 4
push 1
mov eax, dword [ebp + 8]
call fcn.0040597c
push eax
call sub.advapi32.dll_GetNamedSecurityInfoA
call fcn.004cfc48
test al, al
je 0x4d0661
jmp 0x4d013b
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 4
mov eax, dword [ebp + 8]
call fcn.0040597c
mov ebx, eax
push ebx
call sub.advapi32.dll_GetFileSecurityA
mov eax, dword [ebp - 0x18]
call fcn.00402ee0
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov edx, dword [ebp - 0x18]
call fcn.00403b08
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 4
push ebx
call sub.advapi32.dll_GetFileSecurityA
test eax, eax
je 0x4d0661
lea eax, [ebp - 0x40]
push eax
push edi
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_GetSecurityDescriptorDacl
test eax, eax
je 0x4d0661
xor ecx, ecx
push ebp
push 0x4d065a
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp dword [edi], 0
jne 0x4d0158
call fcn.00404fe0
jmp 0x4d0661
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1a]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_GetSecurityDescriptorControl
test eax, eax
jne 0x4d0177
call fcn.00404fe0
jmp 0x4d0661
movzx eax, word [ebp - 0x1a]
and ax, 4
cmp ax, 4
je 0x4d018f
call fcn.00404fe0
jmp 0x4d0661
push 2
push 0xc
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [edi]
push eax
call sub.advapi32.dll_GetAclInformation
test eax, eax
jne 0x4d01ad
call fcn.00404fe0
jmp 0x4d0661
push 1
push 4
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [edi]
push eax
call sub.advapi32.dll_GetAclInformation
test eax, eax
jne 0x4d01cb
call fcn.00404fe0
jmp 0x4d0661
mov eax, dword [ebp - 0x4c]
mov ebx, eax
dec ebx
cmp ebx, 0
jl 0x4d020a
lea eax, [ebp - 0x30]
push eax
push ebx
mov eax, dword [edi]
push eax
call sub.advapi32.dll_GetAce
test eax, eax
je 0x4d0204
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x30]
add eax, 8
push eax
call sub.advapi32.dll_EqualSid
test eax, eax
je 0x4d0204
push ebx
mov eax, dword [edi]
push eax
call sub.advapi32.dll_DeleteAce
dec ebx
cmp ebx, 0xffffffff
jne 0x4d01d6
push 2
push 0xc
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [edi]
push eax
call sub.advapi32.dll_GetAclInformation
test eax, eax
jne 0x4d0228
call fcn.00404fe0
jmp 0x4d0661
push 1
push 4
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [edi]
push eax
call sub.advapi32.dll_GetAclInformation
test eax, eax
jne 0x4d0246
call fcn.00404fe0
jmp 0x4d0661
mov eax, dword [ebp + 0xc]
push eax
call sub.advapi32.dll_GetLengthSid
add eax, 0xc
sub eax, 4
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x48]
mov ebx, edx
mov eax, dword [ebp - 0x44]
add ebx, eax
mov esi, dword [ebp - 0x38]
add esi, esi
add esi, edx
cmp eax, esi
jbe 0x4d0272
mov dword [ebp - 0x34], ebx
jmp 0x4d0277
sub esi, eax
mov dword [ebp - 0x34], esi
cmp ebx, dword [ebp - 0x34]
jbe 0x4d027f
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x34]
call fcn.00402ee0
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4d063c
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, dword [ebp - 0xc]
mov eax, esi
xor ecx, ecx
mov edx, dword [ebp - 0x34]
call fcn.00403b08
mov edx, esi
mov eax, dword [edi]
mov ecx, ebx
call fcn.00403138
mov eax, dword [ebp - 0xc]
movzx edx, word [ebp - 0x34]
mov word [eax + 2], dx
push 2
push 0xc
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_GetAclInformation
test eax, eax
jne 0x4d02e1
call fcn.00404fe0
call fcn.00404fe0
jmp 0x4d0661
xor eax, eax
mov dword [ebp - 0x28], eax
call fcn.004cfc5c
test al, al
jne 0x4d03bd
mov eax, dword [ebp - 0x38]
call fcn.00402ee0
mov dword [ebp - 0x30], eax
xor eax, eax
push ebp
push 0x4d03b6
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x30]
xor ecx, ecx
mov edx, dword [ebp - 0x38]
call fcn.00403b08
mov eax, dword [ebp - 0x30]
mov byte [eax], 0
cmp byte [ebp - 0x21], 0
jne 0x4d032c
mov eax, dword [ebp - 0x30]
mov byte [eax + 1], 3
cmp byte [ebp + 0x14], 0
je 0x4d0342
call fcn.004cfc5c
test al, al
jne 0x4d0342
mov eax, dword [ebp - 0x30]
add byte [eax + 1], 0x10
mov eax, dword [ebp - 0x30]
movzx edx, word [ebp - 0x38]
mov word [eax + 2], dx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0xc]
push eax
call sub.advapi32.dll_GetLengthSid
mov ecx, eax
mov eax, dword [ebp - 0x30]
lea edx, [eax + 8]
mov eax, dword [ebp + 0xc]
call fcn.00403138
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
push esi
call sub.advapi32.dll_AddAce
test eax, eax
jne 0x4d039d
call fcn.00404fe0
call fcn.00404fe0
call fcn.00404fe0
jmp 0x4d0661
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d052b
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x30]
call fcn.00402efc
ret
xor eax, eax
mov dword [ebp - 0x28], eax
cmp byte [ebp - 0x21], 0
jne 0x4d047a
mov eax, dword [ebp - 0x38]
call fcn.00402ee0
mov dword [ebp - 0x30], eax
xor eax, eax
push ebp
push 0x4d0473
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x30]
xor ecx, ecx
mov edx, dword [ebp - 0x38]
call fcn.00403b08
mov eax, dword [ebp - 0x30]
mov byte [eax], 0
mov eax, dword [ebp - 0x30]
mov byte [eax + 1], 0xb
mov eax, dword [ebp - 0x30]
movzx edx, word [ebp - 0x38]
mov word [eax + 2], dx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0xc]
push eax
call sub.advapi32.dll_GetLengthSid
mov ecx, eax
mov eax, dword [ebp - 0x30]
lea edx, [eax + 8]
mov eax, dword [ebp + 0xc]
call fcn.00403138
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
push esi
call sub.advapi32.dll_AddAce
test eax, eax
jne 0x4d045a
call fcn.00404fe0
call fcn.00404fe0
call fcn.00404fe0
jmp 0x4d0661
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d047a
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x30]
call fcn.00402efc
ret
mov eax, dword [ebp - 0x38]
call fcn.00402ee0
mov dword [ebp - 0x30], eax
xor eax, eax
push ebp
push 0x4d0524
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x30]
xor ecx, ecx
mov edx, dword [ebp - 0x38]
call fcn.00403b08
mov eax, dword [ebp - 0x30]
mov byte [eax], 0
mov eax, dword [ebp - 0x30]
mov byte [eax + 1], 0
mov eax, dword [ebp - 0x30]
movzx edx, word [ebp - 0x38]
mov word [eax + 2], dx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0xc]
push eax
call sub.advapi32.dll_GetLengthSid
mov ecx, eax
mov eax, dword [ebp - 0x30]
lea edx, [eax + 8]
mov eax, dword [ebp + 0xc]
call fcn.00403138
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_AddAce
test eax, eax
jne 0x4d050b
call fcn.00404fe0
call fcn.00404fe0
call fcn.00404fe0
jmp 0x4d0661
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d052b
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x30]
call fcn.00402efc
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d067e
lea eax, [ebp + 8]
call fcn.004054ec
ret