Function at 0x11167550
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x111e8dfd
mov eax, dword fs:[0]
push eax
sub esp, 0x83c
mov eax, dword [0x11279148]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, ecx
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dword [ebp - 0x81c], ebx
mov dword [ebp - 0x820], esi
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x824], ecx
mov word [esi], dx
call fcn.111babb0
test al, al
je 0x111677f2
lea ecx, [ebp - 0x814]
call fcn.11143200
push 0x20119
push str.SoftwarePoliciesNetSupportclassroom.cloud
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x814]
mov dword [ebp - 4], 0
call fcn.111435f0
push 0
push str.UseTeamsHomeUserUpn
lea ecx, [ebp - 0x814]
call fcn.111436a0
mov edi, dword [sym.imp.MSVCR100.dll_wcscpy_s]
test eax, eax
je 0x111676ad
lea ecx, [ebp - 0x818]
call fcn.11143200
mov eax, dword [ebx]
mov edx, dword [eax + 0x44]
push str.SoftwareMicrosoftOfficeTeams
push 0x20019
mov ecx, ebx
mov byte [ebp - 4], 1
call edx
push eax
lea ecx, [ebp - 0x818]
call fcn.11143c10
lea ecx, [ebp - 0x838]
call fcn.1113dd30
lea eax, [ebp - 0x838]
push eax
push str.HomeUserUpn
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 2
call fcn.11143880
mov edx, dword [ebp - 0x838]
mov eax, dword [edx]
lea ecx, [ebp - 0x838]
call eax
test al, al
jne 0x1116767e
push 0x266
push str.e:_nsmsrc_nsm14101410fctl32NSMString.h
push str.IsA__
call fcn.11067750
add esp, 0xc
mov ecx, dword [ebp - 0x82c]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push esi
call edi
add esp, 0xc
lea ecx, [ebp - 0x838]
mov byte [ebp - 4], 1
call fcn.1113cd80
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 0
call fcn.11143c00
push 0
push str.UseCloudDomainEmail
lea ecx, [ebp - 0x814]
call fcn.111436a0
test eax, eax
je 0x111677e0
lea ecx, [ebp - 0x818]
call fcn.11143200
push 0x20019
push str.SYSTEMCurrentControlSetControlCloudDomainJoinJoinInfo
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 3
call fcn.111435f0
lea ecx, [ebp - 0x848]
call fcn.1113dd30
push 0
lea eax, [ebp - 0x848]
push eax
mov bl, 4
push 0
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], bl
call fcn.11143250
lea ecx, [ebp - 0x838]
call fcn.1113dd30
mov edx, dword [ebp - 0x848]
mov eax, dword [edx]
lea ecx, [ebp - 0x848]
mov byte [ebp - 4], 5
call eax
test al, al
jne 0x11167750
push 0x266
push str.e:_nsmsrc_nsm14101410fctl32NSMString.h
push str.IsA__
call fcn.11067750
add esp, 0xc
mov edx, dword [ebp - 0x83c]
mov eax, dword [ebp - 0x818]
lea ecx, [ebp - 0x838]
push ecx
push str.UserEmail
push edx
push eax
call fcn.11143cd0
mov edx, dword [ebp - 0x838]
mov eax, dword [edx]
add esp, 0x10
lea ecx, [ebp - 0x838]
call eax
test al, al
jne 0x1116779d
push 0x266
push str.e:_nsmsrc_nsm14101410fctl32NSMString.h
push str.IsA__
call fcn.11067750
add esp, 0xc
mov ecx, dword [ebp - 0x82c]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push esi
call edi
add esp, 0xc
lea ecx, [ebp - 0x838]
mov byte [ebp - 4], bl
call fcn.1113cd80
lea ecx, [ebp - 0x848]
mov byte [ebp - 4], 3
call fcn.1113cd80
lea ecx, [ebp - 0x818]
mov byte [ebp - 4], 0
call fcn.11143c00
mov ebx, dword [ebp - 0x81c]
lea ecx, [ebp - 0x814]
mov dword [ebp - 4], 0xffffffff
call fcn.11143c00
mov eax, dword [ebx]
mov edx, dword [eax + 0x90]
push 0
push 0xffffffffffffffff
mov ecx, ebx
call edx
xor eax, eax
mov word [ebp - 0x410], ax
cmp word [esi], ax
jne 0x11167acd
lea ecx, [ebp + 0xc]
push ecx
push esi
push 8
call sub.Secur32.dll_GetUserNameExW
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test al, al
jne 0x1116783f
xor edx, edx
mov word [esi], dx
call ebx
push eax
push str.GetUserNameEx_NameUserPrincipal__ret_false__gle_d_n
call fcn.111bd7b0
add esp, 8
cmp word [esi], 0
jne 0x11167ac7
lea eax, [ebp - 0x814]
push eax
push 1
push 0
mov dword [ebp - 0x814], 0
call sub.NETAPI32.dll_NetWkstaUserGetInfo
test eax, eax
jne 0x11167ab2
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x11167a9d
mov ebx, dword [eax]
mov edi, dword [sym.imp.MSVCR100.dll_wcschr]
mov esi, dword [eax + 4]
push 0x40
push ebx
call edi
add esp, 8
test eax, eax
je 0x111678b6
push 0x2e
push eax
call edi
add esp, 8
test eax, eax
je 0x111678b6
mov ecx, dword [ebp - 0x824]
mov eax, dword [ebp - 0x820]
lea edx, [ecx + ecx]
push edx
push eax
push ebx
call fcn.111b7fd0
add esp, 0xc
test esi, esi
je 0x1116795d
cmp word [esi], 0
je 0x1116795d
lea edx, [ebp - 0x810]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x111678d2
lea edi, [ebp - 0x810]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x111678f0
mov ecx, dword [0x11203288]
mov eax, ebx
mov dword [edi], ecx
mov edx, eax
jmp 0x11167910
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x11167910
lea edi, [ebp - 0x810]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x11167926
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x400
lea edx, [ebp - 0x410]
push edx
lea eax, [ebp - 0x810]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.111b7fd0
add esp, 0xc
mov esi, dword [ebp - 0x820]
mov eax, dword [ebp - 0x814]
test eax, eax
je 0x11167973
push eax
call sub.NETAPI32.dll_NetApiBufferFree
mov ebx, dword [ebp - 0x81c]
cmp word [ebp - 0x410], 0
jne 0x111679ac
lea eax, [ebp - 0x824]
push eax
lea ecx, [ebp - 0x410]
push ecx
push 2
mov dword [ebp - 0x824], 0x400
call sub.Secur32.dll_GetUserNameExW
cmp word [ebp - 0x410], 0
je 0x111679c9
lea edx, [ebp - 0x410]
push 0
push edx
call fcn.111b7990
mov ecx, dword [ebp - 0x828]
add esp, 8
mov dword [ecx + 0x588], eax
call fcn.111babb0
test al, al
je 0x11167a5a
cmp dword [0x1127acfc], 0
jne 0x11167a5a
lea ecx, [ebp - 0x848]
call fcn.1113dd30
lea edx, [ebp - 0x848]
push edx
mov dword [ebp - 4], 6
call fcn.111668a0
mov eax, dword [ebp - 0x848]
mov edx, dword [eax]
add esp, 4
lea ecx, [ebp - 0x848]
call edx
test al, al
jne 0x11167a2b
push 0x266
push str.e:_nsmsrc_nsm14101410fctl32NSMString.h
push str.IsA__
call fcn.11067750
add esp, 0xc
mov eax, dword [ebp - 0x83c]
push 0
push eax
call fcn.111b7990
mov ecx, dword [ebp - 0x828]
mov dword [ecx + 0x58c], eax
add esp, 8
lea ecx, [ebp - 0x848]
mov dword [ebp - 4], 0xffffffff
call fcn.1113cd80
mov edx, dword [ebx]
mov eax, dword [edx + 0x90]
push 0
push 0
mov ecx, ebx
call eax
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x11167a70
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.111d9022
mov esp, ebp
pop ebp
ret 8
call ebx
push eax
push str.Error._NetWkstaUserGetInfo_ret_null_bufptr__gle_d_n
call fcn.111bd7b0
add esp, 8
jmp 0x11167963
call ebx
push eax
push str.NetWkstaUserGetInfo_failed__gle_d_n
call fcn.111bd7b0
add esp, 8
jmp 0x11167963
mov ebx, dword [ebp - 0x81c]
mov ecx, dword [0x1128075c]
mov edx, dword fs:[0x2c]
mov eax, dword [edx + ecx*4]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.11107440
add esp, 4
test eax, eax
je 0x11167979
xor edx, edx
push str.GetUserNameEx_NameUserPrincipal__impersonation_error_n
mov word [esi], dx
call fcn.111bd7b0
add esp, 4
jmp 0x11167979