Function at 0x404ce0
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x294
mov ecx, dword [0x411360]
mov eax, dword [str.GSND_REQ]
mov dword [esp + 0x45], ecx
mov ecx, dword [esp + 0x298]
mov dword [esp + 0x41], eax
mov eax, ecx
shl eax, 6
sub eax, ecx
push esi
push edi
mov word [esp + 0x51], 0
lea edx, [eax + eax*4]
mov dword [esp + 0x59], GetEnvironmentVariableA
lea eax, [ecx + edx*4]
lea edx, [esp + 0x3c]
lea edi, [eax + eax*8]
mov eax, dword [0x414798]
shl edi, 1
sub edi, ecx
shl edi, 1
add eax, edi
push eax
push edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x4d], ecx
call fcn.00403b50
add esp, 8
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x404d65
call sub.WSOCK32.dll_WSAGetLastError
pop edi
xor eax, eax
pop esi
add esp, 0x294
ret
xor eax, eax
mov dword [esp + 0x24], eax
mov word [esp + 0x24], 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
push eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], eax
call sub.WSOCK32.dll_htons
lea ecx, [esp + 0x24]
push 0x10
push ecx
push esi
mov word [esp + 0x32], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x404f65
lea edx, [esp + 0x34]
push 4
push edx
push 0x20
push 0xffff
push esi
mov dword [esp + 0x48], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x404f65
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 1
push eax
push 0x8004667e
push esi
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x404f65
xor ecx, ecx
push 0x11eb
mov dword [esp + 0x14], ecx
mov word [esp + 0x14], 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
call sub.WSOCK32.dll_htons
lea edx, [esp + 8]
mov word [esp + 0x12], ax
push edx
call fcn.00407159
lea eax, [esp + 0x10]
push eax
call fcn.00407159
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
add ecx, 3
add esp, 8
cmp ecx, eax
jle 0x404e92
lea edx, [esp + 8]
push edx
call fcn.00407159
add esp, 4
lea eax, [esp + 0x10]
lea ecx, [esp + 0x3c]
push 0x10
push eax
push 0
push 0x135
push ecx
push esi
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x404e7c
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x404f6a
jmp 0x404e83
cmp eax, 0x135
je 0x404e92
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
add edx, 3
cmp edx, eax
jg 0x404e3f
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
add eax, 3
cmp eax, ecx
jle 0x404f6a
lea ecx, [esp + 8]
push ecx
call fcn.00407159
lea edx, [esp + 0x10]
push edx
call fcn.00407159
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add eax, 3
add esp, 8
cmp eax, ecx
jle 0x404f6a
lea ecx, [esp + 8]
push ecx
call fcn.00407159
add esp, 4
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x174]
push edx
push eax
push 0
push 0x125
push ecx
push esi
mov dword [esp + 0x38], 0x10
call sub.WSOCK32.dll_recvfrom
cmp eax, 0xffffffff
je 0x404f15
test eax, eax
je 0x404f15
cmp eax, 0x125
je 0x404f41
jmp 0x404f21
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x404f6a
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
add edx, 3
cmp edx, eax
jg 0x404ecf
push esi
call sub.WSOCK32.dll_closesocket
pop edi
xor eax, eax
pop esi
add esp, 0x294
ret
mov eax, dword [0x414798]
push esi
mov dword [edi + eax + 0xb124], 1
call sub.WSOCK32.dll_closesocket
pop edi
mov eax, 1
pop esi
add esp, 0x294
ret
call sub.WSOCK32.dll_WSAGetLastError
push esi
call sub.WSOCK32.dll_closesocket
pop edi
xor eax, eax
pop esi
add esp, 0x294
ret