Function at 0x40225b
Capabilities:
Get session information
Get session user name
Print debug messages

Disassembly:
push 0x40
mov eax, 0x428802
call fcn.00416f86
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
xor eax, eax
mov byte [ebp - 0x24], bl
lea edi, [ebp - 0x23]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0xe
push edi
mov esi, ecx
push ebx
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x4022f9
cmp edi, ebx
mov eax, dword [ebp - 0x2c]
je 0x4022de
cmp edi, 0x10000
je 0x4022de
movzx ecx, byte [eax + 9]
push ecx
movzx ecx, byte [eax + 8]
push ecx
movzx ecx, byte [eax + 7]
movzx eax, byte [eax + 6]
push ecx
push eax
push str._d._d._d._d
lea eax, [ebp - 0x24]
push 0x10
push eax
call fcn.00413df1
add esp, 0x1c
jmp 0x4022f1
push str.0.0.0.0
lea eax, [ebp - 0x24]
push 0x10
push eax
call fcn.00413df1
add esp, 0xc
push dword [ebp - 0x2c]
call sub.WTSAPI32.dll_WTSFreeMemory
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0xf
push edi
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x402316
push dword [ebp - 0x2c]
call sub.WTSAPI32.dll_WTSFreeMemory
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0x10
push edi
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x402344
push 2
push dword [ebp - 0x2c]
lea eax, [ebp - 0x44]
push eax
call fcn.00413e60
add esp, 0xc
push dword [ebp - 0x2c]
call sub.WTSAPI32.dll_WTSFreeMemory
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x40]
push eax
push 0xa
push edi
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
push eax
push 7
push edi
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x3c]
push eax
push 5
push edi
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
push 6
push edi
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [ebp - 4], ebx
push dword [ebp - 0x40]
xor edi, edi
inc edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x4c], edi
call fcn.00408bec
lea eax, [ebp - 0x28]
mov dword [ebp - 4], edi
push eax
mov edi, esi
call fcn.00404a04
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.00407a4b
push dword [ebp - 0x38]
lea ecx, [ebp - 0x28]
call fcn.00408bec
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 4], 2
call fcn.00404a04
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.00407a4b
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x28]
call fcn.00408bec
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 4], 3
call fcn.00404a04
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.00407a4b
push dword [ebp - 0x34]
lea ecx, [ebp - 0x28]
call fcn.00408bec
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 4], 4
call fcn.00404a04
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.00407a4b
push dword [ebp - 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x3c]
call esi
push dword [ebp - 0x34]
call esi
cmp dword [ebp - 0x40], ebx
je 0x402460
push dword [ebp - 0x40]
call sub.WTSAPI32.dll_WTSFreeMemory
cmp dword [ebp - 0x38], ebx
je 0x40246d
push dword [ebp - 0x38]
call sub.WTSAPI32.dll_WTSFreeMemory
cmp dword [ebp - 0x3c], ebx
je 0x40247a
push dword [ebp - 0x3c]
call sub.WTSAPI32.dll_WTSFreeMemory
cmp dword [ebp - 0x34], ebx
je 0x402487
push dword [ebp - 0x34]
call sub.WTSAPI32.dll_WTSFreeMemory
mov eax, dword [ebp - 0x48]
call fcn.00417009
ret 4