Function at 0x140001580
Capabilities:
Get inbound credentials handle via credssp
Get session user name

Disassembly:
sub rsp, 0x518
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x500], rax
mov dword [rsp + 0x98], 0
mov dword [rsp + 0x8c], 0
mov dword [rsp + 0x88], 1
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x60], 0
mov r8d, 5
lea rdx, [0x140019360]
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x100]
call sub.Secur32.dll_QuerySecurityPackageInfoA
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
jge 0x140001627
lea rcx, str.Could_not_query_package
call fcn.140002210
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 8]
mov dword [rsp + 0x64], eax
mov rcx, qword [rsp + 0xb0]
call sub.Secur32.dll_FreeContextBuffer
mov eax, dword [rsp + 0x64]
mov ecx, eax
call fcn.140006948
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x64]
mov ecx, eax
call fcn.140006948
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x78], 0
je 0x140001673
cmp qword [rsp + 0x58], 0
jne 0x14000167f
lea rcx, str.Memory_allocation
call fcn.140002210
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 1
lea rdx, [rsp + 0x100]
xor ecx, ecx
call sub.Secur32.dll_AcquireCredentialsHandleA
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
jge 0x1400016e3
lea rcx, [0x140019398]
call fcn.140002210
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x30], rax
lea rax, [0x1400193ac]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov r8, qword [rsp + 0x58]
xor edx, edx
xor ecx, ecx
call fcn.1400011b0
test eax, eax
jne 0x140001741
lea rcx, str.Cantt_generate_client_context
call fcn.140002210
mov eax, 1
imul rax, rax, 8
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov r8d, dword [rsp + 0x50]
mov edx, eax
lea rcx, [0x1400193d8]
call fcn.140001e60
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
call fcn.140001ec0
mov eax, dword [rsp + 0x50]
mov r8d, eax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x78]
call fcn.1400177a0
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov edx, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x78]
call section..text
test eax, eax
jne 0x1400017f4
lea rcx, str.GenServerContext_failed
call fcn.140002210
mov dword [rsp + 0x88], 0
mov eax, 1
imul rax, rax, 8
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov r8d, dword [rsp + 0x50]
mov edx, eax
lea rcx, [0x140019410]
call fcn.140001e60
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
call fcn.140001ec0
mov eax, dword [rsp + 0x50]
mov r8d, eax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x78]
call fcn.1400177a0
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x50], eax
mov ecx, 0x10
call fcn.140006948
mov qword [rsp + 0x90], rax
mov eax, 1
imul rax, rax, 0x18
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov r8d, 8
mov rdx, rax
mov rcx, qword [rsp + 0x90]
call fcn.1400177a0
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x30], rax
lea rax, [0x140019430]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov edx, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x78]
call fcn.1400011b0
test eax, eax
jne 0x1400018ef
lea rcx, str.GenClientContext_failed
call fcn.140002210
mov eax, 1
imul rax, rax, 8
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov r8d, dword [rsp + 0x50]
mov edx, eax
lea rcx, str.Type_hhd_message___lu_bytes_:_n
call fcn.140001e60
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
call fcn.140001ec0
lea r8, [rsp + 0x60]
mov rdx, qword [rsp + 0x80]
mov ecx, 2
call sub.Secur32.dll_GetUserNameExA
mov eax, dword [rsp + 0x60]
mov ecx, eax
call fcn.140006948
mov qword [rsp + 0x80], rax
lea r8, [rsp + 0x60]
mov rdx, qword [rsp + 0x80]
mov ecx, 2
call sub.Secur32.dll_GetUserNameExA
mov edx, 0x5c
mov rcx, qword [rsp + 0x80]
call fcn.140001d90
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x60]
mov byte [rax], 0
mov eax, 1
imul rax, rax, 0x16
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov edx, eax
lea rcx, str.g_pOutBuf_22__d_n
call fcn.140001e60
mov eax, 1
imul rax, rax, 0x16
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
cmp eax, 0x18
jle 0x140001b85
lea rcx, str.NTLMv2_n
call fcn.140001e60
mov ecx, 0x10
call fcn.140006948
mov qword [rsp + 0x70], rax
mov eax, 1
imul rax, rax, 0x18
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov ecx, 1
imul rcx, rcx, 0x19
mov rdx, qword [rsp + 0x58]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
add eax, ecx
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov r8d, 0x10
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call fcn.1400177a0
mov eax, dword [rsp + 0x54]
add eax, 0x10
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x54]
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
sub eax, 0x10
mov eax, eax
mov ecx, eax
call fcn.140006948
mov qword [rsp + 0xa0], rax
mov eax, dword [rsp + 0x54]
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
sub eax, 0x10
mov eax, eax
mov ecx, dword [rsp + 0x54]
mov rdx, qword [rsp + 0x58]
add rdx, rcx
mov rcx, rdx
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0xa0]
call fcn.1400177a0
lea rcx, str.Nonce:
call fcn.140001e60
mov rdx, qword [rsp + 0x90]
mov ecx, 8
call fcn.1400021b0
lea rcx, str._nClientNonce:
call fcn.140001e60
mov eax, dword [rsp + 0x54]
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
sub eax, 0x10
mov rdx, qword [rsp + 0xa0]
mov ecx, eax
call fcn.1400021b0
lea rcx, [0x1400194b0]
call fcn.140001e60
mov rdx, qword [rsp + 0x70]
mov ecx, 0x10
call fcn.1400021b0
lea rcx, [0x1400194bc]
call fcn.140001e60
mov eax, dword [rsp + 0x60]
inc eax
cdqe
mov r8, qword [rsp + 0x80]
mov rdx, rax
lea rcx, [0x1400194c0]
call fcn.140001e60
lea rcx, [0x1400194d0]
call fcn.140001e60
mov rdx, qword [rsp + 0x90]
mov ecx, 8
call fcn.1400021b0
lea rcx, [0x1400194d4]
call fcn.140001e60
mov rdx, qword [rsp + 0x70]
mov ecx, 0x10
call fcn.1400021b0
lea rcx, [0x1400194d8]
call fcn.140001e60
mov eax, dword [rsp + 0x54]
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
sub eax, 0x10
mov rdx, qword [rsp + 0xa0]
mov ecx, eax
call fcn.1400021b0
lea rcx, [0x1400194dc]
call fcn.140001e60
jmp 0x140001d55
mov eax, 1
imul rax, rax, 0x16
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
cmp eax, 0x18
jne 0x140001d49
lea rcx, [0x1400194e0]
call fcn.140001e60
mov ecx, 0x18
call fcn.140006948
mov qword [rsp + 0xa8], rax
mov eax, 1
imul rax, rax, 0x10
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov ecx, 1
imul rcx, rcx, 0x11
mov rdx, qword [rsp + 0x58]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
add eax, ecx
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov r8d, 0x18
mov rdx, rax
mov rcx, qword [rsp + 0xa8]
call fcn.1400177a0
mov ecx, 0x18
call fcn.140006948
mov qword [rsp + 0x70], rax
mov eax, 1
imul rax, rax, 0x18
mov rcx, qword [rsp + 0x58]
movzx eax, byte [rcx + rax]
mov ecx, 1
imul rcx, rcx, 0x19
mov rdx, qword [rsp + 0x58]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
add eax, ecx
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x54]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov r8d, 0x18
mov rdx, rax
mov rcx, qword [rsp + 0x70]
call fcn.1400177a0
lea rcx, str._nNonce:
call fcn.140001e60
mov rdx, qword [rsp + 0x90]
mov ecx, 8
call fcn.1400021b0
lea rcx, str._nLMhash:
call fcn.140001e60
mov rdx, qword [rsp + 0xa8]
mov ecx, 0x18
call fcn.1400021b0
lea rcx, str._nNThash:
call fcn.140001e60
mov rdx, qword [rsp + 0x70]
mov ecx, 0x18
call fcn.1400021b0
mov eax, dword [rsp + 0x60]
inc eax
cdqe
mov r8, qword [rsp + 0x80]
mov rdx, rax
lea rcx, str._nJTR:__s::_s
call fcn.140001e60
lea rcx, str.:::_n
call fcn.140001e60
mov rdx, qword [rsp + 0xa8]
mov ecx, 0x18
call fcn.1400021b0
lea rcx, [0x14001952c]
call fcn.140001e60
mov rdx, qword [rsp + 0x70]
mov ecx, 0x18
call fcn.1400021b0
lea rcx, [0x140019530]
call fcn.140001e60
mov rdx, qword [rsp + 0x90]
mov ecx, 8
call fcn.1400021b0
lea rcx, [0x140019534]
call fcn.140001e60
jmp 0x140001d55
lea rcx, [0x140019538]
call fcn.140001e60
mov eax, 1
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.1400023d0
add rsp, 0x518
ret