Function at 0x59a910
Capabilities:
Get user security identifier
Manipulate user privileges

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ff3b2
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x70f200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x66], dl
mov edi, ecx
lea eax, [ebp - 0x58]
xorps xmm0, xmm0
push eax
push 0x810
lea eax, [ebp - 0x54]
movq qword [ebp - 0x44], xmm0
push eax
push 0
movups xmmword [ebp - 0x54], xmm0
call dword [sym.imp.ADVAPI32.dll_LsaOpenPolicy]
test eax, eax
je 0x59a97f
xor al, al
jmp 0x59abe1
push 0x104
mov byte [ebp - 0x6c], 0
mov byte [ebp - 0x65], 0
mov dword [ebp - 0x64], 0x104
mov dword [ebp - 0x60], 0x104
mov dword [ebp - 0x18], 0
call fcn.0041e7cf
add esp, 4
mov dword [ebp - 0x24], 0
mov esi, eax
lea ecx, [ebp - 0x2c]
xorps xmm0, xmm0
mov dword [ebp - 0x74], esi
movq qword [ebp - 0x2c], xmm0
call fcn.005dc5e0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x38]
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
movq qword [ebp - 0x38], xmm0
call fcn.005dc5e0
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x5c], 0
push eax
push 0
push 0
push dword [ebp - 0x60]
lea ecx, [ebp - 0x2c]
call fcn.005db9a0
push eax
lea eax, [ebp - 0x64]
push eax
push esi
push edi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x59abae
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_LsaEnumerateAccountRights]
push eax
call dword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
cmp eax, 2
sete cl
xor edi, edi
mov dword [ebp - 0x70], ecx
cmp dword [ebp - 0x18], edi
jbe 0x59aaae
xor esi, esi
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x6c], esi
nop dword [eax]
mov ecx, dword [ebp - 0x5c]
mov edx, str.SeDenyInteractiveLogonRight
push 0
mov ecx, dword [esi + ecx + 4]
call fcn.005d8ad0
test eax, eax
jne 0x59aa70
mov ecx, dword [ebp - 0x70]
mov byte [ebp - 0x65], 1
jmp 0x59aa99
mov ecx, dword [ebp - 0x5c]
mov edx, str.SeInteractiveLogonRight
mov eax, dword [ebp - 0x6c]
push 0
mov ecx, dword [eax + ecx + 4]
call fcn.005d8ad0
mov ecx, dword [ebp - 0x70]
test eax, eax
movzx ecx, cl
mov eax, 1
cmove ecx, eax
mov dword [ebp - 0x70], ecx
mov eax, dword [ebp - 0x6c]
inc edi
add eax, 8
add esi, 8
mov dword [ebp - 0x6c], eax
cmp edi, dword [ebp - 0x18]
jb 0x59aa50
mov esi, dword [ebp - 0x74]
mov dl, byte [ebp - 0x65]
test cl, cl
je 0x59aabd
test dl, dl
jne 0x59aabd
mov al, 1
jmp 0x59aabf
xor al, al
mov dh, byte [ebp - 0x66]
mov dword [ebp - 0x6c], eax
cmp dh, 2
je 0x59abae
cmp al, dh
jne 0x59aadb
mov byte [ebp - 0x6c], 1
jmp 0x59abae
cmp dh, 1
jne 0x59ab49
mov al, dh
mov dword [ebp - 0x6c], eax
test dl, dl
je 0x59ab12
lea edx, [ebp - 0x20]
mov ecx, str.SeDenyInteractiveLogonRight
call fcn.0059ac00
push 1
mov eax, edx
push eax
push 0
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_LsaRemoveAccountRights]
mov ecx, dword [ebp - 0x70]
test eax, eax
sete al
mov dword [ebp - 0x6c], eax
mov byte [ebp - 0x66], al
test cl, cl
jne 0x59abae
lea edx, [ebp - 0x20]
mov ecx, str.SeInteractiveLogonRight
call fcn.0059ac00
push 1
mov eax, edx
push eax
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_LsaAddAccountRights]
movzx ecx, byte [ebp - 0x66]
xor edx, edx
test eax, eax
cmove edx, ecx
mov dword [ebp - 0x6c], edx
jmp 0x59abae
test dh, dh
jne 0x59abae
mov byte [ebp - 0x6c], 1
test dl, dl
jne 0x59ab7c
lea edx, [ebp - 0x20]
mov ecx, str.SeDenyInteractiveLogonRight
call fcn.0059ac00
push 1
mov eax, edx
push eax
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_LsaAddAccountRights]
mov ecx, dword [ebp - 0x70]
test eax, eax
sete al
mov byte [ebp - 0x6c], al
test cl, cl
je 0x59abae
lea edx, [ebp - 0x20]
mov ecx, str.SeInteractiveLogonRight
call fcn.0059ac00
push 1
mov eax, edx
push eax
push 0
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_LsaRemoveAccountRights]
mov ecx, dword [ebp - 0x6c]
xor edx, edx
test eax, eax
movzx ecx, cl
cmove edx, ecx
mov byte [ebp - 0x6c], dl
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_LsaClose]
push esi
call fcn.0041e1c3
mov eax, dword [ebp - 0x5c]
add esp, 4
test eax, eax
je 0x59abce
push eax
call dword [sym.imp.ADVAPI32.dll_LsaFreeMemory]
lea ecx, [ebp - 0x38]
call fcn.005dc430
lea ecx, [ebp - 0x2c]
call fcn.005dc430
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret