Function at 0x47cd80
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x535a40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
movups xmm0, xmmword [str.S_1_16_4096]
push esi
push edi
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x44]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
lea eax, [ebp - 0x24]
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
movups xmmword [ebp - 0x1c], xmm0
push 2
movq xmm0, qword [0x50da80]
push eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x24], 0
mov word [ebp - 0x20], 0x500
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x28], 0
movq qword [ebp - 0xc], xmm0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
call esi
mov eax, dword [ebp - 0x44]
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x30]
push eax
push 0
push 0
push 3
push ebx
mov dword [ebp - 0x70], 0
call edi
push dword [ebp - 0x30]
call fcn.004c8d7a
add esp, 4
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x30]
push ecx
push dword [ebp - 0x30]
push eax
push 3
push ebx
call edi
push dword [ebp - 0x30]
call fcn.004c8d7a
add esp, 4
mov dword [ebp - 0x58], eax
mov dword [eax], 0
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x221
push 0x20
push 2
lea eax, [ebp - 0x24]
push eax
call esi
mov esi, dword [ebp - 0x48]
lea eax, [ebp - 0x54]
xorps xmm0, xmm0
xor ebx, ebx
push eax
movups xmmword [ebp - 0x8c], xmm0
push 0x800
movq qword [ebp - 0x7c], xmm0
lea eax, [ebp - 0x8c]
push eax
push ebx
call sub.ADVAPI32.dll_LsaOpenPolicy
test eax, eax
jne 0x47cf19
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x50]
push eax
push esi
push dword [ebp - 0x54]
call sub.ADVAPI32.dll_LsaEnumerateAccountRights
test eax, eax
jne 0x47cf11
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x47cf11
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x10]
push eax
call fcn.004c8d7a
mov ebx, eax
add esp, 4
mov eax, dword [ebp - 0x2c]
xor esi, esi
mov dword [ebx], eax
test eax, eax
je 0x47cf09
lea edi, [ebx + 4]
nop dword [eax + eax]
mov eax, dword [ebp - 0x50]
push edi
push dword [eax + esi*8 + 4]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
inc esi
add edi, 0xc
cmp esi, dword [ebp - 0x2c]
jb 0x47cef0
push dword [ebp - 0x50]
call sub.ADVAPI32.dll_LsaFreeMemory
push dword [ebp - 0x54]
call sub.ADVAPI32.dll_LsaClose
test ebx, ebx
jne 0x47cf58
push 0x4c
call fcn.004c8d7a
mov ebx, eax
add esp, 4
xor edi, edi
xor esi, esi
mov dword [ebx], 0
lea ecx, [edi + 4]
add ecx, ebx
push ecx
push dword [esi + 0x5325d8]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x47cf4d
inc dword [ebx]
add esi, 4
add edi, 0xc
cmp esi, 0x14
jb 0x47cf33
mov ecx, dword [ebp - 0x34]
xor eax, eax
mov dword [ebp - 0x2c], eax
cmp dword [ecx], eax
jbe 0x47cfc2
lea esi, [ecx + 4]
mov edi, dword [ebx]
xor edx, edx
test edi, edi
je 0x47cf8e
lea eax, [ebx + 4]
mov ecx, dword [esi]
cmp ecx, dword [eax]
jne 0x47cf80
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 4]
je 0x47cf88
inc edx
add eax, 0xc
cmp edx, edi
jb 0x47cf72
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
cmp edx, edi
jne 0x47cfb7
mov edx, dword [ebp - 0x58]
movq xmm0, qword [esi]
mov ecx, dword [edx]
lea eax, [ecx + 1]
mov dword [edx], eax
lea eax, [ecx + ecx*2]
lea ecx, [edx + eax*4]
movq qword [ecx + 4], xmm0
mov eax, dword [esi + 8]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
inc eax
add esi, 0xc
mov dword [ebp - 0x2c], eax
cmp eax, dword [ecx]
jb 0x47cf67
push ecx
call fcn.004c8d5f
push ebx
call fcn.004c8d5f
mov ebx, dword [ebp - 0x58]
lea eax, [ebp - 0x28]
add esp, 8
push eax
push 0
push 0
lea eax, [ebx + 4]
push eax
push dword [ebx]
lea eax, [ebp - 0x74]
push eax
push 1
push 0
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_CreateRestrictedToken]
mov esi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
test eax, eax
jne 0x47d006
mov dword [ebp - 0x28], 0
jmp 0x47d064
push str.ConvertStringSidToSidA
push 1
push 0x4f9e00
call fcn.0042f970
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x54fbf8], eax
test eax, eax
je 0x47d064
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
call eax
test eax, eax
je 0x47d064
mov eax, dword [ebp - 0x38]
push eax
mov dword [ebp - 0x5c], 0x20
mov dword [ebp - 0x60], eax
call esi
add eax, 8
push eax
lea eax, [ebp - 0x60]
push eax
push 0x19
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x3c]
push eax
push 0
push 0
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x3c]
call fcn.004c8d7a
add esp, 4
mov edi, eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x4c], edi
push eax
push dword [ebp - 0x3c]
push edi
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x6c]
push eax
push 0
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push 4
push 6
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
push dword [edi]
call esi
mov ecx, dword [ebp - 0x40]
movzx esi, word [ecx + 2]
add esi, 8
add esi, eax
push esi
call fcn.004c8d7a
add esp, 4
mov edi, eax
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov ecx, dword [ebp - 0x40]
xor eax, eax
xor esi, esi
cmp ax, word [ecx + 4]
jae 0x47d112
lea eax, [ebp - 0x64]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov ecx, dword [ebp - 0x64]
movzx eax, word [ecx + 2]
push eax
push ecx
push esi
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
mov ecx, dword [ebp - 0x40]
inc esi
movzx eax, word [ecx + 4]
cmp esi, eax
jb 0x47d0e7
mov esi, dword [ebp - 0x4c]
push dword [esi]
push 0x10000000
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
push 0
push edi
push 0
push 0
push 4
push 6
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
mov dword [ebp - 0x68], edi
movzx eax, word [edi + 2]
push eax
lea eax, [ebp - 0x68]
push eax
push 6
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push edi
call fcn.004c8d5f
push esi
call fcn.004c8d5f
add esp, 8
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x44]
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
call esi
push dword [ebp - 0x48]
call esi
push ebx
call fcn.004c8d5f
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0x28]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004c34b7
mov esp, ebp
pop ebp
ret