Function at 0x476ee0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4d04c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
call fcn.004777b0
cmp dword [edi + 0x44], 2
jne 0x47707b
mov eax, dword [ebp + 0x10]
mov ecx, dword [edi + 0x40]
mov dword [ebp - 0x214], eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x104], ecx
push eax
push 0
lea eax, [ebp - 0x108]
mov dword [ebp - 0x108], 1
push eax
lea eax, [ecx + 1]
mov dword [ebp - 0x208], ecx
push eax
mov dword [ebp - 0x20c], 1
mov dword [ebp - 0x210], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x47707b
lea eax, [ebp - 0x108]
push eax
push dword [edi + 0x40]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x476f93
lea eax, [ebp - 0x20c]
push eax
push dword [edi + 0x40]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47707b
movzx eax, byte [ebp + 0x14]
shl eax, 3
push eax
push dword [ebp + 0xc]
push esi
push dword [edi + 0x40]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x47707d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [eax]
cmp ebx, 0x2733
je 0x47707b
push str.TCP__
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
add esp, 8
mov ecx, edi
cmp dword [edi + 0x14], 0xf
jbe 0x476fe1
mov ecx, dword [edi]
push dword [edi + 0x10]
push ecx
push eax
call fcn.00416020
push 0x4a459c
push eax
call fcn.004156b0
add esp, 0x14
lea ecx, [edi + 0x18]
cmp dword [edi + 0x2c], 0xf
jbe 0x477005
mov ecx, dword [edi + 0x18]
push dword [edi + 0x28]
push ecx
push eax
call fcn.00416020
add esp, 0xc
mov esi, eax
push 0x49fcc0
push ebx
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push 0x4a6148
push ebx
push str.__receive_error._Error_code:
push esi
call fcn.004156b0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.004156b0
add esp, 8
push eax
call fcn.004156b0
add esp, 8
push eax
call fcn.004156b0
add esp, 8
cmp byte [edi + 0x30], 0
je 0x477090
push str._Reconnect._n
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
add esp, 8
mov ecx, edi
call fcn.00477330
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00489ca8
mov esp, ebp
pop ebp
ret 0x10
push str._Failed._n
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
add esp, 8
push 0x416670
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00489ca8
mov esp, ebp
pop ebp
ret 0x10