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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41104c
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xf0
mov eax, dword [0x4170a0]
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.00410000
add esp, 4
mov byte [ebp - 4], 1
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x41080a
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0xffffffff
jne 0x4106da
mov dword [ebp - 0x94], str.Couldnt_get_session_ID
push 0x41532c
lea eax, [ebp - 0x94]
push eax
call fcn.0040490b
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 0x410712
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 0x41072d
mov dword [ebp - 0x98], str.Couldnt_get_session_information
push 0x41532c
lea ecx, [ebp - 0x98]
push ecx
call fcn.0040490b
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 0x414338
lea ecx, [ebp - 0x8c]
push ecx
lea edx, [ebp - 0xb4]
push edx
call fcn.00401900
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.00401990
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 0x410893
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 0x410856
mov dword [ebp - 0xd4], 0x41433c
push 0x41532c
lea eax, [ebp - 0xd4]
push eax
call fcn.0040490b
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 0x410887
mov dword [ebp - 0xd8], str.Couldnt_get_user_name
push 0x41532c
lea ecx, [ebp - 0xd8]
push ecx
call fcn.0040490b
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 0x4108fc
cmp dword [ebp - 0x48], 0
jne 0x410917
mov dword [ebp - 0xdc], str.Couldnt_allocate_memory
push 0x41532c
lea edx, [ebp - 0xdc]
push edx
call fcn.0040490b
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 0x41095b
mov dword [ebp - 0xe0], str.Couldnt_get_SID
push 0x41532c
lea edx, [ebp - 0xe0]
push edx
call fcn.0040490b
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
jne 0x410987
mov dword [ebp - 0xe4], str.Couldnt_convert_SID_to_string
push 0x41532c
lea edx, [ebp - 0xe4]
push edx
call fcn.0040490b
movzx eax, byte [ebp - 0x1d]
test eax, eax
je 0x4109a2
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 0x410a42
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
push ecx
push str.GetRealUserSID_returns__s
call fcn.00410000
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.00403633
mov esp, ebp
pop ebp
ret