Function at 0x7836d4
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 0x783988
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 0x783726
test ebx, ebx
je 0x78396d
xor eax, eax
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x783852
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 0x78382b
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 0x7837a8
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x7837a8
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 0x783821
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 0x783821
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
xor eax, eax
push ebp
push 0x78380a
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 0x783814
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x78396d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x783839
cmp byte [ebp - 0xd], 0
jne 0x783852
cmp dword [ebp - 0x24], 0
je 0x783852
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 0x78392a
xor eax, eax
push ebp
push 0x783923
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 0x783906
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 0x78390f
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 0x78390f
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 0x78392a
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
ret
cmp dword [ebp - 0x24], 0
je 0x78396d
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 0x783965
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 0x78398f
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret