Function at 0x472970
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1dc
push edi
mov dword [ebp - 0x1dc], 1
mov dword [ebp - 4], 1
mov dword [ebp - 0x1c0], 0
mov ecx, 0xa
xor eax, eax
lea edi, [ebp - 0x1bc]
rep stosd dword es:[edi], eax
mov dword [0x518900], 3
mov dword [0x5284d4], 0
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x1c8], eax
cmp dword [ebp - 0x1c8], 0
je 0x4729e1
mov eax, dword [ebp - 0x1c8]
jmp 0x472c53
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x518904], eax
cmp dword [0x518904], 0xffffffff
jne 0x472a03
or eax, 0xffffffff
jmp 0x472c53
push 0x10
push 0
lea ecx, [ebp - 0x1d8]
push ecx
call fcn.004bde10
add esp, 0xc
mov word [ebp - 0x1d8], 2
mov dx, word [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1d6], ax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1d4], eax
push 4
lea ecx, [ebp - 0x1dc]
push ecx
push 1
push 6
mov edx, dword [0x518904]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x472a7b
mov eax, dword [0x518904]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xfffffffe
jmp 0x472c53
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x1c4], eax
cmp dword [ebp - 0x1c4], 0
jne 0x472aad
mov ecx, dword [0x518904]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xfffffffd
jmp 0x472c53
push 0x10
mov edx, dword [ebp - 0x1c4]
push edx
mov eax, dword [0x518904]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x472af0
mov ecx, dword [ebp - 0x1c4]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov edx, dword [0x518904]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xfffffffc
jmp 0x472c53
push 0x10
lea eax, [ebp - 0x1d8]
push eax
mov ecx, dword [0x518904]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x1c8], eax
cmp dword [ebp - 0x1c8], 0xffffffff
jne 0x472b4b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x472b4b
mov edx, dword [ebp - 0x1c4]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov eax, dword [0x518904]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xfffffffb
jmp 0x472c53
push 0
mov ecx, dword [ebp + 0x10]
push ecx
push 0
lea edx, [ebp - 0x1c4]
push edx
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov dword [ebp - 0x1c8], eax
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0x1c4]
push ecx
mov edx, dword [0x518904]
push edx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov eax, dword [ebp - 0x1c4]
push eax
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
push 0
mov ecx, dword [ebp - 0x1c4]
push ecx
mov edx, dword [0x518904]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [ebp - 0x1c4]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
cmp dword [ebp - 0x1c8], 0
je 0x472bd6
mov ecx, dword [0x518904]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 4
jmp 0x472c53
mov edx, dword [ebp - 0x1c0]
and edx, 0x10
test edx, edx
je 0x472c05
cmp dword [ebp - 0x1ac], 0
je 0x472c05
mov eax, dword [0x518904]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xfffffffa
jmp 0x472c53
lea ecx, [ebp - 4]
push ecx
push 0x8004667e
mov edx, dword [0x518904]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x472c47
push 2
mov eax, dword [0x518904]
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov ecx, dword [0x518904]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xfffffff9
jmp 0x472c53
mov dword [0x518900], 0
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret