Function at 0x402290
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x43a128]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm0, xmmword [0x42d9d0]
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x48]
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 [0x42d9e0]
movq qword [ebp - 0xc], xmm0
xorps xmm0, xmm0
push 2
push eax
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x24], 0
mov word [ebp - 0x20], 0x500
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x3c], 0
movlpd qword [ebp - 0x70], xmm0
call esi
mov eax, dword [ebp - 0x48]
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 3
push ebx
mov dword [ebp - 0x74], 0
call edi
push dword [ebp - 0x2c]
call fcn.0040ab5a
add esp, 4
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x2c]
push eax
push 3
push ebx
call edi
push dword [ebp - 0x2c]
call fcn.0040ab5a
add esp, 4
mov dword [ebp - 0x5c], eax
mov dword [eax], 0
lea eax, [ebp - 0x4c]
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 - 0x4c]
lea eax, [ebp - 0x58]
xorps xmm0, xmm0
xor ebx, ebx
push eax
movups xmmword [ebp - 0x90], xmm0
push 0x800
movq qword [ebp - 0x80], xmm0
lea eax, [ebp - 0x90]
push eax
push ebx
call sub.ADVAPI32.dll_LsaOpenPolicy
test eax, eax
jne 0x40241f
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x54]
push eax
push esi
push dword [ebp - 0x58]
call sub.ADVAPI32.dll_LsaEnumerateAccountRights
test eax, eax
jne 0x402417
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x402417
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x10]
push eax
call fcn.0040ab5a
mov ebx, eax
xor esi, esi
mov eax, dword [ebp - 0x30]
add esp, 4
mov dword [ebx], eax
cmp dword [ebp - 0x30], esi
jbe 0x40240f
lea edi, [ebx + 4]
mov eax, dword [ebp - 0x54]
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 - 0x30]
jb 0x4023f6
push dword [ebp - 0x54]
call sub.ADVAPI32.dll_LsaFreeMemory
push dword [ebp - 0x58]
call sub.ADVAPI32.dll_LsaClose
test ebx, ebx
jne 0x402465
push 0x4c
call fcn.0040ab5a
mov ebx, eax
add esp, 4
xor edi, edi
xor esi, esi
mov dword [ebx], 0
nop dword [eax]
lea ecx, [edi + 4]
add ecx, ebx
push ecx
push dword [esi + 0x4390c8]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x40245a
inc dword [ebx]
add esi, 4
add edi, 0xc
cmp esi, 0x14
jb 0x402440
mov ecx, dword [ebp - 0x34]
xor eax, eax
mov dword [ebp - 0x38], eax
cmp dword [ecx], eax
jbe 0x4024d0
lea esi, [ecx + 4]
mov edi, dword [ebx]
xor edx, edx
test edi, edi
je 0x40249c
lea eax, [ebx + 4]
nop
mov ecx, dword [esi]
cmp ecx, dword [eax]
jne 0x40248e
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 4]
je 0x402496
inc edx
add eax, 0xc
cmp edx, edi
jb 0x402480
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
cmp edx, edi
jne 0x4024c5
mov edx, dword [ebp - 0x5c]
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 - 0x38]
mov ecx, dword [ebp - 0x34]
inc eax
add esi, 0xc
mov dword [ebp - 0x38], eax
cmp eax, dword [ecx]
jb 0x402474
push ecx
call fcn.0040ab3f
push ebx
call fcn.0040ab3f
mov ebx, dword [ebp - 0x5c]
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 - 0x78]
push eax
push 1
push 0
push dword [ebp - 0x50]
call dword [0x43aad8]
mov esi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
test eax, eax
jne 0x402514
mov dword [ebp - 0x28], 0
jmp 0x402572
push 0x42d9e8
push 1
push 0x42da00
call section..text
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x43aaa4], eax
test eax, eax
je 0x402572
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
call eax
test eax, eax
je 0x402572
mov eax, dword [ebp - 0x3c]
push eax
mov dword [ebp - 0x6c], 0x20
mov dword [ebp - 0x70], eax
call esi
add eax, 8
push eax
lea eax, [ebp - 0x70]
push eax
push 0x19
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x40]
call fcn.0040ab5a
add esp, 4
mov edi, eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x50], edi
push eax
push dword [ebp - 0x40]
push edi
push 1
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x68]
push eax
push 0
lea eax, [ebp - 0x44]
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 - 0x44]
movzx esi, word [ecx + 2]
add esi, 8
add esi, eax
push esi
call fcn.0040ab5a
add esp, 4
mov edi, eax
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov ecx, dword [ebp - 0x44]
xor eax, eax
xor esi, esi
cmp ax, word [ecx + 4]
jae 0x402620
lea eax, [ebp - 0x60]
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov ecx, dword [ebp - 0x60]
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 - 0x44]
inc esi
movzx eax, word [ecx + 4]
cmp esi, eax
jb 0x4025f5
mov esi, dword [ebp - 0x50]
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 - 0x64], edi
movzx eax, word [edi + 2]
push eax
lea eax, [ebp - 0x64]
push eax
push 6
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push edi
call fcn.0040ab3f
push esi
call fcn.0040ab3f
add esp, 8
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x48]
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
call esi
push dword [ebp - 0x4c]
call esi
push ebx
call fcn.0040ab3f
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0x28]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040760d
mov esp, ebp
pop ebp
ret