Function at 0x4a8990
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fbbf0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, 0x6a
mov dword [ebp - 0x10], esp
push 1
push 0x5272b0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
call fcn.004a7880
mov eax, dword [ebp - 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
add esp, 8
push eax
push 0x40
call ebx
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
push ecx
push 0x40
call ebx
mov edi, dword [ebp + 0x14]
mov ecx, 0xf558a0
push edi
mov esi, eax
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
lea edx, [ebp - 0x2c]
lea eax, [ebp - 0x20]
push edx
mov edx, dword [ebp - 0x14]
push eax
lea ecx, [ebp - 0x24]
push esi
push ecx
push edx
push edi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x4a8a50
push str.Error__lu___LookupAccountName_n
call fcn.004f172e
add esp, 4
or ax, 0xffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
push str.Adding_ACE_for__s_s_n
call fcn.004f172e
mov esi, dword [ebp + 8]
add esp, 0xc
mov ecx, 0xf558a0
push esi
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x18]
push eax
push 0
push ecx
push 0
push 0
push 4
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoA]
neg eax
sbb eax, eax
neg eax
mov dword [ebp + 0x14], eax
je 0x4a8acf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.key_Error__d:GetNamedSecurityInfo_n
call fcn.004f172e
add esp, 8
or ax, 0xffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4a8b2c
push 2
lea edx, [ebp - 0x38]
push 0xc
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4a8b12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:GetAclInformation_n
call fcn.004f172e
add esp, 8
or ax, 0xffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4a8b2c
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x34]
lea edi, [eax + ecx + 8]
jmp 0x4a8b3b
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
add edi, 0x10
push edi
push 0x40
call ebx
mov esi, eax
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x4a8b61
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:InitializeAcl_n
jmp 0x4a8ca0
mov al, byte [ebp + 0x18]
test al, al
jne 0x4a8bb2
push str._Add_the_access_denied_ACE_to_the_new_DACL
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessDeniedAce]
test eax, eax
jne 0x4a8c00
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAccessDeniedAce_n
jmp 0x4a8ca0
cmp al, 1
jne 0x4a8c00
push str._Add_the_access_allowed_ACE_to_the_new_DACL
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
push edx
push eax
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x4a8c00
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAccessAllowedAce_n
jmp 0x4a8ca0
lea ecx, [ebp - 0x1c]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4a8c1a
mov eax, dword [ebp - 0x1c]
mov dl, byte [ebp + 0x10]
mov byte [eax + 1], dl
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4a8c7d
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4a8c7d
mov ebx, dword [sym.imp.ADVAPI32.dll_AddAce]
xor edi, edi
cmp edi, dword [ebp - 0x38]
jae 0x4a8c7d
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push ecx
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4a8c56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:_GetAce_n
jmp 0x4a8ca0
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov cx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push esi
call ebx
test eax, eax
jne 0x4a8c7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAce_n
jmp 0x4a8ca0
inc edi
jmp 0x4a8c30
mov edx, dword [ebp + 8]
push 0
push esi
push 0
push 0
push 4
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
neg eax
sbb eax, eax
neg eax
je 0x4a8cc4
push eax
push str.Error__d:SetNamedSecurityInfo_n
call fcn.004f172e
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
or ax, 0xffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0x5272b0
call fcn.004a7880
add esp, 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
mov eax, dword [ebp - 0x28]
push eax
call esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov ax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret