Function at 0x410000
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 8]
mov dword [esp + 8], 0xf
mov dword [esp + 4], 0x40fef0
mov dword [esp], 0x40ff00
call sym._updatecontext_f
cmp dword [0x438d04], 2
jg 0x410221
mov dword [esp + 0x10], 0x35
mov dword [esp + 0xc], 0x40ff00
mov dword [esp + 8], 0x40fef0
mov dword [esp + 4], 0x844
mov dword [esp], 0x438cf8
call sym._irlist_add2
mov dword [esp + 8], 0
mov ebx, eax
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket
mov dword [ebx + 4], eax
test eax, eax
js 0x410201
mov eax, dword [0x438acc]
test eax, eax
jne 0x4101cb
cld
xor eax, eax
lea edi, [ebp - 0x28]
mov ecx, 4
rep stosd dword es:[edi], eax
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov word [ebp - 0x28], 2
mov dword [esp], eax
call sym._ir_bind_listen_socket
test eax, eax
js 0x4101ae
mov dword [esp + 4], 1
movzx eax, word [ebp - 0x26]
xchg ah, al
movzx edi, ax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sym._listen
test eax, eax
js 0x410179
mov dword [ebx], 1
inc dword [0x438d04]
mov dword [esp], esi
call sym._strlen
mov dword [esp + 0xc], 0x5d
inc eax
mov dword [esp + 8], 0x40ff00
mov dword [esp + 4], 0x40fef0
mov dword [esp], eax
call sym._mycalloc2
mov dword [ebx + 0x40], eax
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x40]
mov dword [esp], eax
call sym._strcpy
mov word [ebx + 0x36], di
mov eax, dword [0x438d08]
mov dword [ebx + 0x30], eax
mov eax, dword [0x438d08]
mov dword [ebx + 0x2c], eax
mov eax, dword [0x438a58]
mov dword [ebx + 0x3c], eax
mov eax, dword [0x438a58]
mov dword [esp + 0xc], edi
mov dword [esp + 4], 0x40ff13
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._privmsg_fast
xor eax, eax
add esp, 0x4c
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], 0x40ff2a
mov dword [esp], 1
call sym._outerror
mov dword [ebx + 4], 0
mov eax, 1
jmp 0x410171
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40ff50
jmp 0x410194
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov eax, dword [ebx + 4]
mov dword [ebp - 0x2c], 1
mov dword [esp], eax
call sym._setsockopt
jmp 0x410097
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40ff90
jmp 0x410194
mov dword [esp], 0x438cf8
call sym._irlist_get_head
test eax, eax
mov ebx, eax
je 0x41025d
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebx]
test eax, eax
je 0x41024f
cmp eax, 4
jne 0x4102fa
mov dword [esp], ebx
call sym._irlist_get_next
test eax, eax
mov ebx, eax
jne 0x410240
mov dword [esp], 0x438cf8
call sym._irlist_get_head
test eax, eax
mov ebx, eax
je 0x410284
nop
mov edx, dword [ebx]
test edx, edx
jne 0x4102cc
mov dword [esp], ebx
call sym._irlist_get_next
test eax, eax
mov ebx, eax
jne 0x410270
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 0x410221
jmp 0x410035
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 0x4102ba
jmp 0x410284
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 0x4102ba
jmp 0x41025d