Function at 0x60b614
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x60b8c8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
xor eax, eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 8]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0xc]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
cmp dword [ebp - 8], 0
jne 0x60b666
test ebx, ebx
je 0x60b8ad
xor eax, eax
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x60b792
mov dword [ebp - 0x14], pe_nt_image_headers32
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x60b76b
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x24]
push eax
push 1
push ebx
call sub.advapi32.dll_GetTokenInformation
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
jne 0x60b6e8
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x60b6e8
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x14]
call sub.rtl120.bpl__System__ReallocMem_qqrrpvi
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x24]
push eax
push 1
push ebx
call sub.advapi32.dll_GetTokenInformation
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
je 0x60b761
xor eax, eax
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
push eax
call sub.advapi32.dll_ConvertSidToStringSidW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
mov eax, dword [ebp - 0x24]
call sub.rtl120.bpl__System__FreeMem_qqrpv
xor eax, eax
mov dword [ebp - 0x24], eax
cmp byte [ebp - 0xd], 0
je 0x60b761
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
xor eax, eax
push ebp
push 0x60b74a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_LocalFree
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x60b754
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x60b8ad
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x60b779
cmp byte [ebp - 0xd], 0
jne 0x60b792
cmp dword [ebp - 0x24], 0
je 0x60b792
mov eax, dword [ebp - 0x24]
call sub.rtl120.bpl__System__FreeMem_qqrpv
xor eax, eax
mov dword [ebp - 0x24], eax
cmp byte [ebp - 0xd], 0
jne 0x60b86a
xor eax, eax
push ebp
push 0x60b863
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push 0
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ebx, eax
push ebx
push 0
call sub.advapi32.dll_LookupAccountNameW
cmp dword [ebp - 0x14], 0
jbe 0x60b846
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System_AllocMem_qqrui
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x18]
inc edx
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
add eax, eax
push eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
xor ecx, ecx
pop edx
call sub.rtl120.bpl__System__FillChar_qqrpvib
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x20]
push eax
push ebx
push 0
call sub.advapi32.dll_LookupAccountNameW
test eax, eax
jne 0x60b84f
mov eax, dword [ebp - 0x20]
call sub.rtl120.bpl__System__FreeMem_qqrpv
xor eax, eax
mov dword [ebp - 0x20], eax
mov byte [ebp - 0xd], 0
jmp 0x60b84f
mov byte [ebp - 0xd], 0
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x60b86a
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
ret
cmp dword [ebp - 0x24], 0
je 0x60b8ad
xor eax, eax
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_ConvertSidToStringSidW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
je 0x60b8a5
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_LocalFree
mov eax, dword [ebp - 0x24]
call sub.rtl120.bpl__System__FreeMem_qqrpv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x60b8cf
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret