Function at 0x49f9f8
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe78
push ebx
push esi
push edi
mov ebx, ecx
test ebx, ebx
js 0x49fa11
mov esi, dword [edx + ebx*4]
dec ebx
push esi
jns 0x49fa0a
mov edx, esp
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], 0x50
mov dword [ebp - 0x18], 8
xor eax, eax
call fcn.00402744
mov eax, 8
call fcn.00402744
mov ebx, 0xa
lea esi, [ebp - 0x48]
xor eax, eax
call fcn.00402744
mov dword [esi], eax
xor eax, eax
mov dword [esi], eax
add esi, 4
dec ebx
jne 0x49fa40
mov ebx, 1
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x49fa63
inc dword [ebp - 0x10]
inc ebx
mov eax, dword [ebp - 8]
cmp dword [eax + ebx*4 - 4], 0
je 0x49fa72
cmp ebx, 0xa
jle 0x49fa5f
mov edi, dword [ebp - 0x10]
test edi, edi
jle 0x49fb1c
lea ebx, [ebp - 0x48]
mov esi, dword [ebp - 8]
push 2
call sub.advapi32.dll_GetSidLengthRequired
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
call fcn.00402744
mov dword [ebx], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebx]
push eax
mov eax, dword [esi]
push eax
push 0
call sub.advapi32.dll_LookupAccountNameA
test eax, eax
jne 0x49faf7
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x49faf3
mov eax, ebx
mov edx, dword [ebp - 0x14]
call fcn.00402784
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebx]
push eax
mov eax, dword [esi]
push eax
push 0
call sub.advapi32.dll_LookupAccountNameA
test eax, eax
jmp 0x49faf7
xor eax, eax
mov dword [ebx], eax
cmp dword [ebx], 0
je 0x49fb0f
mov eax, dword [ebx]
push eax
call sub.advapi32.dll_GetLengthSid
mov edx, dword [ebp - 0x18]
add edx, 8
add eax, edx
mov dword [ebp - 0x18], eax
add esi, 4
add ebx, 4
dec edi
jne 0x49fa83
mov eax, dword [ebp - 0x18]
call fcn.00402744
mov ebx, eax
mov eax, dword [ebp - 0x18]
add eax, 0x14
call fcn.00402744
mov dword [ebp - 0xc], eax
push 1
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_InitializeSecurityDescriptor
push 3
mov eax, dword [ebp - 0x18]
push eax
push ebx
call sub.advapi32.dll_InitializeAcl
mov edi, dword [ebp - 0x10]
test edi, edi
jle 0x49fb81
lea esi, [ebp - 0x48]
cmp byte [ebp + 8], 0
je 0x49fb6c
mov eax, dword [esi]
push eax
mov eax, dword [ebp + 0xc]
push eax
push 2
push ebx
call sub.advapi32.dll_AddAccessDeniedAce
jmp 0x49fb7b
mov eax, dword [esi]
push eax
mov eax, dword [ebp + 0xc]
push eax
push 2
push ebx
call sub.advapi32.dll_AddAccessAllowedAce
add esi, 4
dec edi
jne 0x49fb55
push 0xffffffffffffffff
push ebx
push 0xffffffffffffffff
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_SetSecurityDescriptorDacl
test eax, eax
je 0x49fba4
mov eax, dword [ebp - 0xc]
push eax
push 4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegSetKeySecurity
test eax, eax
xor edx, edx
mov eax, dword [ebp - 0xc]
call fcn.00402764
mov edx, 8
mov eax, ebx
call fcn.00402764
mov ebx, 0xa
lea esi, [ebp - 0x48]
mov eax, dword [esi]
xor edx, edx
call fcn.00402764
add esi, 4
dec ebx
jne 0x49fbc2
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey_1
test eax, eax
mov edi, dword [ebp - 0x194]
mov esi, dword [ebp - 0x190]
mov ebx, dword [ebp - 0x18c]
mov esp, ebp
pop ebp
ret 8