Function at 0x10037790
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100f1dd7
mov eax, dword fs:[0]
push eax
sub esp, 0x8c4
mov eax, dword [0x1012d034]
xor eax, esp
mov dword [esp + 0x8bc], eax
push esi
push edi
mov eax, dword [0x1012d034]
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.10033e80
add esp, 8
xor eax, eax
mov dword [esp + 0x8d8], 0
push eax
push 0x10105e00
lea ecx, [esp + 0x4c]
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], 0
mov word [esp + 0x4c], ax
call fcn.10001e10
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 0x10105e04
call fcn.10001e10
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 0x100378d1
cmp word [esp + 0xc4], 0
jne 0x1003789f
xor ecx, ecx
jmp 0x100378bf
lea ecx, [esp + 0xc4]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100378b0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0xc8]
push eax
lea ecx, [esp + 0x4c]
call fcn.10001e10
mov eax, dword [ebp + 0x14]
or esi, 0xffffffff
cmp eax, 0x80000000
je 0x10037913
cmp eax, 1
je 0x100378ff
cmp eax, 0x40000000
jne 0x10037928
push str.The_application_is_forced_to_shut_down
lea ecx, [esp + 0x2c]
call fcn.10003640
mov esi, 1
jmp 0x10037928
push 0x27
push str.The_application_is_shut_down_or_restart
lea ecx, [esp + 0x30]
call fcn.10001e10
xor esi, esi
jmp 0x10037928
push 0x17
push str.The_user_is_logging_off
lea ecx, [esp + 0x30]
call fcn.10001e10
mov esi, 2
lea ecx, [esp + 0x74]
call fcn.1002c410
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.10001a70
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x9c]
call fcn.10001a70
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0xb4]
call fcn.10001a70
lea eax, [esp + 0x74]
push eax
lea ecx, [edi + 8]
call fcn.10037c40
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x78]
call fcn.100374f0
mov byte [esp + 0x8d8], 4
cmp dword [eax + 0x14], 8
jb 0x100379aa
mov eax, dword [eax]
push eax
push 1
push 0x63
push 0x10105ed8
push str.CSystemNotify::OnQueryEndSession
call fcn.100e1770
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 0x100379df
push dword [esp + 0x10]
call esi
add esp, 4
mov eax, dword [edi]
test eax, eax
je 0x100379ef
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 0x10037a0a
lea ecx, [esp + 0x74]
call fcn.10037aa0
lea ecx, [esp + 0x74]
call fcn.10018170
cmp dword [esp + 0x3c], 8
jb 0x10037a23
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 0x10037a4a
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 0x10037a71
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.100ebd7b
mov esp, ebp
pop ebp
ret 0x10