Function at 0x100b62e0
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100d2807
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x10117d48]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.100b4350
mov eax, dword [esi + 0x24]
xor edi, edi
cmp eax, edi
je 0x100b6328
shr eax, 2
and eax, 1
jmp 0x100b65d8
push 0x206
lea ecx, [ebp - 0x216]
xor eax, eax
push edi
push ecx
mov dword [esi + 0x24], 1
mov word [ebp - 0x218], ax
call fcn.10092830
add esp, 0xc
lea edx, [ebp - 0x258]
push edx
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 0x258], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xor ecx, ecx
lea eax, [ebp - 0x218]
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], edi
mov word [ebp - 0x234], cx
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x100b6390
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x234]
call fcn.10008e50
push 0xffffffffffffffff
mov dword [ebp - 4], edi
push 0
lea eax, [ebp - 0x234]
lea edi, [esi + 0x48]
push eax
mov ecx, edi
call fcn.10005230
cmp dword [ebp - 0x220], 8
mov dword [ebp - 4], 0xffffffff
jb 0x100b63e9
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.1008efc3
add esp, 4
push 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x254], esp
push 6
xor edx, edx
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.SYSTEM
mov word [ecx], dx
call fcn.10008e50
push edi
call fcn.100aae00
add esp, 0x24
test eax, eax
je 0x100b646e
push 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x254], esp
push str.LOCAL_SERVICE
call fcn.10023f60
push edi
call fcn.100aae00
add esp, 0x24
test eax, eax
je 0x100b646e
push 1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x254], esp
push str.NETWORK_SERVICE
call fcn.10023f60
push edi
call fcn.100aae00
add esp, 0x24
test eax, eax
jne 0x100b6567
or dword [esi + 0x24], 2
lea eax, [ebp - 0x268]
push eax
call fcn.100b6230
add esp, 4
mov edi, dword [ebp - 0x268]
mov eax, dword [ebp - 0x264]
mov dword [ebp - 4], 1
cmp edi, eax
je 0x100b64a5
cmp dword [edi + 8], 0
je 0x100b64f1
add edi, 0xc
cmp edi, eax
jne 0x100b6498
mov eax, dword [esi + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x100b656b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
push eax
lea ecx, [ebp - 0x234]
push ecx
mov dword [esi + 4], eax
call fcn.100af510
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.100aa4c0
push eax
push str.ImpersonateLoggedOnUser_failed_err:_s
add esi, 8
push esi
call fcn.100abd40
add esp, 0xc
jmp 0x100b653c
mov edx, dword [edi]
lea ecx, [esi + 0x28]
push ecx
push edx
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
jne 0x100b64a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
push eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x234]
push eax
call fcn.100af510
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.100aa4c0
mov ecx, dword [edi]
push eax
push ecx
push str.WTSQueryUserToken_failed_sessionId:_u_err:_s
add esi, 8
push esi
call fcn.100abd40
add esp, 0x10
cmp dword [ebp - 0x220], 8
jb 0x100b6554
mov edx, dword [ebp - 0x234]
push edx
call fcn.1008efc3
add esp, 4
mov eax, dword [ebp - 0x268]
test eax, eax
je 0x100b6567
push eax
call fcn.1008efc3
add esp, 4
xor al, al
jmp 0x100b65d8
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jne 0x100b65bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
push eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x250]
push eax
call fcn.100af510
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.100aa4c0
push eax
push str.RevertToSelf_failed_err:_s
add esi, 8
push esi
call fcn.100abd40
add esp, 0xc
cmp dword [ebp - 0x23c], 8
jb 0x100b6554
mov ecx, dword [ebp - 0x250]
push ecx
jmp 0x100b654c
mov eax, dword [ebp - 0x268]
or dword [esi + 0x24], 4
test eax, eax
je 0x100b65d6
push eax
call fcn.1008efc3
add esp, 4
mov al, 1
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.1008efb4
mov esp, ebp
pop ebp
ret