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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x4943cc
cmp dword [ebp + 0x10], esi
je 0x4943cc
mov eax, dword [ebp + 0x18]
mov dword [eax], esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0x10]
mov dword [ebp - 8], esi
push esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4943b9
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push dword [ebp - 0xc]
push 8
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
mov dword [ebp - 0x14], eax
cmp eax, esi
je 0x4943b7
mov eax, dword [ebp - 8]
add eax, eax
push eax
push 8
call ebx
push eax
call edi
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x49439a
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x49439a
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x49439a
cmp dword [ebp - 4], esi
je 0x49439a
push 2
push 0xc
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], 8
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
cmp eax, esi
je 0x494383
cmp dword [ebp - 0x30], esi
je 0x49438e
mov dword [ebp + 8], esi
jbe 0x494393
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x494393
mov eax, dword [ebp - 0x10]
add eax, 8
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x494376
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp + 0x14]
xor eax, eax
cmp byte [ecx], 1
mov dword [ebp + 0x10], esi
sete al
inc eax
mov dword [ebp + 0xc], eax
dec edi
push edi
call fcn.00492f2b
inc eax
pop ecx
cmp dword [ebp + 0x10], eax
jne 0x49436d
mov eax, dword [ebp + 0x18]
cmp dword [eax], 2
je 0x49436d
mov ecx, dword [ebp + 0xc]
mov dword [eax], ecx
inc dword [ebp + 0x10]
cmp dword [ebp + 0x10], 0x20
jl 0x494353
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x30]
jb 0x494315
jmp 0x494393
mov eax, dword [ebp + 0x18]
mov dword [eax], 1
jmp 0x494393
mov eax, dword [ebp + 0x18]
mov dword [eax], esi
mov dword [ebp - 0x20], 1
push dword [ebp - 0x14]
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
cmp dword [ebp - 0x1c], esi
je 0x4943b7
push dword [ebp - 0x1c]
push esi
call ebx
push eax
call edi
pop edi
pop ebx
cmp dword [ebp - 0x18], esi
je 0x4943c7
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x20]
jmp 0x4943ce
xor eax, eax
pop esi
leave
ret 0x14