Function at 0x4e70a0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x210
push esi
push edi
mov edi, ecx
push 0x5e8348
push 3
mov eax, dword [edi]
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
add esp, 0xc
push 0x400001cf
push 0
push 0
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov dword [edi + 4], eax
test eax, eax
jne 0x4e70f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0059e577
push eax
push str.OpenInputDesktop_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
jmp 0x4e7283
mov eax, dword [edi]
push ebx
push str.input_desktop_opened_n
push 3
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
push 0x100
lea eax, [esp + 0x28]
push 0
push eax
call fcn.005889a0
add esp, 0x18
lea eax, [esp + 0x14]
push eax
push 0x100
lea eax, [esp + 0x20]
push eax
push 2
push dword [edi + 4]
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4e7159
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0059e577
push eax
push str.GetUserObjectInformation_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
jmp 0x4e716e
mov eax, dword [edi]
lea edx, [esp + 0x18]
push edx
push str.active_desktop_name:__s_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
push dword [edi + 4]
mov dword [edi + 8], eax
call dword [sym.imp.USER32.dll_SetThreadDesktop]
test eax, eax
jne 0x4e71a5
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0059e577
push eax
push str.SetThreadDesktop_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
test eax, eax
je 0x4e7268
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 4
push eax
call dword [sym.imp.USER32.dll_GetUserObjectInformationA]
test eax, eax
jne 0x4e7250
cmp dword [esp + 0xc], eax
je 0x4e7282
push 0x101
push eax
lea eax, [esp + 0x120]
push eax
call fcn.005889a0
add esp, 0xc
mov dword [esp + 0x10], 0x101
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x11c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x4e7236
call ebx
cmp eax, 0x4dd
je 0x4e7282
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0059e577
push eax
push str.GetUserName_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
mov ecx, edi
call fcn.004e72a0
jmp 0x4e7282
mov eax, dword [edi]
lea edx, [esp + 0x118]
push edx
push str.user_name:__s_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
add esp, 0xc
jmp 0x4e7282
call ebx
test eax, eax
je 0x4e7282
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0059e577
push eax
push str.GetUserObjectInformation_failed.__s_n
jmp 0x4e727a
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0059e577
push eax
push str.GetProcessWindowStation_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
pop ebx
mov eax, dword [edi]
push str.ChangeDesktop______n
push 3
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
add esp, 0xc
mov al, 1
pop edi
pop esi
add esp, 0x210
ret