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

Disassembly:
push 0xffffffffffffffff
push 0x5a7322
mov eax, dword fs:[0]
push eax
mov eax, 0x22dc
call fcn.00595100
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x22d8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x22f0]
mov dword fs:[0], eax
xor ebp, ebp
mov dword [esp + 0x20], ebp
mov edi, ecx
mov ebx, 7
mov dword [esp + 0x1c], edi
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], ebp
mov word [esp + 0x70], bp
mov dword [esp + 0x22f8], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x4730c2
mov dword [esp + 0x14], ebp
mov dword [esp + 0xa0], ebx
mov dword [esp + 0x9c], ebp
mov word [esp + 0x8c], bp
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xb8], ebp
mov word [esp + 0xa8], bp
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x2300], 2
mov ecx, dword [esp + 0x20]
push 5
push ecx
push ebp
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x473037
mov edx, dword [esp + 0x14]
cmp edx, ebp
je 0x473037
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x472e30
sub eax, esi
sar eax, 1
push eax
push edx
lea esi, [esp + 0x90]
call fcn.0040bce0
mov edx, dword [esp + 0x14]
push edx
call sub.WTSAPI32.dll_WTSFreeMemory
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
push ecx
push ebx
push edx
push ebp
mov dword [esp + 0x28], ebp
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, ebp
je 0x47301d
mov edx, dword [esp + 0x14]
cmp edx, ebp
je 0x47301d
lea eax, [esp + 0xa4]
push eax
call fcn.0040fd00
mov ecx, dword [esp + 0x14]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xd4], ebp
mov word [esp + 0xc4], bp
lea edx, [esp + 0xa4]
push edx
mov ebx, 0x5bd0e8
lea esi, [esp + 0x38]
mov byte [esp + 0x22fc], 3
call fcn.0040fa50
lea ecx, [esp + 0x8c]
push ecx
push eax
lea edi, [esp + 0x5c]
mov byte [esp + 0x2304], 4
call fcn.0040c440
add esp, 0xc
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0xc8]
mov byte [esp + 0x2300], 5
call fcn.0040b6f0
mov esi, edi
call fcn.004385c0
lea esi, [esp + 0x34]
mov byte [esp + 0x22f8], 3
call fcn.004385c0
push 0x2002
lea edx, [esp + 0x2ee]
push ebp
push edx
mov word [esp + 0x2f4], bp
call fcn.00580260
push 0x20a
lea eax, [esp + 0xee]
push ebp
push eax
mov word [esp + 0xf4], bp
call fcn.00580260
mov eax, dword [esp + 0xdc]
add esp, 0x18
cmp dword [esp + 0xd8], 8
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x2c], 0x105
jae 0x472f7d
lea eax, [esp + 0xc4]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0xe4]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x2f8]
push ecx
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x473016
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x2ec]
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x6c]
push ecx
call fcn.0040fd00
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [esp + 0x6c]
push eax
mov edi, dword [esp + 0x20]
mov esi, edi
call fcn.0040b280
lea esi, [esp + 0xc0]
call fcn.004385c0
lea esi, [esp + 0xa4]
call fcn.004385c0
lea esi, [esp + 0x88]
call fcn.004385c0
lea esi, [esp + 0x6c]
call fcn.004385c0
jmp 0x4730f1
lea ecx, [esp + 0x6c]
push ecx
jmp 0x472fd9
push 0xffffffffffffffff
mov dword [edi + 0x18], ebx
mov dword [edi + 0x14], ebp
push ebp
lea eax, [esp + 0x74]
mov ecx, edi
mov word [edi + 4], bp
call fcn.0040b6f0
jmp 0x472ff0
push 0xffffffffffffffff
mov dword [edi + 0x18], ebx
mov dword [edi + 0x14], ebp
push ebp
lea eax, [esp + 0x74]
mov ecx, edi
mov word [edi + 4], bp
call fcn.0040b6f0
mov esi, 8
cmp dword [esp + 0xbc], esi
jb 0x47306d
mov edx, dword [esp + 0xa8]
push edx
call fcn.00578327
add esp, 4
cmp dword [esp + 0xa0], esi
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xb8], ebp
mov word [esp + 0xa8], bp
jb 0x47309c
mov eax, dword [esp + 0x8c]
push eax
call fcn.00578327
add esp, 4
cmp dword [esp + 0x84], esi
mov dword [esp + 0xa0], ebx
mov dword [esp + 0x9c], ebp
mov word [esp + 0x8c], bp
jb 0x4730f1
mov ecx, dword [esp + 0x70]
push ecx
jmp 0x4730e9
push 0xffffffffffffffff
mov dword [edi + 0x18], ebx
mov dword [edi + 0x14], ebp
push ebp
lea eax, [esp + 0x74]
mov ecx, edi
mov word [edi + 4], bp
call fcn.0040b6f0
cmp dword [esp + 0x84], 8
jb 0x4730f1
mov edx, dword [esp + 0x70]
push edx
call fcn.00578327
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x22f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x22d8]
xor ecx, esp
call fcn.005787fd
add esp, 0x22e8
ret