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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c64
call fcn.00404904
push esi
push edi
push dword [ebp + 8]
call sub.CRTDLL.DLL_strlen
add esp, 4
mov edi, eax
add edi, 0x14
mov dword [ebp - 0x2b18], edi
mov dword [ebp - 0x2b1c], 0
push 0x200
lea edi, [ebp - 0x2b14]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x2800
lea edi, [ebp - 0x2804]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
push 0x100
lea edi, [ebp - 0x2904]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x40295d
imul edi, dword [ebp + 0x14], 0x61c
mov esi, dword [ebp - 4]
mov dword [edi + 0x4068e8], esi
mov word [ebp - 0x2914], 2
push 0x35
call sub.wsock32.dll_htons
mov edi, eax
mov word [ebp - 0x2912], di
push 0x800
call sub.CRTDLL.DLL_malloc
add esp, 4
mov dword [ebp - 0x2c28], eax
mov dword [ebp - 0x2c34], 0x800
push 4
lea edi, [ebp - 0x2c24]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
lea edi, [ebp - 0x2c34]
push edi
push dword [ebp - 0x2c28]
call sub.iphlpapi.DLL_GetNetworkParams
mov dword [ebp - 0x2c38], eax
cmp dword [ebp - 0x2c38], 0
je 0x40251e
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402983
push str.212.5.86.163
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x2910], eax
mov edi, dword [ebp - 0x2c28]
add edi, 0x10c
mov dword [ebp - 0x2c24], edi
jmp 0x402573
cmp dword [ebp - 0x2c24], 0
je 0x402560
mov edi, dword [ebp - 0x2c24]
add edi, 4
push edi
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x2910], eax
mov edi, dword [ebp - 0x2c24]
mov edi, dword [edi]
mov dword [ebp - 0x2c24], edi
cmp dword [ebp - 0x2c24], 0
jne 0x402542
mov dword [ebp - 0x2c30], 0
mov dword [ebp - 0x2c2c], 1
lea edi, [ebp - 0x2c2c]
push edi
mov edi, 0x80040000
or edi, 0x6600
or edi, 0x7e
push edi
push dword [ebp - 4]
call sub.wsock32.dll_ioctlsocket
push 0x10
lea edi, [ebp - 0x2914]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_connect
cmp eax, 0xffffffff
jne 0x40268a
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x40268a
mov dword [ebp - 0x2c20], 0
mov dword [ebp - 0x2c44], 0
jmp 0x402608
mov edi, dword [ebp - 0x2c44]
mov esi, dword [ebp - 4]
cmp dword [ebp + edi*4 - 0x2c1c], esi
jne 0x402602
jmp 0x402616
inc dword [ebp - 0x2c44]
mov edi, dword [ebp - 0x2c20]
cmp dword [ebp - 0x2c44], edi
jb 0x4025ee
mov edi, dword [ebp - 0x2c20]
cmp dword [ebp - 0x2c44], edi
jne 0x402643
cmp dword [ebp - 0x2c20], 0x40
jae 0x402643
mov edi, dword [ebp - 0x2c44]
mov esi, dword [ebp - 4]
mov dword [ebp + edi*4 - 0x2c1c], esi
inc dword [ebp - 0x2c20]
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x2c40], eax
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
cdq
idiv ecx
imul edi, edx, 0x3e8
mov dword [ebp - 0x2c3c], edi
lea edi, [ebp - 0x2c40]
push edi
push 0
lea edi, [ebp - 0x2c20]
push edi
push 0
push 0
call sub.wsock32.dll_select
mov dword [ebp - 0x2c30], eax
mov dword [ebp - 0x2c2c], 0
lea edi, [ebp - 0x2c2c]
push edi
mov edi, 0x80040000
or edi, 0x6600
or edi, 0x7e
push edi
push dword [ebp - 4]
call sub.wsock32.dll_ioctlsocket
cmp dword [ebp - 0x2c30], 0
jle 0x40294e
lea edi, [ebp - 0x2b14]
push edi
push dword [ebp + 8]
call fcn.00402987
add esp, 8
cmp eax, 0
je 0x4026e8
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402983
push 0
push dword [ebp - 0x2b18]
lea edi, [ebp - 0x2b14]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_send
cmp eax, 0xffffffff
jne 0x402716
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402983
push 0
push 0x27ff
lea edi, [ebp - 0x2804]
push edi
push dword [ebp - 4]
call sub.wsock32.dll_recv
mov dword [ebp - 0x2b1c], eax
cmp dword [ebp - 0x2b1c], 0
jne 0x40274d
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402983
push 0xc
lea edi, [ebp - 0x2c62]
push edi
call sub.KERNEL32.DLL_RtlZeroMemory
lea edi, [ebp - 0x2802]
mov dword [ebp - 0x2c44], edi
push 0xc
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c62]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
movzx edi, word [ebp - 0x2c5c]
push edi
call sub.wsock32.dll_ntohs
mov edi, eax
and edi, 0xffff
mov dword [ebp - 0x2c54], edi
cmp dword [ebp - 0x2c54], 0
jne 0x4027b4
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402983
mov word [ebp - 0x2c56], 0
mov edi, dword [ebp - 0x2b18]
lea edi, [ebp + edi - 0x2804]
mov dword [ebp - 0x2c44], edi
mov dword [ebp - 0x2c4c], 0
jmp 0x40293a
push 0xff
lea edi, [ebp - 0x2904]
push edi
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2804]
push edi
call fcn.00402b34
add esp, 0x10
mov edi, eax
add edi, dword [ebp - 0x2c44]
mov dword [ebp - 0x2c44], edi
push 2
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c4e]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
add dword [ebp - 0x2c44], 8
push 2
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c46]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
movsx edi, word [ebp - 0x2c46]
and edi, 0xffff
push edi
call sub.wsock32.dll_ntohs
mov edi, eax
and edi, 0xffff
mov word [ebp - 0x2c46], di
add dword [ebp - 0x2c44], 2
cmp word [ebp - 0x2c4e], 0xf00
jne 0x402921
push 2
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2c64]
push edi
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
movsx edi, word [ebp - 0x2c64]
and edi, 0xffff
push edi
call sub.wsock32.dll_ntohs
mov edi, eax
and edi, 0xffff
mov word [ebp - 0x2c64], di
add dword [ebp - 0x2c44], 2
push 0xff
lea edi, [ebp - 0x2904]
push edi
push dword [ebp - 0x2c44]
lea edi, [ebp - 0x2804]
push edi
call fcn.00402b34
add esp, 0x10
mov edi, eax
add edi, dword [ebp - 0x2c44]
mov dword [ebp - 0x2c44], edi
mov di, word [ebp - 0x2c64]
cmp di, word [ebp - 0x2c56]
jle 0x402934
mov di, word [ebp - 0x2c64]
mov word [ebp - 0x2c56], di
push 0xff
lea edi, [ebp - 0x2904]
push edi
push dword [ebp + 0xc]
call sub.CRTDLL.DLL_strncpy
add esp, 0xc
jmp 0x402934
movsx edi, word [ebp - 0x2c46]
add edi, dword [ebp - 0x2c44]
mov dword [ebp - 0x2c44], edi
inc dword [ebp - 0x2c4c]
mov edi, dword [ebp - 0x2c54]
cmp dword [ebp - 0x2c4c], edi
jl 0x4027df
jmp 0x402964
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
mov eax, 1
jmp 0x402983
mov eax, 1
jmp 0x402983
push dword [ebp - 4]
call sub.wsock32.dll_closesocket
imul edi, dword [ebp + 0x14], 0x61c
mov dword [edi + 0x4068e8], 0
mov eax, 0
pop edi
pop esi
leave
ret