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

Disassembly:
push 0xffffffffffffffff
push 0x48a977
mov eax, dword fs:[0]
push eax
mov eax, 0x22bc
call fcn.00480ea0
mov eax, dword [0x4b1784]
xor eax, esp
mov dword [esp + 0x22b8], eax
push ebp
push esi
push edi
mov eax, dword [0x4b1784]
xor eax, esp
push eax
lea eax, [esp + 0x22cc]
mov dword fs:[0], eax
xor ebp, ebp
mov dword [esp + 0x1c], ebp
test byte [0x4bf330], 1
lea edi, [ebp + 7]
jne 0x404a67
or dword [0x4bf330], 1
push 0x48de40
mov dword [0x4bf32c], edi
mov dword [0x4bf328], ebp
mov word [0x4bf318], bp
call fcn.0046928a
add esp, 4
cmp dword [0x4bf328], ebp
jne 0x404d32
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x14]
push ecx
push eax
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x404d32
mov dword [esp + 0x10], ebp
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebp
mov word [esp + 0x84], bp
mov dword [esp + 0x22d4], ebp
mov dword [esp + 0x7c], edi
mov dword [esp + 0x78], ebp
mov word [esp + 0x68], bp
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x14]
push eax
mov byte [esp + 0x22dc], 1
mov ecx, dword [esp + 0x1c]
push 5
push ecx
push ebp
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, ebp
je 0x404cd3
mov edx, dword [esp + 0x10]
cmp edx, ebp
je 0x404cd3
lea eax, [esp + 0x80]
push eax
call fcn.00409f70
mov ecx, dword [esp + 0x10]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push ebp
mov dword [esp + 0x24], ebp
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
cmp eax, ebp
je 0x404cb1
mov edx, dword [esp + 0x10]
cmp edx, ebp
je 0x404cb1
lea eax, [esp + 0x64]
push eax
call fcn.00409f70
mov ecx, dword [esp + 0x10]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb0], ebp
mov word [esp + 0xa0], bp
lea edx, [esp + 0x64]
push edx
lea esi, [esp + 0x4c]
mov byte [esp + 0x22d8], 2
call fcn.00410b60
lea ecx, [esp + 0x84]
push ecx
push eax
lea edi, [esp + 0x38]
mov byte [esp + 0x22e0], 3
call fcn.00410c20
add esp, 0xc
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0xa4]
mov byte [esp + 0x22dc], 4
call fcn.0040c2f0
mov esi, edi
call fcn.00409f40
lea esi, [esp + 0x48]
mov byte [esp + 0x22d4], 2
call fcn.00409f40
push 0x2002
lea edx, [esp + 0x2ca]
push ebp
push edx
mov word [esp + 0x2d0], bp
call fcn.0046ea20
push 0x20a
lea eax, [esp + 0xca]
push ebp
push eax
mov word [esp + 0xd0], bp
call fcn.0046ea20
mov eax, dword [esp + 0xb8]
add esp, 0x18
cmp dword [esp + 0xb4], 8
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x20], 0x105
jae 0x404c24
lea eax, [esp + 0xa0]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0xc0]
push ecx
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x2d4]
push ecx
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, ebp
je 0x404c7b
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c8]
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov edx, dword [esp + 0x18]
push 0x4bf314
call fcn.00409f70
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea esi, [esp + 0x9c]
call fcn.00409f40
lea esi, [esp + 0x64]
call fcn.00409f40
lea esi, [esp + 0x80]
mov dword [esp + 0x22d4], 0xffffffff
call fcn.00409f40
mov edi, 7
jmp 0x404d32
lea esi, [esp + 0x64]
call fcn.00409f40
lea esi, [esp + 0x80]
mov dword [esp + 0x22d4], 0xffffffff
call fcn.00409f40
jmp 0x404d32
mov esi, 8
cmp dword [esp + 0x7c], esi
jb 0x404ceb
mov edx, dword [esp + 0x68]
push edx
call fcn.00469050
add esp, 4
mov dword [esp + 0x22d4], 0xffffffff
cmp dword [esp + 0x98], esi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x78], ebp
mov word [esp + 0x68], bp
jb 0x404d1c
mov eax, dword [esp + 0x84]
push eax
call fcn.00469050
add esp, 4
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebp
mov word [esp + 0x84], bp
push 0xffffffffffffffff
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x14], ebp
push ebp
mov eax, 0x4bf314
mov ecx, ebx
mov word [ebx + 4], bp
call fcn.0040c2f0
mov eax, ebx
mov ecx, dword [esp + 0x22cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x22b8]
xor ecx, esp
call fcn.00469efd
add esp, 0x22c8
ret