Function at 0x478f00
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bd988
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x5603e8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x6c], ebx
call fcn.004785e0
cmp eax, 0xffffffff
jne 0x478f48
call fcn.004786b0
mov esi, eax
cmp esi, 0xffffffff
je 0x479148
cmp dword [0x561504], ebx
jne 0x478f79
push str.WTSQuerySessionInformationW
push str.Wtsapi32.dll
call fcn.004784b0
add esp, 8
push eax
push 0x561504
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x6c]
push ecx
push 5
push esi
push ebx
call dword [0x561504]
test eax, eax
je 0x479148
mov edx, dword [ebp - 0x6c]
push 0x4785a0
push edx
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
call fcn.00478d40
mov edx, dword [ebp - 0x6c]
push ebx
lea eax, [ebp - 0x74]
push eax
push ebx
lea ecx, [ebp - 0x70]
push ecx
push ebx
push edx
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x479139
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edi
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x7c]
xor edx, edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
lea ecx, [ebp - 0x28]
call fcn.00478de0
mov edx, dword [ebp - 0x70]
lea ecx, [ebp - 0x28]
push ecx
push edx
push 8
mov byte [ebp - 4], 1
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
push eax
lea ecx, [ebp - 0x48]
call fcn.0049ea80
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 3
test ecx, ecx
je 0x479046
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x28]
cmp ecx, edx
setne dl
movzx edx, dl
push edx
call eax
call esi
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edi
xor edx, edx
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov edx, dword [ebp - 0x7c]
mov dword [ecx + 0xc], edx
lea ecx, [ebp - 0x28]
call fcn.00478e60
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x28]
push eax
lea edx, [ecx + ecx]
push edx
push 8
mov byte [ebp - 4], 4
call esi
push eax
call ebx
push eax
lea ecx, [ebp - 0x68]
call fcn.0049ea80
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 6
test ecx, ecx
je 0x4790a2
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x28]
cmp ecx, edx
setne dl
movzx edx, dl
push edx
call eax
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x479121
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x479121
lea edx, [ebp - 0x90]
push edx
lea edx, [ebp - 0x74]
push edx
push eax
lea eax, [ebp - 0x70]
push eax
push ecx
mov ecx, dword [ebp - 0x6c]
push ecx
push 0
mov dword [ebp - 0x90], 1
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x479121
mov eax, dword [ebp - 0x48]
lea edx, [ebp - 0x78]
push edx
push eax
mov dword [ebp - 0x78], 0
call sub.ADVAPI32.dll_ConvertSidToStringSidW
neg eax
sbb esi, esi
and esi, dword [ebp - 0x78]
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 3
call fcn.0049efd0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0
call fcn.0049efd0
lea ecx, [ebp - 0x80]
mov dword [ebp - 4], 0xffffffff
call fcn.00478c40
mov eax, esi
jmp 0x47914a
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 3
call fcn.0049efd0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0
call fcn.0049efd0
lea ecx, [ebp - 0x80]
mov dword [ebp - 4], 0xffffffff
call fcn.00478c40
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret