Function at 0x1002c820
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, 0x1ec
mov eax, dword [0x1006d258]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1a4], 0
lea eax, [ebp - 0x198]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1002c869
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x19c], eax
cmp dword [ebp - 0x19c], 0xffffffff
jne 0x1002c8a0
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
xor ecx, ecx
mov dword [ebp - 0x1e4], ecx
mov dword [ebp - 0x1e0], ecx
mov dword [ebp - 0x1dc], ecx
mov dword [ebp - 0x1d8], ecx
mov edx, 2
mov word [ebp - 0x1e4], dx
movzx eax, word [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e2], ax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1e0], eax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 0
jne 0x1002c919
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
push 0x10
mov edx, dword [ebp - 0x1d4]
push edx
mov eax, dword [ebp - 0x19c]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1002c96a
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov ecx, dword [ebp - 0x1d4]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
push 0x10
lea eax, [ebp - 0x1e4]
push eax
mov ecx, dword [ebp - 0x19c]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1002c9d9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1e8], eax
cmp dword [ebp - 0x1e8], 0x2733
je 0x1002c9d9
mov edx, dword [ebp - 0x1d4]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov eax, dword [ebp - 0x19c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 0x1e8]
not ecx
add ecx, 1
mov dword [ebp - 0x1a4], ecx
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
push 0
mov edx, dword [ebp + 0x14]
push edx
push 0
lea eax, [ebp - 0x1d4]
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
test eax, eax
je 0x1002ca2a
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov ecx, dword [ebp - 0x1d4]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
lea eax, [ebp - 0x1d0]
push eax
mov ecx, dword [ebp - 0x1d4]
push ecx
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
jne 0x1002ca80
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1d4]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x19c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
mov edx, dword [ebp - 0x1d0]
and edx, 0x10
je 0x1002caa0
cmp dword [ebp - 0x1bc], 0
jne 0x1002caa0
mov dword [ebp - 0x1ec], 1
jmp 0x1002caaa
mov dword [ebp - 0x1ec], 0
cmp dword [ebp - 0x1ec], 0
jne 0x1002cae9
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1d4]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x19c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
push 0
push 0
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1002cb35
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1d4]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [ebp - 0x19c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
mov edx, dword [ebp - 0x1d4]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
test eax, eax
jne 0x1002cb6f
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x19c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
mov dword [ebp - 0x1a0], 0
lea ecx, [ebp - 0x1a0]
push ecx
push 0x8004667e
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1002cbbd
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x19c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
push 4
lea ecx, [ebp + 0x14]
push ecx
push 0x1006
push 0xffff
mov edx, dword [ebp - 0x19c]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x1002cc05
call fcn.100110e0
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x19c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a4]
jmp 0x1002cc16
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x19c]
mov dword [ecx], edx
mov eax, dword [ebp - 0x1a4]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10048168
mov esp, ebp
pop ebp
ret 0x10