Function at 0x41aa80
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x525c
call fcn.0047dca0
mov eax, dword [0x4ed018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x5224]
push esi
push edi
push 0x2810
push 0
push eax
mov dword [ebp - 0x525c], ebx
mov dword [ebp - 0x5258], 0
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5258]
push eax
push 0x2810
lea eax, [ebp - 0x5224]
push eax
push 3
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov esi, dword [ebp + 0xc]
test eax, eax
jne 0x41aafe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_privilege_information:_0x_08x
push 1
call fcn.00446b80
jmp 0x41acc1
push dword [ebp - 0x5224]
push str.LogTokenPermissions:_number_of_privileges:__d
push esi
push 2
call fcn.00446be0
add esp, 0x10
call fcn.00446b50
test al, 0x20
je 0x41b58c
xor edi, edi
cmp dword [ebp - 0x5224], edi
jbe 0x41acb4
lea ebx, [ebp - 0x5218]
nop word [eax + eax]
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.00411960
push 0x200
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.00411960
add esp, 0x18
mov dword [ebp - 0x5254], 0x200
lea eax, [ebp - 0x5254]
mov dword [ebp - 0x5250], 0
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebx - 8]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
test eax, eax
jne 0x41abc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.LogTokenPermissions:_LookupPrivilegeName_failed_on_Privilege___d_0x_08x
push 1
call fcn.00446b80
push 0x200
lea eax, [ebp - 0x204]
push str._empty_
push eax
call fcn.00483510
add esp, 0x1c
lea eax, [ebp - 0x5250]
mov dword [ebp - 0x5254], 0x200
push eax
lea eax, [ebp - 0x5254]
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x204]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeDisplayNameA]
test eax, eax
jne 0x41ac27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.LogTokenPermissions:_LookupPrivilegeDisplayName_failed_on_Privilege___d_0x_08x
push 1
call fcn.00446b80
push 0x200
lea eax, [ebp - 0x404]
push str._empty_
push eax
call fcn.00483510
add esp, 0x1c
mov ecx, dword [ebx]
mov edx, 0x49e448
test ecx, ecx
mov eax, str._no_privileges_
cmovne eax, edx
push eax
push ecx
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x204]
push eax
push edi
push str.LogTokenPermissions:_Privilege___d:__s___s___attributes_are_0x_08x__s
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx]
add esp, 0x20
test al, 2
je 0x41ac72
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx]
add esp, 0x10
test al, 1
je 0x41ac89
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx]
add esp, 0x10
test eax, eax
jns 0x41ac9e
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_USED_FOR_ACCESS
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
inc edi
add ebx, 0xc
cmp edi, dword [ebp - 0x5224]
jb 0x41ab40
mov ebx, dword [ebp - 0x525c]
push str.LogTokenPermissions:_Done_enumerating_Privileges
push esi
push 0x20
call fcn.00446be0
add esp, 0xc
push 0x282c
lea eax, [ebp - 0x5240]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x282c
lea eax, [ebp - 0x5240]
push eax
push 0xd
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41ad1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_group_privilege_information:_0x_08x
push 4
call fcn.00446b80
jmp 0x41b0f3
push dword [ebp - 0x5240]
push str.LogTokenPermissions:_number_of_SIDs:__d
push esi
push 0x20
call fcn.00446be0
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x5240], edi
jbe 0x41ae1d
mov eax, dword [ebp - 0x5238]
push edi
push str.LogTokenPermissions:_SID___d:
push esi
push 0x20
lea ebx, [eax + edi*8]
call fcn.00446be0
push esi
push dword [ebx]
call fcn.0041a800
mov eax, dword [ebx + 4]
add esp, 0x18
test al, 4
je 0x41ad7d
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 2
je 0x41ad95
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test eax, 0xc0000000
je 0x41adb0
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_LOGON_ID
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 1
je 0x41adc8
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_MANDATORY
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 8
je 0x41ade0
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_OWNER
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test eax, 0x20000000
je 0x41adfb
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_RESOURCE
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 0x10
je 0x41ae10
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_USE_FOR_DENY_ONLY
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x5240]
jb 0x41ad40
push dword [ebp - 0x5234]
push str.LogTokenPermissions:_number_of_restricted_SIDs:__d
push esi
push 0x20
call fcn.00446be0
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x5234], edi
jbe 0x41af1e
mov eax, dword [ebp - 0x522c]
push edi
push str.LogTokenPermissions:_restricted_SID___d:
push esi
push 0x20
lea ebx, [eax + edi*8]
call fcn.00446be0
push esi
push dword [ebx]
call fcn.0041a800
mov eax, dword [ebx + 4]
add esp, 0x18
test al, 4
je 0x41ae7e
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_ENABLED
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 2
je 0x41ae96
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test eax, 0xc0000000
je 0x41aeb1
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_LOGON_ID
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 1
je 0x41aec9
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_MANDATORY
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 8
je 0x41aee1
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_OWNER
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test eax, 0x20000000
je 0x41aefc
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_RESOURCE
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebx + 4]
add esp, 0x10
test al, 0x10
je 0x41af11
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_USE_FOR_DENY_ONLY
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x5234]
jb 0x41ae41
push dword [ebp - 0x5228]
push str.LogTokenPermissions:_number_of_privileges:__d
push esi
push 2
call fcn.00446be0
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x5228], edi
jbe 0x41b0e0
xor ebx, ebx
nop dword [eax]
nop dword [eax + eax]
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.00411960
push 0x200
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.00411960
add esp, 0x18
mov dword [ebp - 0x5254], 0x200
lea eax, [ebp - 0x5254]
mov dword [ebp - 0x5258], 0
push eax
lea eax, [ebp - 0x204]
push eax
mov eax, dword [ebp - 0x5220]
add eax, ebx
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
test eax, eax
jne 0x41afdd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.LogTokenPermissions:_LookupPrivilegeName_failed_on_Privilege___d_0x_08x
push 1
call fcn.00446b80
push 0x200
lea eax, [ebp - 0x204]
push str._empty_
push eax
call fcn.00483510
add esp, 0x1c
lea eax, [ebp - 0x5258]
mov dword [ebp - 0x5254], 0x200
push eax
lea eax, [ebp - 0x5254]
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x204]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeDisplayNameA]
test eax, eax
jne 0x41b03c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.LogTokenPermissions:_LookupPrivilegeDisplayName_failed_on_Privilege___d_0x_08x
push 1
call fcn.00446b80
push 0x200
lea eax, [ebp - 0x404]
push str._empty_
push eax
call fcn.00483510
add esp, 0x1c
mov eax, dword [ebp - 0x5220]
mov edx, 0x49e448
mov ecx, dword [ebx + eax + 8]
test ecx, ecx
mov eax, str._no_privileges_
cmovne eax, edx
push eax
push ecx
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x204]
push eax
push edi
push str.LogTokenPermissions:_Privilege___d:__s___s___attributes_are_0x_08x__s
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp - 0x5220]
add esp, 0x20
test byte [ebx + eax + 8], 2
je 0x41b094
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
mov eax, dword [ebp - 0x5220]
test byte [ebx + eax + 8], 1
je 0x41b0b2
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
mov eax, dword [ebp - 0x5220]
cmp dword [ebx + eax + 8], 0
jge 0x41b0d0
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_USED_FOR_ACCESS
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
inc edi
add ebx, 0xc
cmp edi, dword [ebp - 0x5228]
jb 0x41af50
push str.LogTokenPermissions:_Done_enumerating_Privileges
push esi
push 0x20
call fcn.00446be0
mov ebx, dword [ebp - 0x525c]
add esp, 0xc
push 0x280c
lea eax, [ebp - 0x2a10]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x280c
lea eax, [ebp - 0x2a10]
push eax
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41b151
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_privilege_information_0x_08x
push 1
call fcn.00446b80
add esp, 0xc
jmp 0x41b26a
push dword [ebp - 0x2a10]
push str.LogTokenPermissions:_number_of_groups:__d
push esi
push 0x20
call fcn.00446be0
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x2a10], edi
jbe 0x41b26a
push edi
push str.LogTokenPermissions:_groups___d:
push esi
push 0x20
call fcn.00446be0
push esi
push dword [ebp + edi*8 - 0x2a0c]
call fcn.0041a800
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x18
test al, 4
je 0x41b1b6
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x10
test al, 2
je 0x41b1d2
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x10
test eax, 0xc0000000
je 0x41b1f1
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_LOGON_ID
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x10
test al, 1
je 0x41b20d
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_MANDATORY
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x10
test al, 8
je 0x41b229
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_OWNER
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x10
test eax, 0x20000000
je 0x41b248
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_RESOURCE
push esi
push 0x20
call fcn.00446be0
mov eax, dword [ebp + edi*8 - 0x2a08]
add esp, 0x10
test al, 0x10
je 0x41b25d
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_USE_FOR_DENY_ONLY
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x2a10]
jb 0x41b175
push 0x2804
lea eax, [ebp - 0x2a08]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x2804
lea eax, [ebp - 0x2a08]
push eax
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41b2c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_owner_information:_0x_08x
push 1
call fcn.00446b80
add esp, 0xc
jmp 0x41b2de
push str.LogTokenPermissions:_owner_SID:
push esi
push 0x20
call fcn.00446be0
push esi
push dword [ebp - 0x2a08]
call fcn.0041a800
add esp, 0x14
push 0x2804
lea eax, [ebp - 0x2a08]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x2804
lea eax, [ebp - 0x2a08]
push eax
push 5
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41b336
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_primary_group:_0x_08x
push 1
call fcn.00446b80
add esp, 0xc
jmp 0x41b352
push str.LogTokenPermissions:_Token_Primary_Group:
push esi
push 0x20
call fcn.00446be0
push esi
push dword [ebp - 0x2a08]
call fcn.0041a800
add esp, 0x14
push 0x2810
lea eax, [ebp - 0x2a14]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x2810
lea eax, [ebp - 0x2a14]
push eax
push 7
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41b3aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_source:_0x_08x
push 1
call fcn.00446b80
add esp, 0xc
jmp 0x41b3fa
movsx eax, byte [ebp - 0x2a0d]
push eax
movsx eax, byte [ebp - 0x2a0e]
push eax
movsx eax, byte [ebp - 0x2a0f]
push eax
movsx eax, byte [ebp - 0x2a10]
push eax
movsx eax, byte [ebp - 0x2a11]
push eax
movsx eax, byte [ebp - 0x2a12]
push eax
movsx eax, byte [ebp - 0x2a13]
push eax
movsx eax, byte [ebp - 0x2a14]
push eax
push str.LogTokenPermissions:_Token_Source:__c_c_c_c_c_c_c_c
push esi
push 0x20
call fcn.00446be0
add esp, 0x2c
push 0x2838
lea eax, [ebp - 0x524c]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x2838
lea eax, [ebp - 0x524c]
push eax
push 0xa
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41b455
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_statistics:_0x_08x
push 1
call fcn.00446b80
add esp, 0xc
jmp 0x41b518
mov ecx, dword [ebp - 0x5234]
mov eax, ecx
sub eax, 1
je 0x41b481
sub eax, 1
je 0x41b47a
push ecx
push str.LogTokenPermissions:_Token_Type:__unknown:_0x_08x_
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
jmp 0x41b491
push str.LogTokenPermissions:_Token_Type:_Impersonated
jmp 0x41b486
push str.LogTokenPermissions:_Token_Type:_Primary
push esi
push 0x20
call fcn.00446be0
add esp, 0xc
mov eax, dword [ebp - 0x5230]
cmp eax, 3
ja case.default.0x41b49c
jmp dword [eax*4 + 0x41b5a4]
push str.LogTokenPermissions:_Token_Impersonation:_SecurityAnonymous
push esi
push 0x20
call fcn.00446be0
add esp, 0xc
jmp 0x41b4fc
push str.LogTokenPermissions:_Token_Impersonation:_SecurityIdentification
push esi
push 0x20
call fcn.00446be0
add esp, 0xc
jmp 0x41b4fc
push str.LogTokenPermissions:_Token_Impersonation:_SecurityImpersonation
push esi
push 0x20
call fcn.00446be0
add esp, 0xc
jmp 0x41b4fc
push str.LogTokenPermissions:_Token_Impersonation:_SecurityDelegation
push esi
push 0x20
call fcn.00446be0
add esp, 0xc
jmp 0x41b4fc
push eax
push str.LogTokenPermissions:_Token_Impersonation:__unknown:_0x_08x_
push esi
push 0x20
call fcn.00446be0
add esp, 0x10
push dword [ebp - 0x5220]
push dword [ebp - 0x5224]
push str.LogTokenPermissions:_Group_Count__d_Privilege_Count__d
push esi
push 0x20
call fcn.00446be0
add esp, 0x14
push 0x2808
lea eax, [ebp - 0x2a0c]
mov dword [ebp - 0x5250], 0
push 0
push eax
call fcn.00411960
add esp, 0xc
lea eax, [ebp - 0x5250]
push eax
push 0x2808
lea eax, [ebp - 0x2a0c]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41b570
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_user:_0x_08x
push 1
call fcn.00446b80
add esp, 0xc
jmp 0x41b58c
push str.LogTokenPermissions:_Token_User:
push esi
push 0x20
call fcn.00446be0
push esi
push dword [ebp - 0x2a0c]
call fcn.0041a800
add esp, 0x14
mov eax, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401bd5
mov esp, ebp
pop ebp
ret