Function at 0x403950
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1cc
mov eax, dword [0x46e224]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [ebp - 0x158], eax
lea eax, [ebp - 0x134]
mov dword [ebp - 0x17c], eax
lea eax, [ebp - 0x160]
push eax
push 0
push 0
push 0xa
push esi
mov dword [ebp - 0x148], esi
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x134], 0xc
mov dword [ebp - 0x130], 1
mov word [ebp - 0x12c], 0
mov dword [ebp - 0x190], 0x18
mov dword [ebp - 0x18c], 0
mov dword [ebp - 0x188], 0
mov dword [ebp - 0x184], 0
mov dword [ebp - 0x180], 0
call edi
test eax, eax
jne 0x403a02
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x403a38
push dword [ebp - 0x160]
call fcn.004325ac
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x160]
mov dword [ebp - 0x144], ebx
push eax
push dword [ebp - 0x160]
push ebx
push 0xa
push esi
call edi
test eax, eax
jne 0x403a42
push ebx
call fcn.00439729
add esp, 4
mov dword [ebp - 0x144], 0
lea eax, [ebp - 0x150]
mov dword [ebp - 0x150], 0
push eax
xor ebx, ebx
push ebx
push ebx
push 2
push esi
mov dword [ebp - 0x1b4], ebx
call edi
lea eax, [ebp - 0x154]
mov dword [ebp - 0x154], ebx
push eax
push str.S_1_5_32_544
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x40408a
lea eax, [ebp - 0x16c]
mov dword [ebp - 0x16c], ebx
push eax
push str.S_1_16_12288
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x40408a
lea eax, [ebp - 0x170]
mov dword [ebp - 0x170], ebx
push eax
push str.S_1_5_114
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x40408a
mov eax, dword [ebp - 0x150]
test eax, eax
je 0x403bfb
push eax
call fcn.00439744
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x150]
mov dword [ebp - 0x1b4], ebx
push eax
push dword [ebp - 0x150]
push ebx
push 2
push esi
call edi
xor edi, edi
mov byte [ebp - 0x14c], 0
cmp dword [ebx], edi
jbe 0x403b70
lea esi, [ebx + 8]
test byte [esi], 0x10
je 0x403b0f
mov dword [esi], 0xd
push dword [ebp - 0x170]
push dword [esi - 4]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x403b2a
mov dword [esi], 5
jmp 0x403b38
test byte [esi], 0x20
je 0x403b38
mov eax, dword [ebp - 0x16c]
mov dword [esi - 4], eax
push dword [ebp - 0x154]
push dword [esi - 4]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [ebp - 0x14c]
test eax, eax
movzx ecx, cl
mov eax, 1
cmovne ecx, eax
inc edi
add esi, 8
mov dword [ebp - 0x14c], ecx
cmp edi, dword [ebx]
jb 0x403b04
test cl, cl
jne 0x403bfb
mov eax, dword [ebp - 0x150]
xor ecx, ecx
add eax, 8
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00439744
mov esi, dword [ebx]
add esp, 4
mov dword [ebp - 0x1c0], esi
mov edi, eax
mov dword [ebp - 0x1c4], edi
test esi, esi
je 0x403bd3
mov eax, ebx
lea ecx, [edi + 4]
sub eax, edi
lea edx, [ebx + 8]
mov dword [ebp - 0x1c8], eax
mov edi, eax
mov eax, dword [edi + ecx]
lea edx, [edx + 8]
mov dword [ecx], eax
lea ecx, [ecx + 8]
mov eax, dword [edx - 8]
mov dword [ecx - 4], eax
sub esi, 1
jne 0x403bb1
mov edi, dword [ebp - 0x1c4]
mov esi, dword [ebp - 0x1c0]
lea eax, [esi + 1]
mov dword [edi], eax
mov eax, dword [ebp - 0x154]
mov dword [edi + esi*8 + 4], eax
mov eax, dword [ebx]
push ebx
mov dword [edi + eax*8 + 8], 0xd
call fcn.00439729
add esp, 4
mov dword [ebp - 0x1b4], edi
xor esi, esi
lea edi, [ebp - 0x118]
xorps xmm0, xmm0
movlpd qword [ebp - 0x128], xmm0
lea ebx, [esi + 3]
lea eax, [ebp - 0x128]
push eax
push dword [esi + 0x46eb78]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x403c49
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x124]
mov dword [edi - 8], eax
xor eax, eax
cmp byte [esi + 0x46eb7c], al
mov dword [edi - 4], ecx
cmovne eax, ebx
mov dword [edi], eax
add esi, 8
add edi, 0xc
cmp esi, 0xb8
jb 0x403c11
push 0x118
call fcn.00439744
add esp, 4
mov dword [ebp - 0x1c8], eax
mov ecx, 0x45
lea esi, [ebp - 0x120]
lea edi, [eax + 4]
mov dword [eax], 0x17
lea eax, [ebp - 0x164]
push eax
push 0
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x154]
mov edi, dword [ebp - 0x148]
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push 0
push 6
push edi
mov dword [ebp - 0x178], ecx
call esi
mov ebx, dword [ebp - 0x1b4]
test eax, eax
jne 0x403cc7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x403cc7
xor eax, eax
mov dword [ebp - 0x1b8], eax
jmp 0x403d10
push dword [ebp - 0x164]
call fcn.004325ac
add esp, 4
mov dword [ebp - 0x1b8], eax
lea ecx, [ebp - 0x164]
push ecx
push dword [ebp - 0x164]
push eax
push 6
push edi
call esi
test eax, eax
jne 0x403d0a
push dword [ebp - 0x1b8]
call fcn.00439729
add esp, 4
xor eax, eax
mov dword [ebp - 0x1b8], eax
jmp 0x403d10
mov eax, dword [ebp - 0x1b8]
mov esi, dword [eax]
xorps xmm0, xmm0
mov eax, dword [ebp - 0x154]
push 0
push esi
movlpd qword [ebp - 0x1a4], xmm0
mov dword [ebp - 0x198], 0
mov dword [ebp - 0x1b0], 0x10000000
mov dword [ebp - 0x1ac], 1
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x19c], 0
mov dword [ebp - 0x194], eax
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
lea eax, [ebp - 0x174]
push eax
lea eax, [ebp - 0x140]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetExplicitEntriesFromAclW]
mov esi, dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
lea eax, [ebp - 0x168]
push eax
push 0
push dword [ebp - 0x174]
push 2
call esi
lea eax, [ebp - 0x168]
push eax
push dword [ebp - 0x168]
lea eax, [ebp - 0x1b0]
push eax
push 1
call esi
mov ecx, dword [ebp - 0x1b8]
mov eax, dword [ebp - 0x168]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x158]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x138], eax
mov eax, dword [ecx]
mov ecx, dword [0x47250c]
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x1c4], ecx
test ecx, ecx
je 0x403de8
mov eax, dword [0x472508]
test eax, eax
jne 0x403e27
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.ZwCreateToken
push edi
call esi
push str.RtlNtStatusToDosError
push edi
mov dword [0x47250c], eax
call esi
mov ecx, dword [0x47250c]
mov edi, dword [ebp - 0x148]
mov dword [0x472508], eax
mov dword [ebp - 0x1c4], ecx
test ecx, ecx
je 0x40408a
test eax, eax
je 0x40408a
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x158]
push eax
push 0
push 0
push 7
push edi
call esi
test eax, eax
jne 0x403e5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x403e95
push dword [ebp - 0x158]
call fcn.004325ac
add esp, 4
mov dword [ebp - 0x1bc], eax
lea ecx, [ebp - 0x158]
push ecx
push dword [ebp - 0x158]
push eax
push 7
push edi
call esi
test eax, eax
jne 0x403e9f
push dword [ebp - 0x1bc]
call fcn.00439729
add esp, 4
mov dword [ebp - 0x1bc], 0
lea eax, [ebp - 0x148]
push eax
push 0
push 0
push 5
push edi
call esi
test eax, eax
jne 0x403ebe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x403ef7
push dword [ebp - 0x148]
call fcn.004325ac
add esp, 4
mov dword [ebp - 0x1b4], eax
lea ecx, [ebp - 0x148]
push ecx
push dword [ebp - 0x148]
push eax
push 5
push edi
call esi
test eax, eax
jne 0x403f01
push dword [ebp - 0x1b4]
call fcn.00439729
add esp, 4
mov dword [ebp - 0x1b4], 0
lea eax, [ebp - 0x14c]
push eax
push 0
push 0
push 1
push edi
call esi
test eax, eax
jne 0x403f20
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x403f5a
push dword [ebp - 0x14c]
call fcn.004325ac
add esp, 4
mov dword [ebp - 0x1c0], eax
lea ecx, [ebp - 0x14c]
push ecx
push dword [ebp - 0x14c]
push eax
push 1
push edi
call esi
test eax, eax
mov eax, dword [ebp - 0x1c0]
jne 0x403f5c
push eax
call fcn.00439729
add esp, 4
xor eax, eax
push dword [ebp - 0x1bc]
lea ecx, [ebp - 0x178]
push dword [ebp - 0x1b8]
push dword [ebp - 0x1b4]
push ecx
push dword [ebp - 0x1c8]
push ebx
push eax
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
lea eax, [ebp - 0x13c]
push eax
push 1
lea eax, [ebp - 0x190]
push eax
push 0xf01ff
lea eax, [ebp - 0x15c]
push eax
call dword [ebp - 0x1c4]
mov ecx, dword [0x472508]
mov esi, eax
push esi
call ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
js 0x40407d
cmp dword [ebp - 0x15c], 0
je 0x40407d
test ebx, ebx
je 0x403fdd
push ebx
call fcn.00439729
add esp, 4
mov eax, dword [ebp - 0x16c]
test eax, eax
je 0x403fee
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x1c8]
call fcn.00439729
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x144]
add esp, 4
push eax
push 0
push 0
push 0x11
push edi
call ebx
test eax, eax
jne 0x404021
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x404051
push dword [ebp - 0x144]
call fcn.004325ac
add esp, 4
mov esi, eax
lea eax, [ebp - 0x144]
push eax
push dword [ebp - 0x144]
push esi
push 0x11
push edi
call ebx
test eax, eax
jne 0x404053
push esi
call fcn.00439729
add esp, 4
xor esi, esi
push 8
push esi
push 0x11
push dword [ebp - 0x15c]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov eax, dword [ebp - 0x15c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00432107
mov esp, ebp
pop ebp
ret 8
test ebx, ebx
je 0x40408a
push ebx
call fcn.00439729
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00432107
mov esp, ebp
pop ebp
ret 8