Function at 0x47a880
Capabilities:
Get session information
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58d8cb
mov eax, dword fs:[0]
push eax
sub esp, 0x1e0
mov eax, dword [0x61b000]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1ec], ecx
lea ecx, [ebp - 0x1d4]
call fcn.00475d30
mov dword [ebp - 4], 0
mov byte [ebp - 0x11c], 0
push 0x103
push 0
lea eax, [ebp - 0x11b]
push eax
call fcn.00568440
add esp, 0xc
mov dword [ebp - 0x12c], 0
xor ecx, ecx
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x1d8], 0
mov dword [ebp - 0x130], 0
lea edx, [ebp - 0x130]
push edx
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1d4], ecx
lea edx, [ebp - 0x11c]
push edx
lea ecx, [ebp - 0x1c4]
call fcn.00406110
lea eax, [ebp - 0x130]
push eax
lea ecx, [ebp - 0x1d8]
push ecx
push 0x12
push 0xffffffffffffffff
push 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x47a9d6
cmp dword [ebp - 0x1d8], 0
je 0x47a97f
cmp dword [ebp - 0x130], 8
jne 0x47a97f
mov edx, dword [ebp - 0x1d8]
mov eax, dword [edx]
mov dword [ebp - 0x12c], eax
mov ecx, dword [edx + 4]
mov dword [ebp - 0x128], ecx
lea edx, [ebp - 0x12c]
push edx
lea eax, [ebp - 0x154]
push eax
call fcn.00474130
add esp, 8
mov ecx, dword [ebp - 0x1ec]
add ecx, 0x48
mov edx, dword [ebp - 0x154]
mov dword [ecx], edx
mov eax, dword [ebp - 0x150]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x14c]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x148]
mov dword [ecx + 0xc], eax
cmp dword [ebp - 0x1d8], 0
je 0x47a9d6
mov ecx, dword [ebp - 0x1d8]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
lea edx, [ebp - 0x144]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
call fcn.00474060
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 1
ja 0x47aa87
mov eax, dword [ebp - 0x1ec]
add eax, 0xa0
push eax
mov ecx, dword [ebp - 0x1ec]
call fcn.0047ab30
test eax, eax
je 0x47aa87
mov ecx, dword [ebp - 0x1ec]
add ecx, 0xa0
call fcn.004a2040
test eax, eax
je 0x47aa87
lea ecx, [ebp - 0x1e0]
push ecx
mov ecx, dword [ebp - 0x1ec]
add ecx, 0xa0
call fcn.004308f0
mov ecx, eax
call fcn.004642b0
add eax, 0xc
push eax
lea ecx, [ebp - 0x18c]
call fcn.004060f0
lea edx, [ebp - 0x1e8]
push edx
mov ecx, dword [ebp - 0x1ec]
add ecx, 0xa0
call fcn.004308f0
mov ecx, eax
call fcn.004642b0
add eax, 0x28
push eax
lea ecx, [ebp - 0x170]
call fcn.004060f0
lea ecx, [ebp - 0x18c]
call fcn.0045ba80
movzx eax, al
test eax, eax
je 0x47aac3
mov ecx, dword [ebp - 0x1ec]
add ecx, 0x10
push ecx
lea ecx, [ebp - 0x18c]
call fcn.004060f0
mov edx, dword [ebp - 0x1ec]
add edx, 0x10
push edx
lea ecx, [ebp - 0x170]
call fcn.004060f0
lea ecx, [ebp - 0x170]
call fcn.00406190
push eax
lea ecx, [ebp - 0x18c]
call fcn.00406190
push eax
lea eax, [ebp - 0x144]
push eax
mov ecx, dword [ebp - 0x1ec]
add ecx, 0x48
push ecx
lea ecx, [ebp - 0x1c4]
call fcn.00406190
push eax
call fcn.00433470
add esp, 0x14
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1d4]
call fcn.00474690
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00560c61
mov esp, ebp
pop ebp
ret 4