Function at 0x410d90
Capabilities:
Get session user name

Disassembly:
sub esp, 0x210
push esi
push edi
mov edi, ecx
push 0x48cff8
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 0x410de5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0046ad45
push eax
push str.OpenInputDesktop_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
jmp 0x410f73
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.00457250
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 0x410e49
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0046ad45
push eax
push str.GetUserObjectInformation_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
jmp 0x410e5e
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 0x410e95
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0046ad45
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 0x410f58
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 0x410f40
cmp dword [esp + 0xc], eax
je 0x410f72
push 0x101
push eax
lea eax, [esp + 0x120]
push eax
call fcn.00457250
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 0x410f26
call ebx
cmp eax, 0x4dd
je 0x410f72
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0046ad45
push eax
push str.GetUserName_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
mov ecx, edi
call fcn.00410f90
jmp 0x410f72
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 0x410f72
call ebx
test eax, eax
je 0x410f72
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0046ad45
push eax
push str.GetUserObjectInformation_failed.__s_n
jmp 0x410f6a
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0046ad45
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