Function at 0x67345bf4
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x38c
mov dword [ebp - 0x34c], eax
mov dword [ebp - 0x350], ecx
mov eax, dword [eax]
mov dword [ebp - 0x344], eax
mov ecx, dword [edx + 4]
mov dword [ebp - 0x33c], ecx
mov dword [ebp - 0x238], ecx
mov esi, dword [ebp - 0x34c]
mov ebx, dword [esi + 0x70]
mov dword [ebp - 0x234], ebx
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x230], eax
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x22c], ecx
cmp ecx, 0x80
jbe 0x67345c5b
mov dword [ebp - 0x22c], pe_nt_image_headers32
mov ecx, pe_nt_image_headers32
lea esi, [ebp - 0x228]
mov dword [ebp - 0x36c], esi
mov esi, dword [edx + 0x18]
mov edi, dword [ebp - 0x36c]
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 8]
mov byte [edx], 0
mov ecx, dword [ebp - 0x344]
mov edx, dword [ecx + 0x194]
test edx, edx
je 0x6734613c
lea esi, [ebp - 0x238]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x198]
mov dword [esp], eax
call edx
mov dword [ebp - 0x340], eax
cmp dword [ebp - 0x340], 0xffffffff
je 0x67345f92
mov dword [esp + 0xc], pe_nt_image_headers32
lea edx, [ebp - 0xa4]
mov dword [esp + 8], edx
lea eax, [ebp - 0x224]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x238]
mov dword [esp], eax
call fcn.673518b4
test eax, eax
je 0x67345d49
lea ecx, [ebp - 0xa4]
mov dword [esp + 8], ecx
mov dword [esp + 4], str.__Trying__s...
mov esi, dword [ebp - 0x344]
mov dword [esp], esi
call fcn.673471e0
mov ebx, esi
add ebx, 0x8634
lea eax, [ebp - 0xa4]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x67396a77
mov dword [esp + 4], 0x2e
mov dword [esp], ebx
call fcn.67343f4c
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x34c]
add eax, 0x3c
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov edx, dword [ebp - 0x344]
cmp byte [edx + 0x2c6], 0
jne 0x67345fc4
mov edx, dword [ebp - 0x340]
mov dword [esp], edx
call fcn.67345b70
mov ecx, dword [ebp - 0x344]
mov eax, dword [ecx + 0x18c]
test eax, eax
je 0x67345da2
mov dword [esp + 8], 0
mov esi, dword [ebp - 0x340]
mov dword [esp + 4], esi
mov edx, dword [ecx + 0x190]
mov dword [esp], edx
call eax
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x67345fa0
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x354], eax
mov edx, dword [ebp - 0x34c]
mov edx, dword [edx]
mov dword [ebp - 0x348], edx
lea ebx, [ebp - 0x128]
mov dword [ebp - 0x20], 0
mov esi, dword [edx + 0x160]
mov ecx, dword [edx + 0x164]
mov dword [ebp - 0x33c], ecx
mov edx, dword [edx + 0x2f4]
mov dword [ebp - 0x338], 0
lea edi, [ebp - 0x334]
xor eax, eax
mov ecx, 0xfc
rep stosb byte es:[edi], al
test edx, edx
je 0x67346160
mov ecx, pe_nt_image_headers32
mov edi, ebx
rep stosb byte es:[edi], al
mov ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xfe
jbe 0x67346024
cmp dword [ebp - 0x354], 2
je 0x673460b0
xor edi, edi
nop
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call sub.WS2_32.dll_bind
sub esp, 0xc
test eax, eax
jns 0x67345e9c
dec dword [ebp - 0x33c]
mov eax, dword [ebp - 0x33c]
test eax, eax
jle 0x673460d0
movzx eax, si
mov dword [esp + 8], eax
mov dword [esp + 4], str.Bind_to_local_port__hu_failed__trying_next_n
mov eax, dword [ebp - 0x348]
mov dword [esp], eax
call fcn.673471e0
inc esi
cmp word [ebx], 2
jne 0x67345e34
movzx eax, si
mov dword [esp], eax
call sub.WS2_32.dll_ntohs
push ecx
mov word [ebx + 2], ax
jmp 0x67345e34
mov dword [ebp - 0x24], pe_nt_image_headers32
lea edx, [ebp - 0x1a8]
mov ecx, pe_nt_image_headers32
xor eax, eax
mov edi, edx
rep stosb byte es:[edi], al
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x340]
mov dword [esp], edx
call sub.WS2_32.dll_getsockname
sub esp, 0xc
test eax, eax
js 0x67346178
movzx esi, si
mov dword [esp + 8], esi
mov dword [esp + 4], str.Local_port:__hu_n
mov edx, dword [ebp - 0x348]
mov dword [esp], edx
call fcn.673471e0
mov ecx, dword [ebp - 0x34c]
mov byte [ecx + 0x143], 1
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call fcn.67353a48
mov edx, dword [ebp - 0x34c]
cmp dword [edx + 0x70], 1
je 0x673461c0
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x340]
call fcn.67345894
test al, al
jne 0x6734642d
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x344]
mov dword [edx + 0x8504], eax
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x34c]
mov dword [esp], ecx
call fcn.673534dc
mov dword [esp + 8], eax
mov dword [esp + 4], 0x67396bad
mov esi, dword [ebp - 0x344]
mov dword [esp], esi
call fcn.673471e0
mov eax, dword [ebp - 0x340]
mov dword [esp], eax
call sub.WS2_32.dll_closesocket
push edx
mov dword [ebp - 0x340], 0xffffffff
mov eax, dword [ebp - 0x340]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp], esi
call sub.WS2_32.dll_closesocket
push ecx
mov dword [ebp - 0x340], 0xffffffff
mov eax, dword [ebp - 0x340]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov ecx, dword [ebp - 0x34c]
mov ebx, dword [ecx]
movzx eax, byte [ebx + 0x2c6]
mov dword [ebp - 0x24], eax
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov esi, dword [ebp - 0x340]
mov dword [esp], esi
call sub.WS2_32.dll_setsockopt
sub esp, 0x14
test eax, eax
js 0x6734626c
mov dword [esp + 4], str.TCP_NODELAY_set_n
mov dword [esp], ebx
call fcn.673471e0
jmp 0x67345d5c
mov dword [esp + 0xc], 0x100
lea edi, [ebp - 0x338]
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x354]
mov dword [esp], ecx
mov dword [ebp - 0x35c], edx
call fcn.67353a74
test eax, eax
mov edx, dword [ebp - 0x35c]
je 0x6734629c
mov eax, dword [ebp - 0x354]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov edx, dword [ebp - 0x348]
mov dword [esp], edx
call fcn.673471e0
cmp dword [ebp - 0x354], 2
jne 0x67345e30
lea eax, [ebx + 4]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], 2
call fcn.67353a7c
test eax, eax
jle 0x67345e30
mov word [ebx], 2
movzx eax, si
mov dword [esp], eax
call sub.WS2_32.dll_htons
push edx
mov word [ebx + 2], ax
mov edi, 0x10
jmp 0x67345e34
call sub.WS2_32.dll_WSAGetLastError
mov ebx, eax
mov edx, dword [ebp - 0x348]
mov dword [edx + 0x8504], eax
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x34c]
mov dword [esp], ecx
call fcn.673534dc
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.bind_failed_with_errno__d:__s
mov esi, dword [ebp - 0x348]
mov dword [esp], esi
call fcn.67346d80
mov edx, dword [ebp - 0x340]
mov dword [esp], edx
call sub.WS2_32.dll_closesocket
push eax
mov dword [ebp - 0x340], 0xffffffff
mov eax, dword [ebp - 0x340]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x33c]
mov dword [esp], eax
call sub.WS2_32.dll_socket
sub esp, 0xc
mov dword [ebp - 0x340], eax
jmp 0x67345caf
test si, si
je 0x67345f02
mov ecx, pe_nt_image_headers32
mov edi, ebx
rep stosb byte es:[edi], al
jmp 0x67345e23
call sub.WS2_32.dll_WSAGetLastError
mov ebx, eax
mov ecx, dword [ebp - 0x348]
mov dword [ecx + 0x8504], eax
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x34c]
mov dword [esp], esi
call fcn.673534dc
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.getsockname___failed_with_errno__d:__s
mov eax, dword [ebp - 0x348]
mov dword [esp], eax
call fcn.67346d80
jmp 0x67346113
mov eax, dword [ebp - 0x22c]
mov dword [esp + 8], eax
lea ecx, [ebp - 0x228]
mov dword [esp + 4], ecx
mov esi, dword [ebp - 0x340]
mov dword [esp], esi
call sub.WS2_32.dll_connect
sub esp, 0xc
mov ebx, eax
cmp eax, 0xffffffff
jne 0x67346227
call sub.WS2_32.dll_WSAGetLastError
mov dword [ebp - 0x1c], eax
cmp eax, 0xb
je 0x6734620e
jl 0x673463c0
lea edx, [eax - 0x2733]
cmp edx, 1
ja 0x673463c0
mov ecx, dword [ebp - 0x350]
mov edx, dword [ebp - 0x340]
mov eax, dword [ebp - 0x34c]
call fcn.673457f8
mov ebx, eax
cmp ebx, 1
jne 0x673463a3
mov eax, dword [ebp - 0x344]
cmp dword [eax + 0x4b8], 2
je 0x67345f92
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x340]
call fcn.67345894
mov dword [esp + 4], str.Timeout_n
mov ecx, dword [ebp - 0x344]
mov dword [esp], ecx
call fcn.673471e0
jmp 0x67345f79
call sub.WS2_32.dll_WSAGetLastError
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
call fcn.673534dc
mov dword [esp + 8], eax
mov dword [esp + 4], str.Could_not_set_TCP_NODELAY:__s_n
mov dword [esp], ebx
call fcn.673471e0
jmp 0x67345d5c
mov ecx, dword [ebp - 0x348]
mov ecx, dword [ecx + 0x27c]
mov dword [ebp - 0x358], ecx
cmp dword [ebp - 0x354], 2
je 0x67346418
lea ecx, [ebp - 0x20]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
mov dword [ebp - 0x35c], edx
mov dword [ebp - 0x360], ecx
call fcn.6734750c
dec eax
mov edx, dword [ebp - 0x35c]
mov ecx, dword [ebp - 0x360]
je 0x67346466
mov ecx, dword [ebp - 0x358]
mov eax, dword [ebp - 0x348]
mov dword [eax + 0x27c], ecx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x67346384
mov dword [esp + 8], 0x100
mov dword [esp + 4], edi
mov eax, dword [eax]
mov dword [esp], eax
mov dword [ebp - 0x35c], edx
call fcn.6734735c
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
mov eax, dword [ebp - 0x354]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x35c]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Name__s_family__i_resolved_to__s_family__i_n
mov edx, dword [ebp - 0x348]
mov dword [esp], edx
call fcn.673471e0
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x348]
mov dword [esp], ecx
call fcn.67347774
jmp 0x67346084
mov dword [esp + 8], edx
mov dword [esp + 4], str.Couldnt_bind_to__s
mov esi, dword [ebp - 0x348]
mov dword [esp], esi
call fcn.67346d80
jmp 0x67346113
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x340]
call fcn.67345894
test ebx, ebx
jne 0x67345f3e
jmp 0x67345f36
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
call fcn.673534dc
mov dword [esp + 0xc], eax
lea edx, [ebp - 0xa4]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Failed_to_connect_to__s:__s
mov ecx, dword [ebp - 0x344]
mov dword [esp], ecx
call fcn.67346d80
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x344]
mov dword [esi + 0x8504], eax
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x340]
call fcn.67345894
jmp 0x67345f3e
mov eax, dword [ebp - 0x348]
mov dword [eax + 0x27c], 1
jmp 0x673462bb
mov edx, dword [ebp + 8]
mov byte [edx], 1
mov dword [esp + 4], str.connected_n
mov ecx, dword [ebp - 0x344]
mov dword [esp], ecx
call fcn.673471e0
mov esi, dword [ebp - 0x340]
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x34c]
mov dword [esp], eax
call fcn.673459ec
jmp 0x67345f92
mov dword [esp + 4], ecx
mov ecx, dword [ebp - 0x34c]
mov dword [esp], ecx
call fcn.67353b6c
mov edx, dword [ebp - 0x35c]
jmp 0x673462fb