Function at 0x410670
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov esi, dword [ebp + 0xc]
mov dword [esp + 8], 0x9f
mov dword [esp + 4], 0x410540
mov dword [esp], 0x40ff00
call sym._updatecontext_f
cmp dword [0x438d04], 2
jg 0x410a92
mov dword [esp + 0x10], 0xc5
mov dword [esp + 0xc], 0x40ff00
mov dword [esp + 8], 0x410540
mov dword [esp + 4], 0x844
mov dword [esp], 0x438cf8
call sym._irlist_add2
mov dword [esp], esi
mov ebx, eax
mov dword [esp + 0x10], 0xc7
mov dword [esp + 0xc], 0x40ff00
mov dword [esp + 8], 0x410540
mov dword [esp + 4], 7
call sym._getpart2
mov dword [ebp - 0x40], eax
mov dword [esp], esi
mov dword [esp + 0x10], 0xc8
mov dword [esp + 0xc], 0x40ff00
mov dword [esp + 8], 0x410540
mov dword [esp + 4], 8
call sym._getpart2
mov edi, dword [ebp - 0x40]
mov esi, eax
test edi, edi
je 0x410a7a
test eax, eax
je 0x410a7a
cld
xor eax, eax
lea edi, [ebp - 0x28]
mov ecx, 4
rep stosd dword es:[edi], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket
mov dword [ebx + 4], eax
test eax, eax
js 0x410a4c
mov dword [esp], esi
call sym._strlen
mov byte [eax + esi - 1], 0
mov word [ebp - 0x28], 2
mov dword [esp], esi
call sym._atoi
movzx eax, ax
xchg ah, al
mov word [ebp - 0x26], ax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._atoul
mov dword [esp], esi
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ebp - 0x24], eax
call sym._mydelete2
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._mydelete2
mov edx, dword [0x438a34]
test edx, edx
je 0x41080a
cld
xor eax, eax
lea edi, [ebp - 0x38]
mov ecx, 4
rep stosd dword es:[edi], eax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x38]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov dword [esp + 4], eax
mov dword [ebp - 0x34], edx
mov eax, dword [ebx + 4]
mov word [ebp - 0x38], 2
mov word [ebp - 0x36], 0
mov dword [esp], eax
call sym._bind
test eax, eax
js 0x410a2c
mov dword [esp + 4], 1
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sym._set_socket_nonblocking
test eax, eax
js 0x410a13
mov dword [esp], 5
call sym._alarm
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sym._connect
test eax, eax
js 0x4109da
mov dword [esp], 0
call sym._alarm
mov dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x3c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sym._getsockname
test eax, eax
js 0x4109a5
mov ecx, dword [0x438d6c]
test ecx, ecx
jle 0x4108bc
mov eax, dword [ebx + 4]
mov dword [esp + 0xc], 0x41054d
mov dword [esp + 8], 0x21
mov dword [esp + 0x10], eax
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._ioutput
mov dword [ebx], 2
mov eax, dword [ebp + 8]
inc dword [0x438d04]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0x114
inc eax
mov dword [esp + 8], 0x40ff00
mov dword [esp + 4], 0x410540
mov dword [esp], eax
call sym._mycalloc2
mov dword [ebx + 0x40], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sym._strcpy
movzx edx, word [ebp - 0x26]
mov eax, dword [ebp - 0x24]
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ebx + 0x38], eax
mov eax, edx
xchg ah, al
movzx edx, ax
mov eax, dword [ebp - 0x34]
mov word [ebx + 0x34], dx
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ebx + 0x3c], eax
movzx eax, word [ebp - 0x36]
xchg ah, al
mov word [ebx + 0x36], ax
mov eax, dword [0x438d08]
mov dword [ebx + 0x30], eax
mov eax, dword [0x438d08]
mov dword [ebx + 0x2c], eax
mov dword [esp + 0x24], edx
movzx eax, byte [ebx + 0x38]
mov dword [esp + 0x20], eax
movzx eax, byte [ebx + 0x39]
mov dword [esp + 0x1c], eax
movzx eax, byte [ebx + 0x3a]
mov dword [esp + 0x18], eax
movzx eax, byte [ebx + 0x3b]
mov dword [esp + 0xc], 0x410570
mov dword [esp + 8], 0x23
mov dword [esp + 4], 4
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp], 0
mov dword [esp + 0x10], eax
call sym._ioutput
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4105b7
mov dword [esp], 1
call sym._outerror
mov dword [ebx + 4], 0
mov eax, 1
jmp 0x41099d
call sym.___errno
cmp dword [eax], 0x77
je 0x410853
call sym.___errno
cmp dword [eax], 0xb
je 0x410853
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x4105f0
jmp 0x4109c0
mov dword [esp + 4], 0x41035a
mov dword [esp], 2
call sym._outerror
jmp 0x410825
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x410630
jmp 0x4109c0
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x410652
mov dword [esp], 1
call sym._outerror
mov dword [ebx + 4], 0
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._mydelete2
mov dword [esp], esi
call sym._mydelete2
jmp 0x4109d3
mov dword [esp], 0x438cf8
call sym._irlist_get_head
test eax, eax
mov ebx, eax
je 0x410acd
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebx]
test eax, eax
je 0x410abf
cmp eax, 4
jne 0x410b6a
mov dword [esp], ebx
call sym._irlist_get_next
test eax, eax
mov ebx, eax
jne 0x410ab0
mov dword [esp], 0x438cf8
call sym._irlist_get_head
test eax, eax
mov ebx, eax
je 0x410af4
nop
mov eax, dword [ebx]
test eax, eax
jne 0x410b3c
mov dword [esp], ebx
call sym._irlist_get_next
test eax, eax
mov ebx, eax
jne 0x410ae0
mov dword [esp], 0x438cf8
call sym._irlist_get_head
mov dword [esp], eax
mov ebx, eax
mov dword [esp + 8], 0x40ffd0
mov dword [esp + 4], 0
call sym._writedccchat
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._shutdowndccchat
cmp dword [0x438d04], 2
jg 0x410a92
jmp 0x4106a5
mov dword [esp + 8], 0x40ffd0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._writedccchat
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._shutdowndccchat
test ebx, ebx
jne 0x410b2a
jmp 0x410af4
mov dword [esp + 8], 0x40ffd0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._writedccchat
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._shutdowndccchat
test ebx, ebx
jne 0x410b2a
jmp 0x410acd