Function at 0x40d450
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw 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, 0x5c
mov ebx, dword [ebp + 8]
mov dword [esp + 8], 0x9d
mov dword [esp + 4], 0x40d373
mov dword [esp], 0x40ccc0
call sym._updatecontext_f
cmp dword [0x431498], 0x1fe
je 0x40d51d
mov dword [esp], 0x40ccf0
call sym._writedccchat
mov dword [esp], 0x40cd12
call sym._writedccchat
mov dword [esp + 0xc], 0x40cd17
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._ioutput
mov dword [esp], 0x186a0
mov ecx, dword [0x431498]
mov eax, 0xfffffffe
mov edx, ecx
and ecx, 0x1f
shr edx, 5
rol eax, cl
and dword [edx*4 + 0x4314c0], eax
call sym._usleep
mov dword [esp + 4], 2
mov eax, dword [0x431498]
mov dword [esp], eax
call sym._shutdown
mov eax, dword [0x431498]
mov dword [esp], eax
call sym._close
mov eax, 0x1fe
mov dword [0x431498], eax
call sym._highestsock
mov dword [esp], ebx
mov dword [esp + 0x10], 0xb0
mov dword [esp + 0xc], 0x40ccc0
mov dword [esp + 8], 0x40d373
mov dword [esp + 4], 7
call sym._getpart2
mov dword [esp], ebx
mov esi, eax
mov dword [esp + 0x10], 0xb1
mov dword [esp + 0xc], 0x40ccc0
mov dword [esp + 8], 0x40d373
mov dword [esp + 4], 8
call sym._getpart2
test esi, esi
mov ebx, eax
je 0x40d8e0
test eax, eax
je 0x40d8e0
mov dword [esp + 0xc], 0x40d380
lea edi, [ebp - 0x28]
mov dword [esp + 8], 0x23
mov dword [esp + 4], 3
mov dword [esp], 0
call sym._ioutput
cld
xor eax, eax
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 [0x431498], eax
test eax, eax
js 0x40d8a1
mov dword [esp], ebx
call sym._strlen
mov byte [eax + ebx - 1], 0
mov word [ebp - 0x28], 2
mov dword [esp], ebx
call sym._atoi
mov dword [esp], ebx
movzx eax, ax
xchg ah, al
mov word [ebp - 0x26], ax
call sym._mydelete2
mov dword [esp], esi
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 edx, dword [0x431260]
test edx, edx
je 0x40d672
cld
xor eax, eax
lea edi, [ebp - 0x38]
mov ecx, 4
rep stosd dword es:[edi], eax
mov word [ebp - 0x38], 2
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [0x431498]
xchg dh, dl
ror edx, 0x10
xchg dh, dl
mov word [ebp - 0x36], 0
mov dword [ebp - 0x34], edx
mov dword [esp + 8], 0x10
mov dword [esp], eax
call sym._bind
test eax, eax
js 0x40d884
mov dword [esp], 5
call sym._alarm
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [0x431498]
mov dword [esp], eax
call sym._connect
test eax, eax
js 0x40d867
mov dword [esp], 0
call sym._alarm
mov dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x3c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [0x431498]
mov dword [esp], eax
call sym._getsockname
test eax, eax
js 0x40d818
mov ecx, dword [0x43151c]
test ecx, ecx
jle 0x40d70f
mov dword [esp + 0xc], 0x40d393
mov eax, dword [0x431498]
mov dword [esp + 8], 0x21
mov dword [esp + 4], 1
mov dword [esp + 0x10], eax
mov dword [esp], 0
call sym._ioutput
call sym._highestsock
mov dword [esp + 0xc], 0xf3
mov dword [esp + 8], 0x40ccc0
mov dword [esp + 4], 0x40d373
mov dword [esp], 0x200
call sym._mycalloc2
mov dword [esp + 0xc], 0xf4
mov ebx, eax
mov dword [esp + 8], 0x40ccc0
mov dword [esp + 4], 0x40d373
mov dword [esp], 0x200
call sym._mycalloc2
mov dword [esp + 0xc], 0x200
mov esi, eax
mov eax, dword [0x43125c]
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._getuptime
mov dword [esp + 0x18], esi
mov eax, dword [0x431250]
mov edx, 0x40d036
test eax, eax
jne 0x40d799
mov edx, dword [0x43124c]
mov dword [esp + 0x14], edx
test eax, eax
mov edx, 0x40d036
jne 0x40d7ab
mov edx, 0x40d037
mov dword [esp + 0x10], edx
mov eax, dword [0x431328]
test eax, eax
jne 0x40d7bd
mov eax, 0x40d03b
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x40d050
mov dword [esp + 4], 0x1ff
mov dword [esp], ebx
call sym._snprintf
mov dword [esp], ebx
call sym._strlen
mov dword [esp + 8], eax
mov eax, dword [0x431498]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._write
mov dword [esp], ebx
call sym._mydelete2
mov dword [esp], esi
call sym._mydelete2
xor edx, edx
xor eax, eax
mov dword [0x43149c], edx
add esp, 0x5c
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], 0x40d3a7
lea esi, [esi]
lea edi, [edi]
mov dword [esp], 1
mov ebx, 0x1fe
call sym._outerror
mov dword [0x431498], ebx
mov esi, esi
lea edi, [edi]
mov eax, 1
jmp 0x40d810
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40d3d0
jmp 0x40d840
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40d410
jmp 0x40d840
call sym.___errno
mov eax, dword [eax]
mov edi, 0x1fe
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40d432
mov dword [esp], 1
call sym._outerror
mov dword [0x431498], edi
lea esi, [esi]
lea edi, [edi]
mov dword [esp], esi
call sym._mydelete2
mov dword [esp], ebx
call sym._mydelete2
jmp 0x40d860