Function at 0x10002be0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 0x2c]
sub esp, 0x144
push ebx
push esi
push edi
push 1
push 0
push 0
push 6
mov edi, ecx
push 1
push 2
mov dword [edi + 0x10], eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x10002c67
push 0
push 0
push dword [0x10005030]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateIoCompletionPort]
test eax, eax
jne 0x10002c3b
mov ecx, edi
call fcn.10003390
call dword [sym.imp.KERNEL32.DLL_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push 0x10
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], 0
push eax
push dword [edi]
mov ebx, 2
mov dword [esp + 0x24], ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x10002c76
mov ecx, edi
call fcn.10003390
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [edi + 4], eax
mov word [esp + 0x18], bx
test esi, esi
jne 0x10002d7c
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [esp + 0x24]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp + 0xc]
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push dword [edi]
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x10
lea eax, [esp + 0x1c]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_connect]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edi]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
push esi
lea eax, [esp + 0x50]
mov dword [esp + 0x54], ecx
push eax
push esi
push ecx
mov dword [esp + 0x5c], 1
mov dword [esp + 0x40], esi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x10002fd6
mov ebx, dword [edi]
mov esi, 1
mov dword [edi + 0x14], 1
cmp ebx, 0xffffffff
je 0x10002d6b
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], esi
push eax
push 0x80
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
mov dword [edi], 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_gethostbyname]
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [esp + 0x24]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp + 0x1c]
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x1a], ax
lea eax, [esp + 0x30]
push eax
push 0x8004667e
push dword [edi]
mov dword [esp + 0x3c], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x10
lea eax, [esp + 0x1c]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_connect]
mov eax, dword [ebp + 0x28]
mov ecx, dword [edi]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push eax
push 0
lea eax, [esp + 0x50]
mov dword [esp + 0x54], ecx
push eax
push 0
push ecx
mov dword [esp + 0x5c], 1
mov dword [esp + 0x4c], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x10002e6e
mov ebx, dword [edi]
mov esi, 1
mov dword [edi + 0x14], 1
cmp ebx, 0xffffffff
je 0x10002e5d
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], esi
push eax
push 0x80
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0x14]
push 4
push eax
push 0x1005
push 0xffff
push dword [edi]
mov dword [esp + 0x28], 0x7530
call ebx
push 4
lea eax, [esp + 0x18]
push eax
push 0x1006
push 0xffff
push dword [edi]
call ebx
push 0
push 0
lea eax, [esp + 0x30]
mov dword [esp + 0x44], 1
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x54]
mov dword [esp + 0x58], 0x1388
push eax
push 0x98000004
push dword [edi]
mov dword [esp + 0x68], 0x1388
mov dword [esp + 0x4c], 0
call dword [sym.imp.WS2_32.dll_WSAIoctl]
sub esi, 1
je 0x10002f70
sub esi, 1
je 0x10002f5b
sub esi, 1
je 0x10002f46
mov esi, dword [edi]
mov dword [edi + 0x14], 1
cmp esi, 0xffffffff
je 0x10002f34
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x80
push 0xffff
push esi
call ebx
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push dword [ebp + 0x24]
mov ecx, edi
push dword [ebp + 0x20]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.10003890
jmp 0x10002f81
push dword [ebp + 0x24]
mov ecx, edi
push dword [ebp + 0x20]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100036b0
jmp 0x10002f81
push ecx
push dword [ebp + 0x20]
mov ecx, edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.100035b0
mov ebx, eax
test ebx, ebx
je 0x10002fd6
mov esi, dword [edi]
mov dword [edi + 0x14], 1
cmp esi, 0xffffffff
je 0x10002fc5
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x80
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, ebx
mov dword [edi], 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push 0x30
call dword [sym.imp.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_]
push 0x30
mov esi, eax
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0x10
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], 1
mov dword [esi + 0x2c], 0
mov dword [esi + 0x1c], 0
push esi
push 0
push 0
push dword [0x10005030]
mov dword [esi + 0x28], 0
call dword [sym.imp.KERNEL32.DLL_PostQueuedCompletionStatus]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x28