Function at 0x40bbbf
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x34], 0
mov dword [0x47d094], 0
mov eax, dword [0x47d094]
mov dword [0x47d090], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0xf001f
mov eax, dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
call eax
sub esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40bc39
cmp dword [ebp - 0x18], 0xffffffff
jne 0x40bc67
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp], eax
call sym._win_strerror
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], 0x460a78
call sym._dupprintf
mov dword [ebp - 0x10], eax
jmp 0x40bef2
call sym._should_have_security
test al, al
je 0x40bd7c
call sym._get_user_sid
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x40bc96
mov dword [esp], 0x460a8f
call sym._dupstr
mov dword [ebp - 0x10], eax
jmp 0x40bef2
call sym._get_default_sid
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40bcb8
mov dword [esp], 0x460a9f
call sym._dupstr
mov dword [ebp - 0x10], eax
jmp 0x40bef2
mov eax, dword [0x47daf8]
lea edx, [ebp - 0x34]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x30]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov edx, dword [ebp - 0x18]
mov dword [esp], edx
call eax
sub esp, 0x20
test eax, eax
setne al
movzx eax, al
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x40bd32
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._win_strerror
mov dword [esp + 4], eax
mov dword [esp], 0x460ab0
call sym._dupprintf
mov dword [ebp - 0x10], eax
jmp 0x40bef2
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_EqualSid]
call eax
sub esp, 8
test eax, eax
jne 0x40bd7c
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x14]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.ADVAPI32.dll_EqualSid]
call eax
sub esp, 8
test eax, eax
jne 0x40bd7c
mov dword [esp], 0x460ae2
call sym._dupstr
mov dword [ebp - 0x10], eax
jmp 0x40bef2
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
call eax
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40bddc
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp], eax
call sym._win_strerror
mov dword [esp + 4], eax
mov dword [esp], 0x460af8
call sym._dupprintf
mov dword [ebp - 0x10], eax
jmp 0x40bef2
mov dword [esp + 8], 0x1c
lea eax, [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualQuery]
call eax
sub esp, 0xc
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40be2b
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp], eax
call sym._win_strerror
mov dword [esp + 4], eax
mov dword [esp], 0x460b11
call sym._dupprintf
mov dword [ebp - 0x10], eax
jmp 0x40bef2
cmp dword [ebp - 0x24], 0xf
ja 0x40be45
mov dword [esp], 0x460b2c
call sym._dupstr
mov dword [ebp - 0x10], eax
jmp 0x40bef2
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 4
ja 0x40be65
mov dword [esp], 0x460b4d
call sym._dupstr
mov dword [ebp - 0x10], eax
jmp 0x40bef2
mov eax, dword [ebp - 0xc]
mov dword [0x47d090], eax
mov eax, dword [0x47d090]
mov dword [esp], eax
call sym._GET_32BIT_MSB_FIRST
mov dword [ebp - 0x2c], eax
mov eax, dword [0x47d090]
add eax, 4
mov dword [0x47d094], eax
mov eax, dword [ebp - 0x28]
sub eax, 4
mov dword [0x47d098], eax
mov eax, dword [0x47d098]
cmp eax, dword [ebp - 0x2c]
jae 0x40bebe
mov eax, dword [0x47d090]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._PUT_32BIT_MSB_FIRST
mov eax, dword [0x47d094]
mov byte [eax], 5
jmp 0x40bef2
mov eax, dword [ebp - 0x2c]
mov dword [0x47d09c], eax
mov eax, dword [0x47d0a0]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetEvent]
call eax
sub esp, 4
mov eax, dword [0x47d0a4]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call eax
sub esp, 8
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._safefree
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40bf14
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_LocalFree]
call eax
sub esp, 4
cmp dword [ebp - 0xc], 0
je 0x40bf2a
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call eax
sub esp, 4
cmp dword [ebp - 0x18], 0
je 0x40bf46
cmp dword [ebp - 0x18], 0xffffffff
je 0x40bf46
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
leave
ret