Function at 0x10198e80
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x104230a4]
xor eax, ebp
mov dword [ebp - 4], eax
movaps xmm0, xmmword [0x103aea40]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
push 3
push 0x417
push str.Socket_new
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], 0xffffffff
mov dword [ebp - 0x3c], 0
movups xmmword [ebp - 0x5c], xmm0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
call fcn.101a4960
xorps xmm0, xmm0
mov dword [edi], 0xffffffff
add esp, 0xc
movq qword [ebp - 0x20], xmm0
cmp byte [ebx], 0x5b
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x18], 0
jne 0x10198f0b
inc ebx
dec esi
mov dword [ebp - 0x38], ebx
lea eax, [esi + 1]
push eax
push 0x421
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcSocket.c
call fcn.101a4e30
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x10198f33
mov dword [ebp - 0x34], 0xffffff9d
jmp 0x101991ac
push esi
push dword [ebp - 0x38]
push ebx
call fcn.101fcde0
add esp, 0xc
mov byte [esi + ebx], 0
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x5c]
push eax
push 0
push ebx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x1019916d
mov ecx, dword [ebp - 0x3c]
mov esi, ecx
mov edx, dword [ebp + 0x10]
test ecx, ecx
je 0x10198f83
nop dword [eax]
cmp dword [esi + 4], 2
je 0x10198fc9
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x10198fc9
mov esi, eax
test esi, esi
jne 0x10198f70
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x34], 0xffffffff
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 0x34], 0
jne 0x10199187
push 0
push 1
movsx eax, si
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x10199031
push eax
push str.socket
call fcn.10198870
add esp, 8
mov dword [ebp - 0x34], eax
jmp 0x10199199
mov eax, dword [esi + 4]
cmp eax, 0x17
jne 0x10198ffa
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x3c]
mov word [ebp - 0x2e], ax
mov eax, 0x17
mov word [ebp - 0x30], ax
mov eax, dword [esi + 0x18]
mov esi, 0x17
movups xmm0, xmmword [eax + 8]
movups xmmword [ebp - 0x28], xmm0
jmp 0x10198f8d
cmp eax, 2
jne 0x10198f83
xorps xmm0, xmm0
push edx
movq qword [ebp - 0xc], xmm0
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x3c]
mov word [ebp - 0x12], ax
mov eax, 2
mov word [ebp - 0x14], ax
mov eax, dword [esi + 0x18]
mov esi, 2
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], eax
jmp 0x10198f8d
push dword [ebp + 0x10]
push dword [ebp - 0x38]
push eax
push str.New_socket__d_for__s__port__d
push 0xffffffffffffffff
push 3
call fcn.101a2220
push dword [edi]
call fcn.101980b0
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x1019906c
push dword [edi]
push str.addSocket
call fcn.10198870
add esp, 8
mov dword [ebp - 0x34], eax
jmp 0x10199133
cmp si, 2
jne 0x10199079
push 0x10
lea eax, [ebp - 0x14]
jmp 0x1019907e
push 0x1c
lea eax, [ebp - 0x30]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
jne 0x101990a1
push dword [edi]
push str.connect
call fcn.10198870
add esp, 8
mov dword [ebp - 0x34], eax
cmp eax, 0x2734
je 0x101990b3
cmp eax, 0x2733
jne 0x10199133
push 4
push 0x497
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcSocket.c
call fcn.101a4e30
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x38], esi
test esi, esi
je 0x10199116
mov eax, dword [edi]
mov dword [esi], eax
push dword [0x10466e24]
call fcn.1019c3c0
push 4
push esi
push dword [0x104eacc0]
call fcn.10197af0
push dword [0x10466e24]
mov esi, eax
call fcn.1019c4c0
add esp, 0x14
test esi, esi
jne 0x1019911f
push dword [ebp - 0x38]
push 0x4a5
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcSocket.c
call fcn.101a4dd0
add esp, 0xc
mov dword [ebp - 0x34], 0xffffff9d
jmp 0x10199199
push str.Connect_pending
push 0xf
push 3
call fcn.101a2220
mov eax, dword [ebp - 0x34]
add esp, 0xc
test eax, eax
je 0x10199199
cmp eax, 0x2734
je 0x10199199
cmp eax, 0x2733
je 0x10199199
push dword [0x10466e24]
call fcn.1019c3c0
push dword [edi]
call fcn.10198240
push dword [0x10466e24]
call fcn.1019c4c0
add esp, 0xc
mov dword [edi], 0xffffffff
jmp 0x10199199
push eax
push ebx
push str.getaddrinfo_failed_for_addr__s_with_rc__d
push 0xffffffffffffffff
push 5
call fcn.101a2220
add esp, 0x14
mov dword [ebp - 0x34], 0xffffffff
push ebx
push str._s_is_not_a_valid_IP_address
push 0xffffffffffffffff
push 5
call fcn.101a2220
add esp, 0x10
push ebx
push 0x4ba
push str.C:UserschDownloadspaho.mqtt.c_1.3.12_srcSocket.c
call fcn.101a4dd0
add esp, 0xc
push 3
lea eax, [ebp - 0x34]
push eax
push 0x4bc
push str.Socket_new
call fcn.101a4a10
mov ecx, dword [ebp - 4]
add esp, 0x10
mov eax, dword [ebp - 0x34]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.100a9f90
mov esp, ebp
pop ebp
ret