Function at 0x411d30
Capabilities:
Get session user name

Disassembly:
sub esp, 0x210
push esi
push edi
mov edi, ecx
push 0x47fec8
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 0x411d85
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0045ea98
push eax
push str.OpenInputDesktop_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
jmp 0x411f13
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.0044c670
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 0x411de9
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0045ea98
push eax
push str.GetUserObjectInformation_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
jmp 0x411dfe
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 0x411e35
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0045ea98
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 0x411ef8
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 0x411ee0
cmp dword [esp + 0xc], eax
je 0x411f12
push 0x101
push eax
lea eax, [esp + 0x120]
push eax
call fcn.0044c670
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 0x411ec6
call ebx
cmp eax, 0x4dd
je 0x411f12
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0045ea98
push eax
push str.GetUserName_failed.__s_n
push dword [edi]
call dword [esi + 0x18]
add esp, 0x10
mov ecx, edi
call fcn.00411f30
jmp 0x411f12
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 0x411f12
call ebx
test eax, eax
je 0x411f12
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0045ea98
push eax
push str.GetUserObjectInformation_failed.__s_n
jmp 0x411f0a
call ebx
mov ecx, dword [edi]
push eax
mov esi, dword [ecx]
call fcn.0045ea98
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