Function at 0x41ace0
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bc37d
mov eax, dword fs:[0]
push eax
sub esp, 0x4b0
mov eax, dword [0x4f4164]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x49c], edi
mov dword [ebp - 0x484], 0
cmp dword [0x4f40a4], 0
mov dword [ebp - 0x4a0], edi
jne 0x41b153
push 0x224
lea eax, [ebp - 0x248]
push 0
push eax
call fcn.00495790
mov eax, dword [0x4cb1b8]
movups xmm0, xmmword [str.bd::OBK::]
push 0x238
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x480]
push 0
push eax
mov dword [ebp - 0x498], 0x112
movups xmmword [ebp - 0x24], xmm0
call fcn.00495790
add esp, 0x18
lea eax, [ebp - 0x498]
push eax
lea eax, [ebp - 0x248]
push eax
push 2
call sub.Secur32.dll_GetUserNameExW
test al, al
mov eax, dword [0x4f8ee0]
je 0x41b0ac
add eax, dword [0x4f8edc]
je 0x41ae27
mov dword [ebp - 0x4a4], 0
call fcn.0040ba10
mov dword [ebp - 0x4a8], eax
lock inc dword [ebp - 0x4a4]
cmp dword [ebp - 0x4a8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x484], 1
jne 0x41adef
call fcn.0040ba10
mov dword [ebp - 0x4a8], eax
lock inc dword [ebp - 0x4a4]
mov eax, dword [ebp - 0x4a8]
lea ecx, [ebp - 0x248]
push ecx
push str.GetUserNameExW_ok_error_szUserName_1__s
push str.desktops::GetOBKDesktopName
push 0x400000
lea ecx, [ebp - 0x4b4]
mov dword [ebp - 0x4b4], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
mov eax, dword [ebp - 0x484]
mov dword [ebp - 4], 0xffffffff
test al, 1
je 0x41ae4c
and eax, 0xfffffffe
lea ecx, [ebp - 0x4a8]
mov dword [ebp - 0x484], eax
call fcn.0040b3c0
lea ecx, [ebp - 0x248]
xor edx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41ae57
sub ecx, esi
sar ecx, 1
je 0x41aea9
mov edi, 0x2e
nop dword [eax]
cmp word [ebp + edx*2 - 0x248], 0x5c
jne 0x41ae83
mov word [ebp + edx*2 - 0x248], di
lea eax, [ebp - 0x248]
inc edx
lea esi, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41ae90
sub eax, esi
sar eax, 1
cmp edx, eax
jb 0x41ae70
mov edi, dword [ebp - 0x4a0]
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x41af37
mov dword [ebp - 0x488], 0
call fcn.0040ba10
mov dword [ebp - 0x48c], eax
lock inc dword [ebp - 0x488]
or dword [ebp - 0x484], 2
cmp dword [ebp - 0x48c], 0
mov dword [ebp - 4], 1
jne 0x41aeff
call fcn.0040ba10
mov dword [ebp - 0x48c], eax
lock inc dword [ebp - 0x488]
mov eax, dword [ebp - 0x48c]
lea ecx, [ebp - 0x248]
push ecx
push str.GetUserNameExW_ok_error_szUserName_2__s
push str.desktops::GetOBKDesktopName
push 0x400000
lea ecx, [ebp - 0x4a0]
mov dword [ebp - 0x4a0], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
mov eax, dword [ebp - 0x484]
mov dword [ebp - 4], 0xffffffff
test al, 2
je 0x41af81
and eax, 0xfffffffd
mov dword [ebp - 0x484], eax
or eax, 0xffffffff
mov dword [ebp - 0x48c], 0
lock xadd dword [ebp - 0x488], eax
js 0x41af7a
call fcn.0040dfb0
or eax, 0xffffffff
lock xadd dword [ebp - 0x488], eax
jns 0x41af68
lock inc dword [ebp - 0x488]
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x4cb2a4
lea eax, [ebp - 0x480]
push 0x11c
push eax
call fcn.00412b00
mov eax, dword [0x4f8ee0]
add esp, 0x14
add eax, dword [0x4f8edc]
je 0x41b033
mov dword [ebp - 0x490], 0
call fcn.0040ba10
mov dword [ebp - 0x494], eax
lock inc dword [ebp - 0x490]
or dword [ebp - 0x484], 4
cmp dword [ebp - 0x494], 0
mov dword [ebp - 4], 2
jne 0x41affb
call fcn.0040ba10
mov dword [ebp - 0x494], eax
lock inc dword [ebp - 0x490]
mov eax, dword [ebp - 0x494]
lea ecx, [ebp - 0x480]
push ecx
push str.szDesktopName_s
push str.desktops::GetOBKDesktopName
push 0x400000
lea ecx, [ebp - 0x4b8]
mov dword [ebp - 0x4b8], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
mov eax, dword [ebp - 0x484]
mov dword [ebp - 4], 0xffffffff
test al, 4
je 0x41b07d
and eax, 0xfffffffb
mov dword [ebp - 0x484], eax
or eax, 0xffffffff
mov dword [ebp - 0x494], 0
lock xadd dword [ebp - 0x490], eax
js 0x41b076
call fcn.0040dfb0
or eax, 0xffffffff
lock xadd dword [ebp - 0x490], eax
jns 0x41b064
lock inc dword [ebp - 0x490]
lea ecx, [ebp - 0x480]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41b086
sub ecx, edx
lea eax, [ebp - 0x480]
sar ecx, 1
push ecx
push eax
mov ecx, 0x4f4094
call fcn.004038a0
jmp 0x41b153
add eax, dword [0x4f8edc]
je 0x41b138
mov dword [ebp - 0x4ac], 0
call fcn.0040ba10
mov dword [ebp - 0x4b0], eax
lock inc dword [ebp - 0x4ac]
cmp dword [ebp - 0x4b0], 0
mov dword [ebp - 4], 3
mov dword [ebp - 0x484], 8
jne 0x41b100
call fcn.0040ba10
mov dword [ebp - 0x4b0], eax
lock inc dword [ebp - 0x4ac]
mov esi, dword [ebp - 0x4b0]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetUserNameExW_failed_error__ld
push str.desktops::GetOBKDesktopName
push 0x400000
lea eax, [ebp - 0x49c]
mov dword [ebp - 0x49c], 0x20
push eax
push 0
push esi
call fcn.0040df80
add esp, 0x1c
test byte [ebp - 0x484], 8
mov dword [ebp - 4], 0xffffffff
je 0x41b153
lea ecx, [ebp - 0x4b0]
call fcn.0040b3c0
mov dword [edi], 0
mov eax, 0x4f4094
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
cmp dword [0x4f40a8], 8
mov ecx, dword [0x4f40a4]
cmovae eax, dword [0x4f4094]
mov dword [ebp - 0x498], ecx
mov dword [ebp - 0x49c], eax
cmp ecx, 8
jae 0x41b19e
movups xmm0, xmmword [eax]
mov esi, 7
movups xmmword [edi], xmm0
jmp 0x41b1df
mov esi, ecx
mov eax, SysReAllocString
or esi, 7
mov ecx, edi
cmp esi, eax
cmova esi, eax
lea eax, [esi + 1]
push eax
call fcn.00403d40
mov ecx, eax
mov eax, dword [ebp - 0x498]
mov dword [edi], ecx
lea eax, [eax*2 + 2]
push eax
push dword [ebp - 0x49c]
push ecx
call fcn.00495210
mov ecx, dword [ebp - 0x498]
add esp, 0xc
mov dword [edi + 0x10], ecx
mov eax, edi
mov dword [edi + 0x14], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00450df0
mov esp, ebp
pop ebp
ret