Function at 0x46f420
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1b4
mov eax, dword [0x61900c]
xor eax, esp
mov dword [esp + 0x1b0], eax
push ebx
push esi
push edi
lea eax, [esp + 0x28]
mov dword [esp + 0x14], edx
push eax
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x46f497
push str.WSAStartup___failed_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xa3
push 2
call fcn.0048c22c
add esp, 4
push eax
call fcn.00401300
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.0048485e
mov esp, ebp
pop ebp
ret
push esi
call fcn.0049abbe
mov esi, eax
add esp, 4
test esi, esi
jne 0x46f4c0
push str.out_of_memory_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xa8
jmp 0x46f46c
push 0x3a
push esi
call fcn.00487b60
mov edi, eax
add esp, 8
test edi, edi
je 0x46f693
cmp edi, esi
je 0x46f693
push 0xa
lea eax, [esp + 0x14]
mov byte [edi], 0
push eax
inc edi
push edi
call fcn.00499640
add esp, 0xc
mov ebx, eax
cmp byte [edi], 0
je 0x46f678
mov ecx, dword [esp + 0x10]
cmp byte [ecx], 0
jne 0x46f678
test ebx, ebx
je 0x46f678
cmp ebx, 0xffff
ja 0x46f678
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
push esi
test edi, edi
jne 0x46f548
push str.unknown_host__s_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xc0
jmp 0x46f6ac
call fcn.00495b38
add esp, 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
jns 0x46f5d5
push 0
push 0
lea eax, [esp + 0x14]
push eax
push 0x400
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0xc]
push str.cannot_open_socket:__s_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xd2
push 2
call fcn.0048c22c
add esp, 4
push eax
call fcn.00401300
add esp, 0x20
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.0048485e
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov eax, 2
push ebx
movlpd qword [esp + 0x24], xmm0
mov word [esp + 0x1c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
mov eax, dword [edi + 0xc]
push 0x10
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x46f654
push 0
push 0
lea eax, [esp + 0x14]
push eax
push 0x400
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [esp + 0xc]
push str.connect_failed:__s_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xe7
jmp 0x46f5a0
mov eax, dword [esp + 0x14]
mov byte [0x61c855], 1
mov dword [eax], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b0]
xor ecx, esp
call fcn.0048485e
mov esp, ebp
pop ebp
ret
push edi
push str.bad_port_number__s_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xba
jmp 0x46f6ac
push esi
push str.mangled_host:port_string__s_n
push 0xfffffffffffffffe
push 0x4f
push str.net_open
push str.D:_a_avrdude_avrdude_src_ser_win32.c
push 0xad
push 2
call fcn.0048c22c
add esp, 4
push eax
call fcn.00401300
push esi
call fcn.00495b38
mov ecx, dword [esp + 0x1e0]
add esp, 0x24
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0048485e
mov esp, ebp
pop ebp
ret