Function at 0x4a8dd0
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fbc10
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 esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
add esp, 8
push eax
push 0x40
call esi
mov ecx, dword [ebp - 0x20]
mov ebx, eax
push ecx
push 0x40
mov dword [ebp - 0x14], ebx
call esi
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
push eax
lea ecx, [ebp - 0x24]
push esi
push ecx
push ebx
push edi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x4a8e8f
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 edx, dword [ebp + 8]
add esp, 0xc
push edx
push 0
push 0x11f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
jne 0x4a8ede
push str.OpenProcess
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a7590
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
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x18]
push eax
push 0
push ecx
push 0
push 0
push 4
push 6
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
neg eax
sbb eax, eax
neg eax
je 0x4a8f29
push eax
push str.Error__d:GetSecurityInfo_n
call fcn.004f172e
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 0x4a8f8d
push 2
lea edx, [ebp - 0x38]
push 0xc
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4a8f73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:GetAclInformation_n
call fcn.004f172e
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 0x4a8f8d
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 0x4a8f9c
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 dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x4a8fc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:InitializeAcl_n
jmp 0x4a9100
mov al, byte [ebp + 0x18]
test al, al
jne 0x4a9017
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 0x4a9065
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAccessDeniedAce_n
jmp 0x4a9100
cmp al, 1
jne 0x4a9065
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 0x4a9065
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAccessAllowedAce_n
jmp 0x4a9100
lea ecx, [ebp - 0x1c]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4a907f
mov eax, dword [ebp - 0x1c]
mov dl, byte [ebp + 0x10]
mov byte [eax + 1], dl
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4a90e0
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4a90e0
xor edi, edi
cmp edi, dword [ebp - 0x38]
jae 0x4a90e0
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 0x4a90b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:_GetAce_n
jmp 0x4a9100
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov cx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
jne 0x4a90dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAce_n
jmp 0x4a9100
inc edi
jmp 0x4a908f
push 0
push esi
push 0
push 0
push 4
push 6
push ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
neg eax
sbb eax, eax
neg eax
je 0x4a912b
push eax
push str.Error__d:SetNamedSecurityInfo_n
call fcn.004f172e
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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 ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
mov edx, dword [ebp - 0x28]
push edx
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