Function at 0x411470
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
sub esp, 0x134
mov eax, dword [0x494014]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 1
push 0
push 0
push 6
push 1
push 2
mov edi, ecx
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x41154a
push 0
push 0
push dword [0x49648c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x41151e
mov esi, dword [edi]
cmp esi, 0xffffffff
je 0x4114fb
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 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 dword [edi], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0041caaf
mov esp, ebp
pop ebp
ret 0x24
push 0x10
lea eax, [esp + 0x14]
mov dword [esp + 0x18], 0
push eax
push dword [edi]
mov ebx, 2
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x411567
mov ecx, edi
call fcn.004119f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0041caaf
mov esp, ebp
pop ebp
ret 0x24
push esi
mov dword [edi + 4], 0
mov word [esp + 0x14], bx
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 + 0x1c]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x3877
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x24]
push eax
push 0x8004667e
push dword [edi]
mov dword [esp + 0x30], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x10
lea eax, [esp + 0x14]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_connect]
mov eax, dword [edi]
lea ecx, [esp + 0x28]
push ecx
push 0
lea ecx, [esp + 0x38]
mov dword [esp + 0x3c], eax
push ecx
push 0
push eax
mov dword [esp + 0x44], 1
mov dword [esp + 0x3c], 5
mov dword [esp + 0x40], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x41166d
mov esi, dword [edi]
mov ebx, 1
cmp esi, 0xffffffff
je 0x41164e
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], ebx
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 dword [edi], 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0041caaf
mov esp, ebp
pop ebp
ret 0x24
push 0x30
call dword [sym.imp.mfc140u.dll_operator_2]
push 0x30
mov esi, eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], 1
mov dword [esi + 0x1c], 0
mov dword [esi + 0x28], 0
push esi
push 0
push 0
push dword [0x49648c]
mov dword [esi + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov ecx, dword [esp + 0x13c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041caaf
mov esp, ebp
pop ebp
ret 0x24