Function at 0x1400d0180
Capabilities:
Connect socket
Resolve dns

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb0
movdqa xmm0, xmmword [0x140123f60]
mov rbp, rcx
mov qword [r9], 0xffffffffffffffff
mov rbx, rdx
mov r13d, r8d
movaps xmmword [rsp + 0x80], xmm0
pxor xmm0, xmm0
cmp byte [rbp], 0x5b
mov r12, r9
movups xmmword [rsp + 0x98], xmm0
pxor xmm0, xmm0
lea rcx, [rdx + 1]
movaps xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0xa8], 0
movups xmmword [rsp + 0x6c], xmm0
jne 0x1400d0204
add rbp, 1
mov rcx, rdx
sub rbx, 1
call sym.malloc
mov rdi, rax
test rax, rax
je 0x1400d0648
mov r8, rbx
mov rdx, rbp
mov rcx, rax
call sym.memcpy
mov byte [rdi + rbx], 0
lea r9, [rsp + 0x48]
xor edx, edx
lea r8, [rsp + 0x80]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r14d, eax
test eax, eax
jne 0x1400d0360
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400d03d0
mov rbx, rcx
jmp 0x1400d0270
mov rax, qword [rbx + 0x28]
test rax, rax
je 0x1400d03c0
mov rbx, rax
mov esi, dword [rbx + 4]
cmp esi, 2
jne 0x1400d0260
mov qword [rsp + 0x58], 0
movzx ecx, r13w
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0x48]
mov word [rsp + 0x52], ax
mov eax, 2
mov word [rsp + 0x50], ax
mov rax, qword [rbx + 0x20]
mov ebx, 2
mov eax, dword [rax + 4]
mov dword [rsp + 0x54], eax
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
xor r8d, r8d
mov edx, 1
mov ecx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [r12], rax
mov r9, rax
cmp rax, 0xffffffffffffffff
je 0x1400d0420
mov dword [rsp + 0x28], r13d
mov ecx, 3
lea r8, str.New_socket__d_for__s__port__d
mov edx, 0xffffffff
mov qword [rsp + 0x20], rbp
call sym.Log
mov rcx, qword [r12]
call sym.Socket_addSocket
cmp eax, 0xffffffff
je 0x1400d0538
mov rcx, qword [r12]
cmp bx, 2
je 0x1400d0485
lea rdx, [rsp + 0x60]
mov r8d, 0x1c
call qword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1400d05a7
lea eax, [rbx - 0x2733]
cmp eax, 1
jbe 0x1400d04b1
test ebx, ebx
je 0x1400d039c
mov rcx, qword [r12]
mov r14d, ebx
call sym.Socket_close
mov qword [r12], 0xffffffffffffffff
jmp 0x1400d039c
mov dword [rsp + 0x20], eax
mov r9, rdi
mov edx, 0xffffffff
lea r8, str.getaddrinfo_failed_for_addr__s_with_rc__d
mov ecx, 5
call sym.Log
mov r9, rdi
mov edx, 0xffffffff
mov ecx, 5
mov r14d, 0xffffffff
lea r8, str._s_is_not_a_valid_IP_address
call sym.Log
mov rcx, rdi
call sym.free
mov eax, r14d
add rsp, 0xb0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp esi, 0x17
je 0x1400d03da
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x1400d037d
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x1400d037d
movzx ecx, r13w
call qword [sym.imp.WS2_32.dll_htons]
mov edx, 0x17
mov rcx, qword [rsp + 0x48]
mov word [rsp + 0x62], ax
mov rax, qword [rbx + 0x20]
mov ebx, 0x17
mov word [rsp + 0x60], dx
movdqu xmm1, xmmword [rax + 8]
movups xmmword [rsp + 0x68], xmm1
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x1400d02b5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, eax
lea eax, [rax - 0x2733]
cmp eax, 1
jbe 0x1400d039c
cmp r14d, 0x2714
je 0x1400d039c
mov ecx, r14d
call sym.strerror
mov dword [rsp + 0x20], r14d
mov edx, 0xffffffff
lea r8, str.Socket_error__s__d__in__s_for_socket__d
mov r9, rax
lea rax, str.socket
mov ecx, 3
mov qword [rsp + 0x30], 0xffffffffffffffff
mov qword [rsp + 0x28], rax
call sym.Log
jmp 0x1400d039c
lea rdx, [rsp + 0x50]
mov r8d, 0x10
call qword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
jmp 0x1400d0329
sub ebx, 0x2733
cmp ebx, 1
ja 0x1400d0620
mov ebx, 0x2733
mov ecx, 8
call sym.malloc
mov r13, rax
test rax, rax
je 0x1400d063d
mov rax, qword [r12]
mov rbp, qword [0x14012a350]
mov qword [r13], rax
mov rcx, qword [rbp]
call sym.Paho_thread_lock_mutex
mov rcx, qword [0x140147400]
mov r8d, 8
mov rdx, r13
call sym.ListAppend
mov rcx, qword [rbp]
mov rsi, rax
call sym.Paho_thread_unlock_mutex
test rsi, rsi
je 0x1400d0635
mov edx, 0xf
lea r8, str.Connect_pending
mov ecx, 3
mov r14d, 0x2734
call sym.Log
xor eax, eax
cmp ebx, 0x2734
setne al
sub r14d, eax
jmp 0x1400d039c
mov rsi, qword [r12]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2714
je 0x1400d060e
cmp eax, 0x2733
je 0x1400d060e
cmp eax, 0x2734
je 0x1400d062a
mov ecx, eax
call sym.strerror
mov qword [rsp + 0x30], rsi
mov edx, 0xffffffff
lea r8, str.Socket_error__s__d__in__s_for_socket__d
mov r9, rax
lea rax, str.addSocket
mov dword [rsp + 0x20], ebx
mov ecx, 3
mov qword [rsp + 0x28], rax
call sym.Log
test ebx, ebx
jne 0x1400d0345
jmp 0x1400d039c
mov rsi, qword [r12]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2714
je 0x1400d049d
cmp eax, 0x2733
je 0x1400d049d
cmp eax, 0x2734
je 0x1400d04b1
mov ecx, eax
call sym.strerror
mov qword [rsp + 0x30], rsi
mov edx, 0xffffffff
lea r8, str.Socket_error__s__d__in__s_for_socket__d
mov r9, rax
lea rax, str.connect
mov dword [rsp + 0x20], ebx
mov ecx, 3
mov qword [rsp + 0x28], rax
call sym.Log
jmp 0x1400d0341
mov r14d, 0x2733
cmp ebx, 0x2733
je 0x1400d039c
mov ebx, 0x2714
jmp 0x1400d0345
mov r14d, 0x2734
jmp 0x1400d039c
mov rcx, r13
call sym.free
mov r14d, 0xffffff9d
jmp 0x1400d039c
mov r14d, 0xffffff9d
jmp 0x1400d03a4