Function at 0x140164900
Capabilities:
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x150]
sub rsp, 0x250
mov rax, qword [0x1402e1040]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov r13, qword [rcx + 0x18]
lea rsi, str.rcmd
movsxd rax, dword [rcx + 0x20]
xor r12d, r12d
mov rbx, rdx
mov r15, rcx
mov rdi, 0xffffffffffffffff
mov rax, qword [r13 + rax*8 + 0x220]
mov qword [rsp + 0x60], rax
mov rax, qword [rdx + 0x7e0]
test rax, rax
mov dword [rbp], 0
cmovne rsi, rax
nop dword [rax]
inc rdi
cmp byte [rsi + rdi], r12b
jne 0x140164970
mov edx, 0x2f
mov qword [rsp + 0x2a0], r14
mov rcx, rsi
call qword [sym.imp.VCRUNTIME140.dll_strchr]
test rax, rax
je 0x1401649ab
mov rcx, rsi
call qword [case.0x140115757.0]
mov r14, rax
test rax, rax
je 0x140164ee8
jmp 0x140164a1b
mov rcx, qword [r13 + 0xa0]
mov rax, 0xffffffffffffffff
nop dword [rax]
cmp byte [rcx + rax + 1], r12b
lea rax, [rax + 1]
jne 0x1401649c0
lea rcx, [rax + 2]
add rcx, rdi
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
test rax, rax
je 0x140164ee8
mov rcx, qword [r13 + 0xa0]
mov rax, 0xffffffffffffffff
cmp byte [rcx + rax + 1], r12b
lea rax, [rax + 1]
jne 0x1401649f2
lea rdx, [rax + 2]
mov qword [rsp + 0x20], rcx
add rdx, rdi
lea r8, str._s__s
mov r9, rsi
mov rcx, r14
call sym.CheraxLoader.exe_curl_msnprintf
xor edi, edi
mov dword [rbp - 0x4c], 1
lea rax, [rsp + 0x78]
mov dword [rbp - 0x50], edi
mov qword [rbp - 0x48], rax
lea rdx, str.Kerberos
lea rax, [rsp + 0x68]
mov dword [rsp + 0x7c], 2
mov qword [rbp - 0x58], rax
xor r9d, r9d
lea rax, [rbp + 0x10]
mov dword [rsp + 0x78], edi
mov qword [rbp - 0x68], rax
mov r8d, 2
lea rax, [rbp + 8]
mov qword [rbp - 0x80], rdi
mov qword [rsp + 0x40], rax
xor ecx, ecx
lea rax, [rbp - 0x10]
mov dword [rbp - 0x5c], 1
mov qword [rsp + 0x38], rax
mov rax, qword [0x1402e36a0]
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov dword [rbp - 0x60], edi
mov dword [rsp + 0x6c], 2
mov dword [rsp + 0x68], edi
mov qword [rsp + 0x70], rdi
mov dword [rbp - 0x6c], 3
mov dword [rbp - 0x70], edi
mov qword [rbp - 0x10], rdi
mov qword [rbp - 8], rdi
mov qword [rsp + 0x20], rdi
call qword [rax + Ordinal_26]
test eax, eax
je 0x140164b25
lea ecx, [rax - 0x90313]
cmp ecx, 1
jbe 0x140164b25
cmp eax, 0x90312
je 0x140164b25
lea rdx, [rbp + 0x40]
mov ecx, eax
call fcn.1400faf80
mov r9, rax
lea r8, str.AcquireCredentialsHandle
lea rdx, str.SSPI_error:__s_failed:__s
mov rcx, rbx
call fcn.140101e00
lea rdx, str.Failed_to_acquire_credentials.
mov rcx, rbx
call fcn.140101e00
mov rcx, r14
call qword [0x1402e1138]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x10]
call qword [rax + 0x20]
mov eax, 7
jmp 0x140164eed
mov r13, qword [rsp + 0x60]
lea r8, [rbp - 0x18]
mov rcx, r13
mov dword [rbp - 0x18], edi
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rcx, r14
call fcn.1401029d0
mov rsi, rax
test rax, rax
je 0x140164ee8
nop dword [rax]
nop word [rax + rax]
lea rax, [rbp + 8]
mov r9d, 0x116
mov qword [rsp + 0x58], rax
lea rcx, [rbp - 0x10]
lea rax, [rbp]
mov r8, rsi
mov qword [rsp + 0x50], rax
mov rdx, r12
lea rax, [rbp - 0x60]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x28]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x50]
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x30], rax
mov rax, qword [0x1402e36a0]
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
mov dword [rsp + 0x20], edi
call qword [rax + 0x30]
mov rcx, rsi
mov edi, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140164be9
mov rdx, qword [0x1402e36a0]
call qword [rdx + Ordinal_133]
xor r12d, r12d
mov ecx, r12d
mov dword [rsp + 0x78], r12d
mov qword [rbp - 0x80], rcx
jmp 0x140164bec
xor r12d, r12d
test edi, edi
je 0x140164c07
lea eax, [rdi - 0x90313]
cmp eax, 1
jbe 0x140164c07
cmp edi, 0x90312
jne 0x140164db2
cmp dword [rsp + 0x68], 0
je 0x140164ca8
movzx ecx, word [rsp + 0x68]
mov word [rbp - 0x30], 0x101
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [r15 + 8]
mov word [rbp - 0x2e], ax
test rcx, rcx
je 0x140164e3a
mov rax, qword [rcx]
lea rdx, [rbp - 0x2c]
mov qword [rsp + 0x20], rdx
lea r8, [rbp - 0x30]
mov rdx, rbx
mov r9d, 4
call qword [rax + Ordinal_73]
cmp dword [rbp - 0x2c], 0
jne 0x140164e41
cmp rax, 4
jne 0x140164e41
mov rcx, qword [r15 + 8]
mov r9d, dword [rsp + 0x68]
test rcx, rcx
je 0x140164e2a
mov rax, qword [rcx]
lea rdx, [rbp - 0x2c]
mov r8, qword [rsp + 0x70]
mov qword [rsp + 0x20], rdx
mov rdx, rbx
call qword [rax + Ordinal_73]
cmp dword [rbp - 0x2c], 0
jne 0x140164e31
mov ecx, dword [rsp + 0x68]
cmp rcx, rax
jne 0x140164e31
mov rcx, qword [rbp - 0x80]
mov rax, qword [rsp + 0x70]
test rax, rax
je 0x140164ccb
mov rcx, rax
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
mov rcx, qword [rbp - 0x80]
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x68], r12d
test rcx, rcx
je 0x140164ce6
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
mov qword [rbp - 0x80], r12
mov dword [rsp + 0x78], r12d
cmp edi, 0x90312
jne 0x140164f67
lea rax, [rbp - 0x18]
mov r9d, 4
lea r8, [rbp - 0x30]
mov qword [rsp + 0x20], rax
mov rdx, rbx
mov rcx, r15
call fcn.14012a980
test eax, eax
jne 0x140164f4a
cmp qword [rbp - 0x18], 4
jne 0x140164f4a
movzx eax, byte [rbp - 0x2f]
cmp al, 0xff
je 0x140164f22
cmp al, 1
jne 0x140164f16
movzx ecx, word [rbp - 0x2e]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx edi, ax
mov dword [rsp + 0x78], ecx
mov ecx, edi
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp - 0x80], rax
test rax, rax
je 0x140164ec3
mov r9d, dword [rsp + 0x78]
lea rcx, [rbp - 0x18]
mov qword [rsp + 0x20], rcx
mov r8, rax
mov rcx, r15
mov rdx, rbx
call fcn.14012a980
test eax, eax
jne 0x140164ea9
cmp qword [rbp - 0x18], rdi
jne 0x140164ea9
mov rcx, r14
lea r12, [rbp - 0x28]
call fcn.1401029d0
mov rsi, rax
test rax, rax
je 0x140164ee8
xor edi, edi
jmp 0x140164b60
lea rdx, [rbp + 0x40]
mov ecx, edi
call fcn.1400faf80
mov r9, rax
lea r8, str.InitializeSecurityContext
lea rdx, str.SSPI_error:__s_failed:__s
mov rcx, rbx
call fcn.140101e00
mov rcx, r14
call qword [0x1402e1138]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x10]
call qword [rax + 0x20]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x28]
call qword [rax + Ordinal_73]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140164e11
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
lea rdx, str.Failed_to_initialise_security_context.
mov rcx, rbx
call fcn.140101e00
mov eax, 7
jmp 0x140164eed
mov dword [rbp - 0x2c], gethostname
lea rdx, str.Failed_to_send_SSPI_authentication_token.
jmp 0x140164e48
mov dword [rbp - 0x2c], gethostname
lea rdx, str.Failed_to_send_SSPI_authentication_request.
mov rcx, rbx
call fcn.140101e00
mov rcx, r14
call qword [0x1402e1138]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140164e70
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x140164e86
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x10]
call qword [rax + 0x20]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x28]
call qword [rax + Ordinal_73]
mov eax, 7
jmp 0x140164eed
lea rdx, str.Failed_to_receive_SSPI_authentication_token.
mov rcx, rbx
call fcn.140101e00
mov rcx, r14
call qword [0x1402e1138]
jmp 0x140164e70
mov rcx, r14
call qword [0x1402e1138]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x10]
call qword [rax + 0x20]
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x28]
call qword [rax + Ordinal_73]
mov eax, reloc.WLDAP32.dll_Ordinal_27
mov r14, qword [rsp + 0x2a0]
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.140171bd0
add rsp, 0x250
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r9d, eax
lea rdx, str.Invalid_SSPI_authentication_response_type___u__u_.
jmp 0x140164f2f
mov r9d, 0xff
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___u__u_.
movzx r8d, byte [rbp - 0x30]
mov rcx, rbx
call fcn.140101e00
mov rcx, r14
call qword [0x1402e1138]
jmp 0x140164e86
lea rdx, str.Failed_to_receive_SSPI_authentication_response.
mov rcx, rbx
call fcn.140101e00
mov rcx, r14
call qword [0x1402e1138]
jmp 0x140164e86
mov rcx, r14
call qword [0x1402e1138]
mov rax, qword [0x1402e36a0]
lea r8, [rbp - 0x78]
mov edx, 1
lea rcx, [rbp - 0x10]
call qword [rax + reloc.WS2_32.dll_recv]
mov rdx, qword [0x1402e36a0]
lea rcx, [rbp - 0x10]
mov edi, eax
call qword [rdx + 0x20]
test edi, edi
je 0x14016500a
lea ecx, [rdi - 0x90313]
cmp ecx, 1
jbe 0x14016500a
cmp edi, 0x90312
je 0x14016500a
lea rdx, [rbp + 0x40]
mov ecx, edi
call fcn.1400faf80
mov r9, rax
lea r8, str.QueryCredentialAttributes
lea rdx, str.SSPI_error:__s_failed:__s
mov rcx, rbx
call fcn.140101e00
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x28]
call qword [rax + Ordinal_73]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp - 0x78]
call qword [rax + Ordinal_133]
lea rdx, str.Failed_to_determine_username.
mov rcx, rbx
call fcn.140101e00
mov eax, 7
jmp 0x140164eed
mov rsi, qword [rbp - 0x78]
mov rdi, r12
test rsi, rsi
je 0x1401650ab
mov qword [rsp + 0x38], r12
mov r9d, 0xffffffff
mov qword [rsp + 0x30], r12
mov r8, rsi
mov dword [rsp + 0x28], r12d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd r14, eax
test eax, eax
jle 0x1401650ab
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x1401650ab
mov qword [rsp + 0x38], r12
mov r9d, 0xffffffff
mov qword [rsp + 0x30], r12
mov r8, rsi
mov dword [rsp + 0x28], r14d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x1401650ab
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r8, str._unknown_
mov rcx, rbx
lea rdx, str.SOCKS5_server_authenticated_user__s_with_GSS_API.
call fcn.140101ff0
jmp 0x1401650d6
test rdi, rdi
lea r8, str._unknown_
lea rdx, str.SOCKS5_server_authenticated_user__s_with_GSS_API.
mov rcx, rbx
cmovne r8, rdi
call fcn.140101ff0
test rdi, rdi
je 0x1401650d6
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp - 0x78]
call qword [rax + Ordinal_133]
mov eax, dword [rbp]
mov word [rbp - 0x30], 0x201
test al, 0x10
je 0x1401650f8
mov al, 2
jmp 0x140165100
bt eax, 0x10
jae 0x140165116
mov al, 1
cmp al, 1
lea rcx, str.integrity
lea r8, str.confidentiality
cmove r8, rcx
jmp 0x14016511d
lea r8, [0x1402b99a0]
lea rdx, str.SOCKS5_server_supports_GSS_API__s_data_protection.
mov rcx, rbx
call fcn.140101ff0
cmp byte [rbx + 0xa5f], 0
je 0x14016513f
mov ecx, 1
jmp 0x1401653be
mov rax, qword [0x1402e36a0]
lea r8, [rbp - 0x40]
xor edx, edx
lea rcx, [rbp - 0x28]
call qword [rax + 0x58]
test eax, eax
je 0x1401651b4
lea ecx, [rax - 0x90313]
cmp ecx, 1
jbe 0x1401651b4
cmp eax, 0x90312
je 0x1401651b4
lea rdx, [rbp + 0x40]
mov ecx, eax
call fcn.1400faf80
mov r9, rax
lea r8, str.QueryContextAttributes
lea rdx, str.SSPI_error:__s_failed:__s
mov rcx, rbx
call fcn.140101e00
mov rax, qword [0x1402e36a0]
lea rcx, [rbp - 0x28]
call qword [rax + Ordinal_73]
lea rdx, str.Failed_to_query_security_context_attributes.
mov rcx, rbx
call fcn.140101e00
mov eax, 7
jmp 0x140164eed
mov eax, dword [rbp - 0x34]
mov ecx, eax
mov dword [rbp + 0x10], eax
mov dword [rbp + 0x14], 2
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp + 0x18], rax
test rax, rax
je 0x140164eda
mov ecx, 1
mov dword [rbp + 0x20], 1
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp + 0x28], rax
test rax, rax
jne 0x140165207
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
jmp 0x140164eda
mov byte [rax], 0
mov eax, dword [rbp - 0x38]
mov ecx, eax
mov dword [rbp + 0x34], 9
mov dword [rbp + 0x30], eax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp + 0x38], rax
test rax, rax
mov rax, qword [0x1402e36a0]
jne 0x14016524f
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x28]
call qword [rax + Ordinal_133]
jmp 0x140164eda
xor r9d, r9d
lea r8, [rbp - 0x70]
mov edx, 0x80000001
lea rcx, [rbp - 0x28]
call qword [rax + 0xc8]
test eax, eax
je 0x1401652d7
lea ecx, [rax - 0x90313]
cmp ecx, 1
jbe 0x1401652d7
cmp eax, 0x90312
je 0x1401652d7
lea rdx, [rbp + 0x40]
mov ecx, eax
call fcn.1400faf80
mov r9, rax
lea r8, str.EncryptMessage
lea rdx, str.SSPI_error:__s_failed:__s
mov rcx, rbx
call fcn.140101e00
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x28]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x38]
call qword [rax + Ordinal_133]
jmp 0x14016518d
mov ecx, dword [rbp + 0x20]
add ecx, dword [rbp + 0x30]
add ecx, dword [rbp + 0x10]
mov dword [rsp + 0x68], ecx
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x70], rax
test rax, rax
jne 0x14016532c
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x28]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x38]
call qword [rax + Ordinal_133]
jmp 0x140164eda
mov r8d, dword [rbp + 0x10]
mov rcx, rax
mov rdx, qword [rbp + 0x18]
call sub.VCRUNTIME140.dll_memcpy
movsxd rcx, dword [rbp + 0x10]
add rcx, qword [rsp + 0x70]
mov r8d, dword [rbp + 0x20]
mov rdx, qword [rbp + 0x28]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rbp + 0x20]
add rcx, qword [rsp + 0x70]
mov r9d, dword [rbp + 0x10]
mov r8d, dword [rbp + 0x30]
add rcx, r9
mov rdx, qword [rbp + 0x38]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x28]
mov qword [rbp + 0x18], r12
mov dword [rbp + 0x10], r12d
call qword [rax + Ordinal_133]
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x38]
mov qword [rbp + 0x28], r12
mov dword [rbp + 0x20], r12d
call qword [rax + Ordinal_133]
movzx ecx, word [rsp + 0x68]
mov qword [rbp + 0x38], r12
mov dword [rbp + 0x30], r12d
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [r15 + 8]
mov word [rbp - 0x2e], ax
test rcx, rcx
je 0x140165786
mov rax, qword [rcx]
lea rdx, [rbp - 0x2c]
mov qword [rsp + 0x20], rdx
lea r8, [rbp - 0x30]
mov rdx, rbx
mov r9d, 4
call qword [rax + Ordinal_73]
cmp dword [rbp - 0x2c], 0
jne 0x14016578d
cmp rax, 4
jne 0x14016578d
cmp byte [rbx + 0xa5f], 0
mov rcx, qword [r15 + 8]
je 0x140165476
mov byte [rbp - 0x30], 0
test rcx, rcx
je 0x14016545b
mov rax, qword [rcx]
lea rdx, [rbp - 0x2c]
mov qword [rsp + 0x20], rdx
lea r8, [rbp - 0x30]
mov rdx, rbx
mov r9d, 1
call qword [rax + Ordinal_73]
cmp dword [rbp - 0x2c], 0
jne 0x140165462
cmp rax, 1
je 0x1401654c9
lea rdx, str.Failed_to_send_SSPI_encryption_type.
mov rcx, rbx
call fcn.140101e00
jmp 0x140164e94
mov dword [rbp - 0x2c], gethostname
lea rdx, str.Failed_to_send_SSPI_encryption_type.
mov rcx, rbx
call fcn.140101e00
jmp 0x140164e94
mov r9d, dword [rsp + 0x68]
test rcx, rcx
je 0x140165776
mov rax, qword [rcx]
lea rdx, [rbp - 0x2c]
mov r8, qword [rsp + 0x70]
mov qword [rsp + 0x20], rdx
mov rdx, rbx
call qword [rax + Ordinal_73]
cmp dword [rbp - 0x2c], 0
jne 0x14016577d
mov ecx, dword [rsp + 0x68]
cmp rcx, rax
jne 0x14016577d
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1401654c9
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
lea rax, [rbp - 0x18]
mov r9d, 4
lea r8, [rbp - 0x30]
mov qword [rsp + 0x20], rax
mov rdx, rbx
mov rcx, r15
call fcn.14012a980
test eax, eax
jne 0x140165762
cmp qword [rbp - 0x18], 4
jne 0x140165762
movzx eax, byte [rbp - 0x2f]
cmp al, 0xff
jne 0x140165521
movzx r8d, byte [rbp - 0x30]
lea rdx, str.User_was_rejected_by_the_SOCKS5_server___u__u_.
mov r9d, 0xff
mov rcx, rbx
call fcn.140101e00
jmp 0x140164e94
cmp al, 2
je 0x140165541
movzx r8d, byte [rbp - 0x30]
lea rdx, str.Invalid_SSPI_encryption_response_type___u__u_.
mov r9d, eax
mov rcx, rbx
call fcn.140101e00
jmp 0x140164e94
movzx ecx, word [rbp - 0x2e]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx edi, ax
mov dword [rbp + 0x10], ecx
mov ecx, edi
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp + 0x18], rax
test rax, rax
je 0x140164eda
mov r9d, dword [rbp + 0x10]
lea rcx, [rbp - 0x18]
mov qword [rsp + 0x20], rcx
mov r8, rax
mov rcx, r15
mov rdx, rbx
call fcn.14012a980
test eax, eax
jne 0x14016573d
cmp qword [rbp - 0x18], rdi
jne 0x14016573d
cmp byte [rbx + 0xa5f], al
jne 0x1401656a3
mov rax, qword [0x1402e36a0]
lea r9, [rbp + 4]
xor r8d, r8d
mov dword [rbp - 0x6c], 2
lea rdx, [rbp - 0x70]
mov dword [rbp + 0x14], 0xa
lea rcx, [rbp - 0x28]
mov dword [rbp + 0x24], 1
mov dword [rbp + 0x20], r12d
mov qword [rbp + 0x28], r12
call qword [rax + reloc.WLDAP32.dll_Ordinal_208]
test eax, eax
je 0x14016564a
lea ecx, [rax - 0x90313]
cmp ecx, 1
jbe 0x14016564a
cmp eax, 0x90312
je 0x14016564a
lea rdx, [rbp + 0x40]
mov ecx, eax
call fcn.1400faf80
mov r9, rax
lea r8, str.DecryptMessage
lea rdx, str.SSPI_error:__s_failed:__s
mov rcx, rbx
call fcn.140101e00
mov rcx, qword [rbp + 0x18]
test rcx, rcx
je 0x14016562b
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x14016518d
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
jmp 0x14016518d
mov r8d, dword [rbp + 0x20]
cmp r8d, 1
je 0x140165682
lea rdx, str.Invalid_SSPI_encryption_response_length___lu_.
mov rcx, rbx
call fcn.140101e00
mov rcx, qword [rbp + 0x18]
test rcx, rcx
je 0x140165679
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
mov rcx, qword [rbp + 0x28]
jmp 0x1401657a1
mov rax, qword [rbp + 0x28]
movzx ecx, byte [rax]
mov rax, qword [0x1402e36a0]
mov byte [rbp - 0x30], cl
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
mov rcx, qword [rbp + 0x28]
jmp 0x1401656dc
mov r8d, dword [rbp + 0x10]
cmp r8d, 1
je 0x1401656d2
lea rdx, str.Invalid_SSPI_encryption_response_length___lu_.
mov rcx, rbx
call fcn.140101e00
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
jmp 0x140164e94
mov rcx, qword [rbp + 0x18]
movzx eax, byte [rcx]
mov byte [rbp - 0x30], al
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
lea r8, [rbp - 0x18]
mov dword [rbp - 0x18], 1
mov edx, 0x8004667e
mov rcx, r13
call qword [sym.imp.WS2_32.dll_ioctlsocket]
movzx eax, byte [rbp - 0x30]
test al, al
jne 0x140165713
lea r8, str.out_GSS_API_data
jmp 0x140165727
cmp al, 1
lea rcx, str._GSS_API_integrity
lea r8, str._GSS_API_confidentiality
cmove r8, rcx
lea rdx, str.SOCKS5_access_with_s_protection_granted.
mov rcx, rbx
call fcn.140101ff0
xor eax, eax
jmp 0x140164eed
lea rdx, str.Failed_to_receive_SSPI_encryption_type.
mov rcx, rbx
call fcn.140101e00
mov rax, qword [0x1402e36a0]
mov rcx, qword [rbp + 0x18]
call qword [rax + Ordinal_133]
jmp 0x140164e94
lea rdx, str.Failed_to_receive_SSPI_encryption_response.
mov rcx, rbx
call fcn.140101e00
jmp 0x140164e94
mov dword [rbp - 0x2c], gethostname
lea rdx, str.Failed_to_send_SSPI_encryption_type.
jmp 0x140165794
mov dword [rbp - 0x2c], gethostname
lea rdx, str.Failed_to_send_SSPI_encryption_request.
mov rcx, rbx
call fcn.140101e00
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140164e94
mov rax, qword [0x1402e36a0]
call qword [rax + Ordinal_133]
jmp 0x140164e94