Function at 0x416de0
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c4c
call fcn.004767d0
mov eax, dword [0x4e7018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x2c14]
push esi
push edi
push 0x2810
push 0
push eax
mov dword [ebp - 0x2c4c], ebx
mov dword [ebp - 0x2c48], 0
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c48]
push eax
push 0x2810
lea eax, [ebp - 0x2c14]
push eax
push 3
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov esi, dword [ebp + 0xc]
test eax, eax
jne 0x416e5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_privilege_information:_0x_08x
push 1
call fcn.004439a0
jmp 0x41701e
push dword [ebp - 0x2c14]
push str.LogTokenPermissions:_number_of_privileges:__d
push esi
push 2
call fcn.00443a00
add esp, 0x10
call fcn.00443870
test al, 0x20
je 0x4178c2
xor edi, edi
cmp dword [ebp - 0x2c14], edi
jbe 0x417011
lea ebx, [ebp - 0x2c08]
nop word [eax + eax]
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.0040f160
push 0x200
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.0040f160
add esp, 0x18
mov dword [ebp - 0x2c44], 0x200
lea eax, [ebp - 0x2c44]
mov dword [ebp - 0x2c40], 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 0x416f28
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.004439a0
push 0x200
lea eax, [ebp - 0x204]
push str._empty_
push eax
call fcn.0047b220
add esp, 0x1c
lea eax, [ebp - 0x2c40]
mov dword [ebp - 0x2c44], 0x200
push eax
lea eax, [ebp - 0x2c44]
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 0x416f87
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.004439a0
push 0x200
lea eax, [ebp - 0x404]
push str._empty_
push eax
call fcn.0047b220
add esp, 0x1c
mov ecx, dword [ebx]
mov edx, 0x4975e2
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.00443a00
add esp, 0x20
test byte [ebx], 2
je 0x416fcf
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx], 1
je 0x416fe5
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
cmp dword [ebx], 0
jge 0x416ffb
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_USED_FOR_ACCESS
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
inc edi
add ebx, 0xc
cmp edi, dword [ebp - 0x2c14]
jb 0x416ea0
mov ebx, dword [ebp - 0x2c4c]
push str.LogTokenPermissions:_Done_enumerating_Privileges
push esi
push 0x20
call fcn.00443a00
add esp, 0xc
push 0x282c
lea eax, [ebp - 0x2c30]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x282c
lea eax, [ebp - 0x2c30]
push eax
push 0xd
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x417079
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.004439a0
jmp 0x417443
push dword [ebp - 0x2c30]
push str.LogTokenPermissions:_number_of_SIDs:__d
push esi
push 0x20
call fcn.00443a00
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x2c30], edi
jbe 0x417176
nop dword [eax]
mov eax, dword [ebp - 0x2c28]
push edi
push str.LogTokenPermissions:_SID___d:
push esi
push 0x20
lea ebx, [eax + edi*8]
call fcn.00443a00
push esi
push dword [ebx]
call fcn.00416b70
add esp, 0x18
test byte [ebx + 4], 4
je 0x4170d9
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 2
je 0x4170f0
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test dword [ebx + 4], 0xc0000000
je 0x41710a
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_LOGON_ID
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 1
je 0x417121
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_MANDATORY
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 8
je 0x417138
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_OWNER
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test dword [ebx + 4], 0x20000000
je 0x417152
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_RESOURCE
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 0x10
je 0x417169
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_USE_FOR_DENY_ONLY
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x2c30]
jb 0x4170a0
push dword [ebp - 0x2c24]
push str.LogTokenPermissions:_number_of_restricted_SIDs:__d
push esi
push 0x20
call fcn.00443a00
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x2c24], edi
jbe 0x417276
nop word [eax + eax]
mov eax, dword [ebp - 0x2c1c]
push edi
push str.LogTokenPermissions:_restricted_SID___d:
push esi
push 0x20
lea ebx, [eax + edi*8]
call fcn.00443a00
push esi
push dword [ebx]
call fcn.00416b70
add esp, 0x18
test byte [ebx + 4], 4
je 0x4171d9
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_ENABLED
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 2
je 0x4171f0
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test dword [ebx + 4], 0xc0000000
je 0x41720a
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_LOGON_ID
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 1
je 0x417221
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_MANDATORY
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 8
je 0x417238
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_OWNER
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test dword [ebx + 4], 0x20000000
je 0x417252
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_RESOURCE
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx + 4], 0x10
je 0x417269
push edi
push str.LogTokenPermissions:_restricted_SID___d:_SE_GROUP_USE_FOR_DENY_ONLY
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x2c24]
jb 0x4171a0
push dword [ebp - 0x2c18]
push str.LogTokenPermissions:_number_of_privileges:__d
push esi
push 2
call fcn.00443a00
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x2c18], edi
jbe 0x417430
xor ebx, ebx
nop dword [eax]
push 0x200
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.0040f160
push 0x200
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.0040f160
add esp, 0x18
mov dword [ebp - 0x2c44], 0x200
lea eax, [ebp - 0x2c44]
mov dword [ebp - 0x2c48], 0
push eax
lea eax, [ebp - 0x204]
push eax
mov eax, dword [ebp - 0x2c10]
add eax, ebx
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
test eax, eax
jne 0x41732d
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.004439a0
push 0x200
lea eax, [ebp - 0x204]
push str._empty_
push eax
call fcn.0047b220
add esp, 0x1c
lea eax, [ebp - 0x2c48]
mov dword [ebp - 0x2c44], 0x200
push eax
lea eax, [ebp - 0x2c44]
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 0x41738c
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.004439a0
push 0x200
lea eax, [ebp - 0x404]
push str._empty_
push eax
call fcn.0047b220
add esp, 0x1c
mov eax, dword [ebp - 0x2c10]
mov edx, 0x4975e2
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.00443a00
mov eax, dword [ebp - 0x2c10]
add esp, 0x20
test byte [ebx + eax + 8], 2
je 0x4173e4
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
mov eax, dword [ebp - 0x2c10]
test byte [ebx + eax + 8], 1
je 0x417402
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
mov eax, dword [ebp - 0x2c10]
cmp dword [ebx + eax + 8], 0
jge 0x417420
push edi
push str.LogTokenPermissions:_Privilege___d:_SE_PRIVILEGE_USED_FOR_ACCESS
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
inc edi
add ebx, 0xc
cmp edi, dword [ebp - 0x2c18]
jb 0x4172a0
push str.LogTokenPermissions:_Done_enumerating_Privileges
push esi
push 0x20
call fcn.00443a00
mov ebx, dword [ebp - 0x2c4c]
add esp, 0xc
push 0x280c
lea eax, [ebp - 0x2c10]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x280c
lea eax, [ebp - 0x2c10]
push eax
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4174a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_privilege_information_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x4175a0
push dword [ebp - 0x2c10]
push str.LogTokenPermissions:_number_of_groups:__d
push esi
push 0x20
call fcn.00443a00
xor edi, edi
add esp, 0x10
cmp dword [ebp - 0x2c10], edi
jbe 0x4175a0
lea ebx, [ebp - 0x2c08]
nop dword [eax + eax]
push edi
push str.LogTokenPermissions:_groups___d:
push esi
push 0x20
call fcn.00443a00
push esi
push dword [ebx - 4]
call fcn.00416b70
add esp, 0x18
test byte [ebx], 4
je 0x417500
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx], 2
je 0x417516
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_ENABLED_BY_DEFAULT
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test dword [ebx], 0xc0000000
je 0x41752f
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_LOGON_ID
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx], 1
je 0x417545
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_MANDATORY
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx], 8
je 0x41755b
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_OWNER
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test dword [ebx], 0x20000000
je 0x417574
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_RESOURCE
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
test byte [ebx], 0x10
je 0x41758a
push edi
push str.LogTokenPermissions:_Group___d:_SE_GROUP_USE_FOR_DENY_ONLY
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
inc edi
add ebx, 8
cmp edi, dword [ebp - 0x2c10]
jb 0x4174d0
mov ebx, dword [ebp - 0x2c4c]
push 0x2804
lea eax, [ebp - 0x2c08]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x2804
lea eax, [ebp - 0x2c08]
push eax
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4175f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_owner_information:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x417614
push str.LogTokenPermissions:_owner_SID:
push esi
push 0x20
call fcn.00443a00
push esi
push dword [ebp - 0x2c08]
call fcn.00416b70
add esp, 0x14
push 0x2804
lea eax, [ebp - 0x2c08]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x2804
lea eax, [ebp - 0x2c08]
push eax
push 5
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41766c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_primary_group:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x417688
push str.LogTokenPermissions:_Token_Primary_Group:
push esi
push 0x20
call fcn.00443a00
push esi
push dword [ebp - 0x2c08]
call fcn.00416b70
add esp, 0x14
push 0x2810
lea eax, [ebp - 0x2c14]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x2810
lea eax, [ebp - 0x2c14]
push eax
push 7
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4176e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_source:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x417730
movsx eax, byte [ebp - 0x2c0d]
push eax
movsx eax, byte [ebp - 0x2c0e]
push eax
movsx eax, byte [ebp - 0x2c0f]
push eax
movsx eax, byte [ebp - 0x2c10]
push eax
movsx eax, byte [ebp - 0x2c11]
push eax
movsx eax, byte [ebp - 0x2c12]
push eax
movsx eax, byte [ebp - 0x2c13]
push eax
movsx eax, byte [ebp - 0x2c14]
push eax
push str.LogTokenPermissions:_Token_Source:__c_c_c_c_c_c_c_c
push esi
push 0x20
call fcn.00443a00
add esp, 0x2c
push 0x2838
lea eax, [ebp - 0x2c3c]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x2838
lea eax, [ebp - 0x2c3c]
push eax
push 0xa
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x41778b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_statistics:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x41784e
mov ecx, dword [ebp - 0x2c24]
mov eax, ecx
sub eax, 1
je 0x4177b7
sub eax, 1
je 0x4177b0
push ecx
push str.LogTokenPermissions:_Token_Type:__unknown:_0x_08x_
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
jmp 0x4177c7
push str.LogTokenPermissions:_Token_Type:_Impersonated
jmp 0x4177bc
push str.LogTokenPermissions:_Token_Type:_Primary
push esi
push 0x20
call fcn.00443a00
add esp, 0xc
mov eax, dword [ebp - 0x2c20]
cmp eax, 3
ja case.default.0x4177d2
jmp dword [eax*4 + 0x4178d8]
push str.LogTokenPermissions:_Token_Impersonation:_SecurityAnonymous
push esi
push 0x20
call fcn.00443a00
add esp, 0xc
jmp 0x417832
push str.LogTokenPermissions:_Token_Impersonation:_SecurityIdentification
push esi
push 0x20
call fcn.00443a00
add esp, 0xc
jmp 0x417832
push str.LogTokenPermissions:_Token_Impersonation:_SecurityImpersonation
push esi
push 0x20
call fcn.00443a00
add esp, 0xc
jmp 0x417832
push str.LogTokenPermissions:_Token_Impersonation:_SecurityDelegation
push esi
push 0x20
call fcn.00443a00
add esp, 0xc
jmp 0x417832
push eax
push str.LogTokenPermissions:_Token_Impersonation:__unknown:_0x_08x_
push esi
push 0x20
call fcn.00443a00
add esp, 0x10
push dword [ebp - 0x2c10]
push dword [ebp - 0x2c14]
push str.LogTokenPermissions:_Group_Count__d_Privilege_Count__d
push esi
push 0x20
call fcn.00443a00
add esp, 0x14
push 0x2808
lea eax, [ebp - 0x2c0c]
mov dword [ebp - 0x2c40], 0
push 0
push eax
call fcn.0040f160
add esp, 0xc
lea eax, [ebp - 0x2c40]
push eax
push 0x2808
lea eax, [ebp - 0x2c0c]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4178a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LogTokenPermissions:_could_not_obtain_token_user:_0x_08x
push 1
call fcn.004439a0
add esp, 0xc
jmp 0x4178c2
push str.LogTokenPermissions:_Token_User:
push esi
push 0x20
call fcn.00443a00
push esi
push dword [ebp - 0x2c0c]
call fcn.00416b70
add esp, 0x14
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401bf1
mov esp, ebp
pop ebp
ret