Function at 0x1004b780
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1011ec97
mov eax, dword fs:[0]
push eax
sub esp, 0x8c4
mov eax, dword [0x10165034]
xor eax, esp
mov dword [esp + 0x8bc], eax
push esi
push edi
mov eax, dword [0x10165034]
xor eax, esp
push eax
lea eax, [esp + 0x8d0]
mov dword fs:[0], eax
mov edi, ecx
push 0
call dword [sym.imp.MSVCR120.dll__time64]
add esp, 4
lea ecx, [esp + 0x5c]
push edx
push eax
call fcn.100476b0
add esp, 8
xor eax, eax
mov dword [esp + 0x8d8], 0
push eax
push 0x10138e38
lea ecx, [esp + 0x4c]
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], ax
call fcn.10002100
xor eax, eax
mov byte [esp + 0x8d8], 1
push 0x7fe
push eax
mov word [esp + 0xcc], ax
lea eax, [esp + 0xce]
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [esp + 0x40], 0x400
xor eax, eax
mov dword [esp + 0x3c], 7
lea ecx, [esp + 0x28]
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
push eax
push 0x10138e3c
call fcn.10002100
lea eax, [esp + 0x40]
mov byte [esp + 0x8d8], 2
push eax
lea eax, [esp + 0xc8]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x1004b8c1
cmp word [esp + 0xc4], 0
jne 0x1004b88f
xor ecx, ecx
jmp 0x1004b8af
lea ecx, [esp + 0xc4]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004b8a0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0xc8]
push eax
lea ecx, [esp + 0x4c]
call fcn.10002100
mov eax, dword [ebp + 0x14]
or esi, 0xffffffff
cmp eax, 0x80000000
je 0x1004b903
cmp eax, 1
je 0x1004b8ef
cmp eax, 0x40000000
jne 0x1004b918
push str.The_application_is_forced_to_shut_down
lea ecx, [esp + 0x2c]
call fcn.10003960
mov esi, 1
jmp 0x1004b918
push 0x27
push str.The_application_is_shut_down_or_restart
lea ecx, [esp + 0x30]
call fcn.10002100
xor esi, esi
jmp 0x1004b918
push 0x17
push str.The_user_is_logging_off
lea ecx, [esp + 0x30]
call fcn.10002100
mov esi, 2
lea ecx, [esp + 0x74]
call fcn.100306a0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x4c]
mov byte [esp + 0x8e0], 3
push eax
lea ecx, [esp + 0x84]
mov dword [esp + 0x80], esi
call fcn.10001d60
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x9c]
call fcn.10001d60
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0xb4]
call fcn.10001d60
lea eax, [esp + 0x74]
push eax
lea ecx, [edi + 8]
call fcn.1004bbe0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x78]
call fcn.1004b4e0
mov byte [esp + 0x8d8], 4
cmp dword [eax + 0x14], 8
jb 0x1004b99a
mov eax, dword [eax]
push eax
push 1
push 0x63
push 0x10138f10
push str.CSystemNotify::OnQueryEndSession
call fcn.1010dc80
mov byte [esp + 0x8ec], 3
add esp, 0x14
cmp dword [esp + 0x24], 8
mov esi, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
jb 0x1004b9cf
push dword [esp + 0x10]
call esi
add esp, 4
mov eax, dword [edi]
test eax, eax
je 0x1004b9df
push dword [edi + 4]
lea ecx, [esp + 0x78]
push ecx
call eax
call dword [sym.imp.NetCommHelper.dll_public:_static_class_CNetManager____cdecl_CNetManager::GetInstance_void_]
mov ecx, eax
call dword [sym.imp.NetCommHelper.dll_public:_bool___thiscall_CNetManager::IsConnected_void_]
test al, al
je 0x1004b9fa
lea ecx, [esp + 0x74]
call fcn.1004ba90
lea ecx, [esp + 0x74]
call fcn.1001a060
cmp dword [esp + 0x3c], 8
jb 0x1004ba13
push dword [esp + 0x28]
call esi
add esp, 4
xor eax, eax
mov dword [esp + 0x3c], 7
cmp dword [esp + 0x58], 8
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
jb 0x1004ba3a
push dword [esp + 0x44]
call esi
add esp, 4
xor eax, eax
mov dword [esp + 0x58], 7
cmp dword [esp + 0x70], 8
mov dword [esp + 0x54], 0
mov word [esp + 0x44], ax
jb 0x1004ba61
push dword [esp + 0x5c]
call esi
add esp, 4
mov ecx, dword [esp + 0x8d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x8bc]
xor ecx, esp
call fcn.101176fb
mov esp, ebp
pop ebp
ret 0x10