Function at 0x1009b820
Capabilities:
Get session user name

Disassembly:
push 0xffffffffffffffff
push 0x100b0f9f
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x100d3020]
xor eax, esp
mov dword [esp + 0x23c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100d3020]
xor eax, esp
push eax
lea eax, [esp + 0x254]
mov dword fs:[0], eax
mov eax, dword [esp + 0x264]
xor ebp, ebp
mov dword [esp + 0x1c], ebp
test byte [0x100d5e64], 1
mov edi, ecx
mov dword [esp + 0x20], eax
jne 0x1009b8a2
or dword [0x100d5e64], 1
push 0x100b5e40
mov dword [0x100d5e60], 7
mov dword [0x100d5e5c], ebp
mov word [0x100d5e4c], bp
call fcn.100a467e
add esp, 4
mov ebx, 2
test byte [0x100d5e64], bl
jne 0x1009b8df
or dword [0x100d5e64], ebx
push 0x18
mov dword [esp + 0x260], ebp
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
push eax
mov dword [0x100d5e44], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100b5e10
call fcn.100a467e
add esp, 4
mov eax, dword [0x100d5e44]
cmp eax, ebp
mov dword [esp + 0x24], 0x100d5e44
je 0x1009b8f7
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x25c], 1
cmp dword [0x100d5e5c], ebp
jne 0x1009ba51
mov dword [esp + 0x14], ebp
lea esi, [esp + 0x14]
mov byte [esp + 0x25c], bl
call fcn.100a2840
push 0x208
lea ecx, [esp + 0x4a]
push ebp
push ecx
mov word [esp + 0x50], bp
call sub.MSVCR80.dll_memset
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x24], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea ecx, [esp + 0x18]
push ecx
mov word [esp + 0x250], bp
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
lea eax, [esp + 0x44]
lea edx, [eax + 2]
je 0x1009b9f5
jmp 0x1009b980
mov cx, word [eax]
add eax, ebx
cmp cx, bp
jne 0x1009b980
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x48]
push edx
mov esi, 0x100d5e48
call fcn.10002660
cmp dword [0x100d5e5c], ebp
je 0x1009b9b4
push 1
push 0x100b6da4
mov ecx, esi
call fcn.10023f10
mov eax, dword [esp + 0x18]
lea esi, [esp + 0x28]
call fcn.1007f4d0
push ebp
push eax
or eax, 0xffffffff
mov esi, 0x100d5e48
mov byte [esp + 0x264], 3
call fcn.1000c260
mov byte [esp + 0x25c], bl
cmp dword [esp + 0x40], 8
jb 0x1009ba1b
mov eax, dword [esp + 0x2c]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x1009ba1b
mov cx, word [eax]
add eax, ebx
cmp cx, bp
jne 0x1009b9f5
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x48]
push ecx
mov esi, 0x100d5e48
call fcn.10002660
cmp dword [0x100d5e5c], ebp
je 0x1009ba2c
push 1
push 0x100b6da4
mov ecx, 0x100d5e48
call fcn.10023f10
lea esi, [esp + 0x14]
call fcn.100a28f0
mov byte [esp + 0x25c], 1
call fcn.100a28f0
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x1009ba51
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x20]
push edx
push 0x100d5e48
call fcn.1000bfc0
mov eax, dword [0x100d5e44]
add esp, 8
cmp eax, ebp
je 0x1009ba73
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov ecx, dword [esp + 0x254]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x23c]
xor ecx, esp
call fcn.100a4489
add esp, 0x24c
ret