Function at 0x140177400
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
mov eax, gethostbyname
call fcn.140215a20
sub rsp, rax
mov rax, qword [rdx + 0x38]
xor r14d, r14d
or esi, 0xffffffff
mov rdi, rdx
test rax, rax
mov rbp, rcx
cmovne r14, rax
mov eax, dword [rdx]
dec eax
cmp eax, 7
ja case.default.0x14017745d
lea r12, [0x140000000]
lea r15d, [rsi + 3]
nop
cdqe
mov ecx, dword [r12 + rax*4 + 0x17793c]
add rcx, r12
jmp rcx
mov rbx, qword [rdi + 8]
test rbx, rbx
je 0x14017774d
cmp byte [rbx], 0
je 0x140177484
movzx eax, byte [rbx]
cmp al, 0x3a
je 0x140177484
cmp al, 0x2f
je 0x140177484
inc rbx
cmp byte [rbx], 0
jne 0x140177471
movsx eax, byte [rbx]
mov dword [rsp + 0x68], eax
cmp eax, 0x3a
je 0x140177495
cmp eax, 0x2f
jne 0x1401774dd
mov byte [rbx], 0
cmp dword [rsp + 0x68], 0x3a
jne 0x1401774dd
cmp byte [rbx + 1], 0
lea rax, [rbx + 1]
je 0x1401774c2
nop dword [rax]
cmp byte [rax], 0x2f
je 0x1401774bf
inc rax
cmp byte [rax], 0
jne 0x1401774b0
jmp 0x1401774c2
mov byte [rax], 0
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x1401774d0
call fcn.14011f690
lea rcx, [rbx + 1]
call fcn.14014a6e0
mov qword [rdi + 0x10], rax
cmp qword [rdi + 0x10], 0
je 0x140177715
mov dword [rdi], r15d
jmp 0x1401776e9
mov rcx, qword [rdi + 8]
lea rdx, [rdi + 0x1c]
call fcn.1401c7460
test eax, eax
jle case.default.0x14017745d
mov dword [rdi], 3
jmp 0x1401776e9
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je case.default.0x14017745d
lea rdx, [rdi + 0x20]
call fcn.1401c75d0
test eax, eax
jle case.default.0x14017745d
mov dword [rdi], 4
jmp 0x1401776e9
xor eax, eax
mov qword [rdi + 0x24], rax
mov qword [rdi + 0x2c], rax
movzx ecx, word [rdi + 0x20]
mov word [rdi + 0x24], r15w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rdi + 0x26], ax
movzx eax, byte [rdi + 0x1d]
movzx ecx, byte [rdi + 0x1c]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x1f]
shl ecx, 8
or ecx, eax
call qword [sym.imp.WS2_32.dll_htonl]
mov edx, 1
mov dword [rdi], 4
mov ecx, r15d
mov dword [rdi + 0x28], eax
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp eax, 0xffffffff
je 0x140177772
mov dword [rbp + 0x28], eax
mov dword [rdi], 8
jmp 0x1401776e9
cmp dword [rdi + 0x18], 0
je 0x1401775cb
mov ecx, dword [rbp + 0x28]
mov edx, 1
call fcn.1401c7950
test eax, eax
je 0x1401777e1
mov dword [rdi], 5
lea r9, [rsp + 0x68]
movsxd rcx, dword [rbp + 0x28]
mov edx, 0xffff
mov r8d, 8
mov dword [rsp + 0x68], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x68], eax
test eax, eax
jns 0x1401776e9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r9, [0x1402e7138]
mov dword [rsp + 0x20], 0xe2
mov r8d, eax
mov edx, 4
mov ecx, r15d
call fcn.1401404e0
mov rax, qword [rdi + 0x10]
lea r9, [0x1402e7150]
mov r8, qword [rdi + 8]
lea rdx, [0x1402e7154]
mov ecx, 4
mov qword [rsp + 0x20], rax
call fcn.14013f940
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], 0xe5
lea r9, [0x1402e7160]
lea ecx, [rdx - 0x53]
lea r8d, [rdx - 6]
call fcn.1401404e0
jmp case.default.0x14017745d
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, rbp
call fcn.1401204b0
movsxd rcx, dword [rbp + 0x28]
lea rdx, [rdi + 0x24]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0x24], 0
mov esi, eax
test eax, eax
jns 0x1401776e3
mov ecx, eax
call fcn.14016a0b0
test eax, eax
je 0x14017782b
mov edx, recv
mov rcx, rbp
call fcn.140120e80
mov dword [rdi], 7
mov dword [rbp + 0x24], r15d
jmp case.default.0x14017745d
mov ecx, dword [rbp + 0x28]
call fcn.1401c7840
mov dword [rsp + 0x68], eax
test eax, eax
jne 0x140177895
mov dword [rdi], 6
test r14, r14
je 0x140177703
mov edx, dword [rdi]
mov r8d, esi
mov rcx, rbp
call r14
mov esi, eax
test eax, eax
je 0x140177923
mov eax, dword [rdi]
dec eax
cmp eax, 7
jbe 0x140177450
jmp case.default.0x14017745d
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], 0xa4
lea r9, [0x1402e70b8]
lea ecx, [rdx - 0x53]
lea r8d, [rdx - 1]
call fcn.1401404e0
mov r8, qword [rdi + 8]
lea rdx, [0x1402e70d0]
mov ecx, r15d
call fcn.14013f940
jmp case.default.0x14017745d
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], Ordinal_143
lea r9, [0x1402e70a0]
lea ecx, [rdx - 0x53]
lea r8d, [rdx - 3]
call fcn.1401404e0
jmp case.default.0x14017745d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r9, [0x1402e70d8]
mov dword [rsp + 0x20], reloc.WLDAP32.dll_Ordinal_200
mov r8d, eax
mov edx, 4
mov ecx, r15d
call fcn.1401404e0
mov rax, qword [rdi + 0x10]
lea r9, [0x1402e70f0]
mov r8, qword [rdi + 8]
lea rdx, [0x1402e70f4]
mov ecx, 4
mov qword [rsp + 0x20], rax
call fcn.14013f940
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], 0xcb
lea r9, [0x1402e7100]
lea ecx, [rdx - 0x53]
lea r8d, [rdx + 3]
call fcn.1401404e0
jmp case.default.0x14017745d
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], Ordinal_217
lea r9, [0x1402e7118]
lea ecx, [rdx - 0x53]
lea r8d, [rdx - 0xb]
call fcn.1401404e0
mov rax, qword [rdi + 0x10]
lea r9, [0x1402e70fc]
mov r8, qword [rdi + 8]
lea rdx, [0x1402e7130]
mov ecx, 4
mov qword [rsp + 0x20], rax
call fcn.14013f940
jmp case.default.0x14017745d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r9, [0x1402e7178]
mov dword [rsp + 0x20], 0xf6
mov r8d, eax
mov edx, r15d
mov ecx, r15d
call fcn.1401404e0
mov rax, qword [rdi + 0x10]
lea r9, [0x1402e715c]
mov r8, qword [rdi + 8]
lea rdx, [0x1402e7190]
mov ecx, 4
mov qword [rsp + 0x20], rax
call fcn.14013f940
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], 0xf9
lea r9, [0x1402e7198]
lea ecx, [rdx - 0x53]
lea r8d, [rdx - 0xc]
call fcn.1401404e0
jmp case.default.0x14017745d
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, rbp
call fcn.1401204b0
mov r8d, dword [rsp + 0x68]
lea r9, [0x1402e71b0]
mov edx, r15d
mov dword [rsp + 0x20], 0x104
mov ecx, r15d
call fcn.1401404e0
mov rax, qword [rdi + 0x10]
lea r9, [0x1402e71c8]
mov r8, qword [rdi + 8]
lea rdx, [0x1402e71cc]
mov ecx, 4
mov qword [rsp + 0x20], rax
call fcn.14013f940
mov edx, reloc.WS2_32.dll_WSAStartup
mov dword [rsp + 0x20], 0x107
lea r9, [0x1402e71d8]
lea ecx, [rdx - 0x53]
lea r8d, [rdx - 5]
call fcn.1401404e0
xor esi, esi
jmp case.default.0x14017745d
mov esi, 1
test r14, r14
je 0x140177921
mov edx, dword [rdi]
mov r8d, esi
mov rcx, rbp
call r14
jmp 0x140177923
mov eax, esi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret