Function at 0x4a81d0
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fbbc0
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 0x4a8290
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 2
push esi
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoA]
neg eax
sbb eax, eax
neg eax
je 0x4a8306
push eax
push str.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 0x4a8363
push 2
lea edx, [ebp - 0x38]
push 0xc
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
jne 0x4a8349
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 0x4a8363
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 0x4a8372
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 0x4a8398
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:InitializeAcl_n
jmp 0x4a84d7
mov al, byte [ebp + 0x18]
test al, al
jne 0x4a83e9
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 0x4a8437
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAccessDeniedAce_n
jmp 0x4a84d7
cmp al, 1
jne 0x4a8437
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 0x4a8437
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAccessAllowedAce_n
jmp 0x4a84d7
lea ecx, [ebp - 0x1c]
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
jne 0x4a8451
mov eax, dword [ebp - 0x1c]
mov dl, byte [ebp + 0x10]
mov byte [eax + 1], dl
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4a84b4
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4a84b4
mov ebx, dword [sym.imp.ADVAPI32.dll_AddAce]
xor edi, edi
cmp edi, dword [ebp - 0x38]
jae 0x4a84b4
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 0x4a848d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:_GetAce_n
jmp 0x4a84d7
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 0x4a84b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d:AddAce_n
jmp 0x4a84d7
inc edi
jmp 0x4a8467
mov edx, dword [ebp + 8]
push 0
push esi
push 0
push 0
push 4
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
neg eax
sbb eax, eax
neg eax
je 0x4a84fb
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