Function at 0x421dd0
Capabilities:
Get session information
Get session user name
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42298c
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xf0
mov eax, dword [0x429130]
xor eax, ebp
mov dword [ebp - 0x28], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
lea ecx, [ebp - 0x44]
call fcn.00401160
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x1d], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x54], 0
push str.GetRealUserSID_Starts...
call fcn.004217c0
add esp, 4
mov byte [ebp - 4], 1
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x421fca
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0xffffffff
jne 0x421e9a
mov dword [ebp - 0x94], 0x425eb4
push 0x42783c
lea eax, [ebp - 0x94]
push eax
call fcn.004111b6
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x50]
push edx
push 5
mov eax, dword [ebp - 0x90]
push eax
push 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x421ed2
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x4c]
push edx
push 7
mov eax, dword [ebp - 0x90]
push eax
push 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
jne 0x421eed
mov dword [ebp - 0x98], 0x425ecc
push 0x42783c
lea ecx, [ebp - 0x98]
push ecx
call fcn.004111b6
mov edx, dword [ebp - 0x50]
push edx
lea ecx, [ebp - 0x70]
call fcn.00401190
mov dword [ebp - 0xec], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x8c]
call fcn.00401190
mov dword [ebp - 0xf0], eax
mov byte [ebp - 4], 3
push 0x425ef0
lea ecx, [ebp - 0x8c]
push ecx
lea edx, [ebp - 0xb4]
push edx
call fcn.004018a0
add esp, 0xc
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0xf4]
mov dword [ebp - 0xf8], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0xf8]
push edx
lea eax, [ebp - 0xd0]
push eax
call fcn.00401930
add esp, 0xc
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp - 0xfc]
mov dword [ebp - 0x100], ecx
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x100]
push edx
lea ecx, [ebp - 0x44]
call fcn.004011f0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xd0]
call fcn.004011d0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xb4]
call fcn.004011d0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x8c]
call fcn.004011d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x70]
call fcn.004011d0
jmp 0x422053
mov byte [ebp - 0x1d], 1
lea eax, [ebp - 0x24]
push eax
push 0
push 0xc
call sub.Secur32.dll_GetUserNameExW
mov ecx, dword [ebp - 0x24]
lea edx, [ecx + ecx + 2]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x422016
mov dword [ebp - 0xd4], 0x425ef4
push 0x42783c
lea eax, [ebp - 0xd4]
push eax
call fcn.004111b6
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x50]
push edx
push 0xc
call sub.Secur32.dll_GetUserNameExW
movzx eax, al
test eax, eax
jne 0x422047
mov dword [ebp - 0xd8], 0x425f10
push 0x42783c
lea ecx, [ebp - 0xd8]
push ecx
call fcn.004111b6
mov edx, dword [ebp - 0x50]
push edx
lea ecx, [ebp - 0x44]
call fcn.00401210
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x54], 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x54]
push ecx
push 0
lea edx, [ebp - 0x24]
push edx
push 0
lea ecx, [ebp - 0x44]
call fcn.00401230
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov eax, dword [ebp - 0x24]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x54]
shl ecx, 1
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x18], 0
je 0x4220bc
cmp dword [ebp - 0x48], 0
jne 0x4220d7
mov dword [ebp - 0xdc], 0x425f28
push 0x42783c
lea edx, [ebp - 0xdc]
push edx
call fcn.004111b6
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x48]
push edx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x44]
call fcn.00401230
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x42211b
mov dword [ebp - 0xe0], 0x425f44
push 0x42783c
lea edx, [ebp - 0xe0]
push edx
call fcn.004111b6
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
jne 0x422147
mov dword [ebp - 0xe4], 0x425f58
push 0x42783c
lea edx, [ebp - 0xe4]
push edx
call fcn.004111b6
movzx eax, byte [ebp - 0x1d]
test eax, eax
je 0x422162
mov ecx, dword [ebp - 0x50]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [ebp - 0x18]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x48]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x422202
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
push ecx
push str.GetRealUserSID_returns__s
call fcn.004217c0
add esp, 8
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0xe8], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.004011d0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x28]
xor ecx, ebp
call fcn.0040f2fd
mov esp, ebp
pop ebp
ret