Function at 0x40a6c0
Capabilities:
Act as tcp client
Check os version
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40bd5b
push eax
mov dword fs:[0], esp
sub esp, 0x418
mov ecx, 0x80
xor eax, eax
push ebx
push esi
push edi
lea edi, [esp + 0x224]
push 6
push 1
rep stosd dword es:[edi], eax
push 2
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40a99d
lea eax, [esp + 0x10]
push 4
push eax
push 0x1005
mov esi, 0x1770
push 0xffff
push ebx
mov dword [esp + 0x24], esi
call sub.WSOCK32.dll_setsockopt
lea ecx, [esp + 0x10]
push 4
push ecx
push 0x1006
push 0xffff
push ebx
mov dword [esp + 0x24], esi
call sub.WSOCK32.dll_setsockopt
push 0x195
mov word [esp + 0x1c], 2
call sub.WSOCK32.dll_htons
push 0x40f4ec
mov word [esp + 0x1e], ax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x40a79e
push 0x40f4ec
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x40a99d
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
lea edi, [esp + 0x1c]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [eax + 8]
mov word [esp + 0x18], ax
lea ecx, [esp + 0x18]
push 0x10
push ecx
push ebx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x40a99d
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x2c]
lea edx, [esp + 0x28]
mov dword [esp + 0x28], 0x94
push edx
rep stosd dword es:[edi], eax
or esi, 0xffffffff
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
mov eax, dword [esp + 0x2c]
cmp eax, 5
jne 0x40a87c
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40a7f3
xor esi, esi
jmp 0x40a886
cmp eax, 1
jne 0x40a870
lea eax, [esp + 0x3c]
lea ecx, [esp + 0xc]
push eax
call fcn.0040b796
lea ecx, [esp + 0xc]
mov dword [esp + 0x42c], 0
call sub.MFC42.DLL_CString::FreeExtra
push str.Service
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find
test eax, eax
jl 0x40a855
push str.Pack
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find
test eax, eax
jl 0x40a855
push 0x40f2d4
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Find
test eax, eax
mov esi, 2
jge 0x40a85a
mov esi, 1
lea ecx, [esp + 0xc]
mov dword [esp + 0x42c], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x40a886
cmp eax, 2
jne 0x40a886
mov esi, 3
jmp 0x40a886
cmp eax, 6
jne 0x40a886
mov esi, 4
push ebp
push str.v2.0_build0801_
push esi
push 0x195
lea ecx, [esp + 0xcc]
push str._d:_d_s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0xd4]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
lea edx, [esp + 0xc4]
push ecx
push edx
push ebx
call sub.WSOCK32.dll_send
mov ebp, dword [sym.imp.KERNEL32.DLL_Sleep]
lea esi, [ebx + 1]
push 0
push 0
lea eax, [esp + 0x12c]
push 0
mov edi, 1
push eax
push esi
mov dword [esp + 0x13c], ebx
mov dword [esp + 0x138], edi
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
je 0x40a973
test eax, eax
je 0x40a973
lea ecx, [esp + 0x124]
push ecx
push ebx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x40a957
push 0
lea edx, [esp + 0x22c]
push 0x200
push edx
push ebx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x40a973
lea eax, [esp + 0x228]
push eax
call fcn.0040a020
add esp, 4
test eax, eax
je 0x40a957
push 0
push 2
push 0x40f2b4
push ebx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x40a973
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x228]
push 0x1f4
rep stosd dword es:[edi], eax
call ebp
jmp 0x40a8d3
lea ecx, [esp + 0x18]
push 4
push ecx
push 0x80
push 0xffff
push ebx
mov word [esp + 0x2c], di
mov word [esp + 0x2e], 0
call sub.WSOCK32.dll_setsockopt
push ebx
call sub.WSOCK32.dll_closesocket
pop ebp
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x424
ret