Function at 0x40f910
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
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 8]
mov dword [esp], 0x40f190
mov dword [esp + 4], 0x40f810
mov dword [esp + 8], 0x8b
call sym._updatecontext_f
cmp dword [0x431bbc], 0x3e8
je 0x40f9c8
mov dword [esp], 0x40f1b0
call sym._writedccchat
mov dword [esp], 0x40f1d2
call sym._writedccchat
mov dword [esp], 0
mov dword [esp + 4], 1
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0x40f1d7
call sym._ioutput
mov eax, 0xfffffffe
mov esi, dword [0x431bbc]
mov dword [esp], 0x186a0
mov ecx, esi
shr esi, 5
and ecx, 0x1f
rol eax, cl
and dword [esi*4 + 0x431bdc], eax
call sym._usleep
mov eax, dword [0x431bbc]
mov dword [esp], eax
call sym._close
mov eax, 0x3e8
mov dword [0x431bbc], eax
call sym._highestsock
mov dword [esp], ebx
mov dword [esp + 4], 7
mov dword [esp + 8], 0x40f810
mov dword [esp + 0xc], 0x40f190
mov dword [esp + 0x10], 0x98
call sym._getpart2
mov dword [ebp - 0x40], eax
mov dword [esp], ebx
mov dword [esp + 4], 8
mov dword [esp + 8], 0x40f810
mov dword [esp + 0xc], 0x40f190
mov dword [esp + 0x10], 0x99
call sym._getpart2
mov edi, eax
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40fd10
test edi, edi
je 0x40fd10
mov dword [esp], 0
mov dword [esp + 4], 3
mov dword [esp + 8], 0x23
mov dword [esp + 0xc], 0x40f81d
call sym._ioutput
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [esp], 2
mov dword [esp + 4], 1
mov dword [esp + 8], 0
call sym._socket
mov dword [0x431bbc], eax
test eax, eax
js 0x40fd80
mov dword [esp], edi
call sym._strlen
mov byte [eax + edi - 1], 0
mov word [ebp - 0x28], 2
mov dword [esp], edi
call sym._atoi
movzx edx, ax
mov eax, dword [ebp - 0x40]
xchg dh, dl
mov word [ebp - 0x26], dx
mov dword [esp], eax
call sym._atoul
xchg ah, al
ror eax, 0x10
xchg ah, al
mov dword [ebp - 0x24], eax
mov eax, dword [0x43123c]
test eax, eax
je 0x40fb4e
mov eax, dword [0x431240]
test eax, eax
je 0x40fd5d
mov dword [ebp - 0x38], 0
lea ebx, [ebp - 0x38]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x38], 2
mov word [ebp - 0x36], 0
mov dword [esp], eax
call sym._gethostbyname
test eax, eax
je 0x40fd4c
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 8], 0x10
mov dword [esp + 4], ebx
mov dword [ebp - 0x34], eax
mov eax, dword [0x431bbc]
mov dword [esp], eax
call sym._bind
test eax, eax
js 0x40fd3b
mov dword [esp], 0xa
lea ebx, [ebp - 0x28]
call sym._alarm
mov dword [esp + 8], 0x10
mov eax, dword [0x431bbc]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._connect
test eax, eax
js 0x40fd2a
mov dword [esp], 0
call sym._alarm
lea ecx, [ebp - 0x3c]
mov eax, dword [0x431bbc]
mov dword [ebp - 0x3c], 0x10
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 8], ecx
call sym._getsockname
test eax, eax
js 0x40fcec
mov ebx, dword [0x431c04]
test ebx, ebx
jne 0x40fcba
call sym._highestsock
mov dword [esp + 0xc], 0xeb
mov dword [esp], 0x200
mov dword [esp + 4], 0x40f810
mov dword [esp + 8], 0x40f190
call sym._mycalloc2
mov dword [esp], 0x200
mov ebx, eax
mov dword [esp + 4], 0x40f810
mov dword [esp + 8], 0x40f190
mov dword [esp + 0xc], 0xec
call sym._mycalloc2
mov dword [esp], eax
mov esi, eax
mov eax, dword [0x4311fc]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
call sym._getuptime
mov eax, dword [0x43130c]
mov dword [esp], ebx
mov dword [esp + 4], 0x1fe
mov dword [esp + 0xc], eax
mov eax, dword [0x4311f8]
mov dword [esp + 8], 0x40f530
mov dword [esp + 0x10], 0x40f582
mov dword [esp + 0x14], 0x40f58c
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
call sym._snprintf
mov dword [esp], ebx
call sym._strlen
mov ecx, dword [0x431bbc]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], ecx
call sym._write
mov dword [esp], ebx
call sym._mydelete2
mov dword [esp], esi
call sym._mydelete2
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._mydelete2
mov dword [esp], edi
xor edi, edi
call sym._mydelete2
mov dword [0x431bc0], edi
xor eax, eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0
mov eax, dword [0x431bbc]
mov dword [esp + 4], 1
mov dword [esp + 8], 0x21
mov dword [esp + 0xc], 0x40f830
mov dword [esp + 0x10], eax
call sym._ioutput
jmp 0x40fbbf
mov dword [esp], 1
mov dword [esp + 4], 0x40f844
nop
lea esi, [esi]
mov esi, 0x3e8
call sym._outerror
mov dword [0x431bbc], esi
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym._mydelete2
mov dword [esp], edi
call sym._mydelete2
mov eax, 1
jmp 0x40fcb2
mov dword [esp], 1
mov dword [esp + 4], 0x40f85b
jmp 0x40fd00
mov dword [esp], 1
mov dword [esp + 4], 0x40f879
jmp 0x40fd00
mov dword [esp], 1
mov dword [esp + 4], 0x40f897
jmp 0x40fd00
mov dword [esp], 0
mov dword [esp + 4], 0x40f8d0
call sym._outerror
mov eax, dword [0x431240]
jmp 0x40fae8
mov dword [esp], 1
mov dword [esp + 4], 0x40f8f4
jmp 0x40fd00