Function at 0x401170
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x42c0e0]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm0, xmmword [str.S_1_16_4096]
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x40]
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
movups xmmword [ebp - 0x1c], xmm0
push 0x20
movq xmm0, qword [0x423470]
movq qword [ebp - 0xc], xmm0
xorps xmm0, xmm0
push 2
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x24], 0
mov word [ebp - 0x20], 0x500
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
movlpd qword [ebp - 0x64], xmm0
call esi
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 3
push ebx
mov dword [ebp - 0x68], 0
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x2c]
call fcn.00409486
add esp, 4
mov edi, eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x4c], edi
push eax
push dword [ebp - 0x2c]
push edi
push 3
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x2c]
call fcn.00409486
add esp, 4
mov dword [ebp - 0x50], eax
mov dword [eax], 0
lea eax, [ebp - 0x44]
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
push dword [ebp - 0x44]
call fcn.004016b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4012b8
push 0x4c
call fcn.00409486
mov ebx, eax
add esp, 4
xor edi, edi
xor esi, esi
mov dword [ebx], 0
lea eax, [ebx + 4]
add eax, edi
push eax
push dword [esi + 0x42c0c8]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4012aa
inc dword [ebx]
add esi, 4
add edi, 0xc
cmp esi, 0x14
jb 0x401290
mov edi, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x30], eax
cmp dword [edi], eax
jbe 0x40131d
lea esi, [edi + 4]
mov edi, dword [ebx]
xor edx, edx
test edi, edi
je 0x4012e9
lea eax, [ebx + 4]
nop
mov ecx, dword [esi]
cmp ecx, dword [eax]
jne 0x4012de
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 4]
je 0x4012e6
inc edx
add eax, 0xc
cmp edx, edi
jb 0x4012d0
mov eax, dword [ebp - 0x30]
cmp edx, edi
jne 0x40130f
mov edx, dword [ebp - 0x50]
mov ecx, dword [edx]
lea eax, [ecx + 1]
mov dword [edx], eax
lea eax, [ecx + ecx*2]
movq xmm0, qword [esi]
lea ecx, [edx + eax*4]
movq qword [ecx + 4], xmm0
mov eax, dword [esi + 8]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x4c]
inc eax
add esi, 0xc
mov dword [ebp - 0x30], eax
cmp eax, dword [edi]
jb 0x4012c4
push edi
call fcn.0040946b
push ebx
call fcn.0040946b
mov ebx, dword [ebp - 0x50]
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 - 0x6c]
push eax
push 1
push 0
push dword [ebp - 0x48]
call dword [0x44cafc]
mov esi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
test eax, eax
jne 0x401361
mov dword [ebp - 0x28], 0
jmp 0x4013bf
push str.ConvertStringSidToSidW
push 1
push str.Advapi32.dll
call fcn.00401080
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x42caa4], eax
test eax, eax
je 0x4013bf
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
call eax
test eax, eax
je 0x4013bf
mov eax, dword [ebp - 0x34]
push eax
mov dword [ebp - 0x60], 0x20
mov dword [ebp - 0x64], eax
call esi
add eax, 8
push eax
lea eax, [ebp - 0x64]
push eax
push 0x19
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x38]
call fcn.00409486
add esp, 4
mov edi, eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x48], edi
push eax
push dword [ebp - 0x38]
push edi
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x5c]
push eax
push 0
lea eax, [ebp - 0x3c]
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 - 0x3c]
movzx esi, word [ecx + 2]
add esi, 8
add esi, eax
push esi
call fcn.00409486
add esp, 4
mov edi, eax
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov ecx, dword [ebp - 0x3c]
xor eax, eax
xor esi, esi
cmp ax, word [ecx + 4]
jae 0x40146d
lea eax, [ebp - 0x54]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov ecx, dword [ebp - 0x54]
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 - 0x3c]
inc esi
movzx eax, word [ecx + 4]
cmp esi, eax
jb 0x401442
mov esi, dword [ebp - 0x48]
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 - 0x58], edi
movzx eax, word [edi + 2]
push eax
lea eax, [ebp - 0x58]
push eax
push 6
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push edi
call fcn.0040946b
push esi
call fcn.0040946b
add esp, 8
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x40]
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
call esi
push dword [ebp - 0x44]
call esi
push ebx
call fcn.0040946b
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0x28]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00406096
mov esp, ebp
pop ebp
ret