Function at 0x401cf0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40eaf5
mov eax, dword fs:[0]
push eax
mov eax, 0x7818
call fcn.0040e8c0
mov eax, dword [0x419014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x7820], edi
push 0x4110dc
lea ecx, [ebp - 0x7814]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
mov byte [ebp - 4], 1
push dword [esi + 0x4b8]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
add esp, 4
mov dword [ebp - 0x781c], eax
cmp dword [0x419630], 0
jne 0x401e2f
call fcn.00401120
test eax, eax
jne 0x401d91
movzx eax, byte [ebx + 0x84]
push str.Call_SocketService___SOCKET_INIT_ERROR___r_n
push eax
call fcn.00407340
add esp, 8
jmp 0x401fa6
mov edx, dword [ebp - 0x781c]
mov ecx, dword [esi + 0x4a0]
call fcn.004011b0
cmp eax, 1
je 0x401de1
push str.Call_SocketService___SOCK_CONNECT_FAILED___r_n
movzx eax, byte [ebx + 0x84]
push eax
call fcn.00407340
mov eax, dword [0x419630]
add esp, 8
test eax, eax
je 0x401dd6
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x419630], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x401fa6
push dword [esi + 0x4bc]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
add esp, 4
mov dword [ebp - 0x7818], eax
lea eax, [ebp - 0x7818]
push 4
push eax
push 0x1006
push 0xffff
push dword [0x419630]
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x401e2f
movzx eax, byte [ebx + 0x84]
push str.Call_SocketService___WE_DID_NOT_SET_TIMEOUT._r_n
push eax
call fcn.00407340
add esp, 8
push 0
lea ecx, [ebp + 0x10]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
mov ecx, dword [0x419630]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
mov dword [ebp - 0x7818], eax
mov dword [ebp - 0x7820], ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x7824], eax
lea esi, [eax + 1]
push esi
call dword [sym.imp.mfc140u.dll_operator_1]
push esi
mov esi, eax
mov dword [ebp - 0x781c], eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
mov edx, dword [ebp - 0x7818]
add esp, 0x10
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x7818], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401e96
sub ecx, dword [ebp - 0x7818]
push 0
push 0
push dword [ebp - 0x7824]
sar ecx, 1
push esi
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401ec5
push 0
sub ecx, edx
push ecx
push esi
push dword [ebp - 0x7820]
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
mov eax, dword [ebp - 0x781c]
push 1
push eax
call fcn.0040d98a
movzx eax, byte [ebx + 0x84]
push esi
push str.Call_SocketService___nSended_count___d_r_n
push eax
call fcn.00407340
push 0x2800
lea eax, [ebp - 0x2810]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x20
lea eax, [ebp - 0x2810]
push 0
push 0x27ff
push eax
push dword [0x419630]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0x274c
jne 0x401f42
push str.Call_SocketService___TIMEOUT___r_n
jmp 0x401dac
cmp eax, 0xffffffff
jne 0x401f51
push str.Call_SocketService___SOCKET_ERROR___r_n
jmp 0x401dac
test eax, eax
je 0x401fa6
push 0x5000
lea eax, [ebp - 0x7810]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x7810]
push 0x2800
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x2810]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x7810]
push eax
lea eax, [ebp - 0x7814]
push 0x410e3c
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__7]
add esp, 0xc
lea eax, [ebp - 0x7814]
mov ecx, edi
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__11]
lea ecx, [ebp - 0x7814]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x10]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d77e
mov esp, ebp
pop ebp
ret 0xc