Function at 0x140038760
Capabilities:
Get outbound credentials handle via credssp

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
lea rbp, [rsp - 0x2f]
sub rsp, 0xe8
mov rax, qword [0x14049b9c0]
xor rax, rsp
mov qword [rbp + 0x17], rax
xor edi, edi
mov qword [rbp - 1], 0xffffffffffffffff
mov dword [rbp - 0x59], edi
mov rsi, r9
mov qword [rbp - 9], 0xffffffffffffffff
mov r14, r8
mov qword [rbp + 0xf], 0xffffffffffffffff
mov rbx, rdx
mov qword [rbp + 7], 0xffffffffffffffff
mov r12, rcx
test rdx, rdx
je 0x1400387cc
lea rdx, str.Negotiate
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x1400387d3
lea rbx, str.Kerberos
lea rax, [rbp - 0x31]
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov r8d, 2
lea rax, [rbp + 7]
mov rdx, rbx
mov qword [rsp + 0x38], rax
xor ecx, ecx
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call sub.Secur32.dll_AcquireCredentialsHandleA
test eax, eax
jns 0x140038823
lea r8, str.AcquireCredentialsHandle
mov edx, eax
mov rcx, r14
call fcn.1400389d0
xor eax, eax
jmp 0x1400389af
mov ecx, 0xc350
mov qword [rsp + 0xe0], r15
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r15, rax
test rax, rax
jne 0x14003884b
lea r8, str.memory_allocation_error
xor edx, edx
jmp 0x140038965
lea rax, [rbp - 0x41]
mov dword [rbp - 0x29], edi
mov qword [rbp - 0x21], rax
mov ecx, edi
lea rax, [rbp - 0x51]
mov dword [rbp - 0x25], 1
mov qword [rbp - 0x11], rax
mov dword [rbp - 0x3d], 2
mov dword [rbp - 0x41], ecx
mov qword [rbp - 0x39], rdi
mov dword [rbp - 0x19], edi
mov dword [rbp - 0x15], 1
mov dword [rbp - 0x4d], 2
mov qword [rbp - 0x49], r15
nop word [rax + rax]
cmp qword [rbp - 9], 0xffffffffffffffff
mov dword [rbp - 0x51], 0xc350
je 0x1400388a9
cmp qword [rbp - 1], 0xffffffffffffffff
lea rdx, [rbp - 9]
jne 0x1400388ac
mov rdx, rdi
test ecx, ecx
lea rax, [rbp - 0x29]
lea rcx, [rbp - 0x31]
mov r8, r12
mov qword [rsp + 0x58], rcx
cmove rax, rdi
lea rcx, [rbp - 0x59]
xor r9d, r9d
mov qword [rsp + 0x50], rcx
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x48], rcx
lea rcx, [rbp - 9]
mov qword [rsp + 0x40], rcx
lea rcx, [rbp + 7]
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
mov dword [rsp + 0x20], edi
call sub.Secur32.dll_InitializeSecurityContextA
mov ebx, eax
test eax, eax
js 0x14003895c
test eax, eax
je 0x14003890f
cmp eax, 0x90312
jne 0x140038945
mov r8d, dword [rbp - 0x51]
test r8d, r8d
je 0x140038926
mov rdx, qword [rbp - 0x49]
mov rcx, rsi
call qword [rsi + ioctlsocket]
test eax, eax
jne 0x14003894e
cmp ebx, 0x90312
jne 0x140038955
lea rdx, [rbp - 0x39]
mov rcx, rsi
call qword [rsi]
mov ecx, eax
test eax, eax
jle 0x14003894e
mov dword [rbp - 0x41], eax
jmp 0x140038890
lea r8, str.Unexpected_response_from_InitializeSecurityContext
jmp 0x140038963
mov edi, 0xfffffffe
jmp 0x14003896d
mov edi, 0xffffffff
jmp 0x14003896d
lea r8, str.InitializeSecurityContext
mov edx, ebx
mov rcx, r14
call fcn.1400389d0
cmp qword [rbp - 9], 0xffffffffffffffff
je 0x140038985
cmp qword [rbp - 1], 0xffffffffffffffff
je 0x140038985
lea rcx, [rbp - 9]
call qword [sym.imp.Secur32.dll_DeleteSecurityContext]
cmp qword [rbp + 7], 0xffffffffffffffff
je 0x14003899d
cmp qword [rbp + 0xf], 0xffffffffffffffff
je 0x14003899d
lea rcx, [rbp + 7]
call qword [sym.imp.Secur32.dll_FreeCredentialsHandle]
mov rcx, r15
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov r15, qword [rsp + 0xe0]
mov eax, edi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.14008e500
add rsp, 0xe8
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret