Function at 0x4de4d0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53191a
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x5b339c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push str..ServerToolkitTCPConnectionSession.cpp
mov ebx, ecx
push 0xbe
push str.ServerToolkit::CTCPConnectionSession::_DoProcessing
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x70], str.ServerToolkit::CTCPConnectionSession::_DoProcessing
call fcn.004c6a00
mov ecx, eax
call fcn.00402490
mov eax, dword [ebx + 0x6c]
xor edi, edi
mov byte [ebp - 0x69], 1
mov dword [ebp - 0x74], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x194], eax
mov dword [ebp - 0x198], 1
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x84], 0xa
cmp byte [ebp - 0x69], 0
je 0x4de5b7
lea ecx, [ebp - 0x88]
push ecx
push edi
push edi
lea edx, [ebp - 0x198]
push edx
push edi
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x4de5e1
call fcn.004c6a00
cmp dword [ebx + 0x88], 8
mov dword [ebp - 0x74], eax
jb 0x4de58e
mov edi, dword [ebx + 0x74]
jmp 0x4de591
lea edi, [ebx + 0x74]
mov eax, dword [ebp - 0x74]
mov esi, dword [eax]
call sub.WS2_32.dll_WSAGetLastError
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x74]
push eax
mov eax, dword [esi]
push edi
push str.Socket_error_on_select_for_IP___ls_._Code___d_
push ecx
push 1
push edx
call eax
add esp, 0x18
mov byte [ebp - 0x69], 0
lea esi, [ebx + 0x188]
push esi
mov ecx, ebx
call fcn.004ddac0
mov edi, eax
test edi, edi
jbe 0x4de6d9
cmp dword [esi + 0x18], 0x10
jb 0x4de694
mov eax, dword [esi + 4]
jmp 0x4de697
cmp eax, edi
je 0x4de5b7
mov ecx, dword [ebx + 0x64]
mov edx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x6c]
push edi
push ecx
push edx
push eax
call sub.WS2_32.dll_recv
mov esi, eax
cmp esi, edi
jne 0x4de62b
call fcn.004c6a00
cmp dword [ebx + 0x88], 8
jb 0x4de610
mov ecx, dword [ebx + 0x74]
jmp 0x4de613
lea ecx, [ebx + 0x74]
mov edx, dword [eax]
mov edx, dword [edx]
push ecx
mov ecx, dword [ebp - 0x70]
push str.Client_closed_connection_on_IP___ls_.
push ecx
push 1
push eax
call edx
add esp, 0x14
jmp 0x4de5b3
cmp esi, 0xffffffff
jne 0x4de660
call fcn.004c6a00
cmp dword [ebx + 0x88], 8
jb 0x4de643
mov ecx, dword [ebx + 0x74]
jmp 0x4de646
lea ecx, [ebx + 0x74]
mov edx, dword [eax]
mov edx, dword [edx]
push ecx
mov ecx, dword [ebp - 0x70]
push 0xffffffffffffffff
push str.Socket_error__0x_x__on_recv_for_IP___ls_.
push ecx
push 1
push eax
call edx
jmp 0x4de5b0
mov eax, dword [ebx + 0x68]
push esi
push eax
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___unsigned_int_]
push eax
lea ecx, [ebx + 0x188]
mov byte [ebp - 4], 1
call dword [0x5391f8]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
add dword [ebp - 0x74], esi
jmp 0x4de557
lea eax, [esi + 4]
push edi
push eax
lea ecx, [ebx + 0x12c]
call fcn.004e0750
mov ecx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
push edx
push edi
lea eax, [ebp - 0x30]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov byte [ebp - 4], 2
push eax
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x4de5b7
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x7c], esp
push esi
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, ebx
call fcn.004dd9b0
test al, al
jne 0x4de795
call fcn.004c6a00
push str..ServerToolkitTCPConnectionSession.cpp
push 0x2ec
push str.ServerToolkit::CTCPConnectionSession::ContainsCompleteMessage
mov ecx, eax
call fcn.00402490
push 0xc
push 0
push str.__SauronMsg_
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edi, eax
cmp edi, dword [ecx]
je 0x4de734
add edi, 0xc
jmp 0x4de736
xor edi, edi
call fcn.004c6a00
push edi
push str.uiRetVal
push str..ServerToolkitTCPConnectionSession.cpp
push 0x2f3
push str.ServerToolkit::CTCPConnectionSession::ContainsCompleteMessage
mov ecx, eax
call fcn.00402520
test edi, edi
jbe 0x4de795
cmp dword [esi + 0x18], 0x10
jb 0x4de766
mov eax, dword [esi + 4]
jmp 0x4de769
lea eax, [esi + 4]
push edi
push eax
lea ecx, [ebx + 0x12c]
call fcn.004e0750
mov edx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [edx]
push eax
push edi
lea ecx, [ebp - 0x30]
push ecx
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov byte [ebp - 4], 3
jmp 0x4de6be
lea ecx, [ebp - 0x4c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea esi, [ebx + 0x12c]
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.004df7f0
test al, al
je 0x4de830
lea edx, [ebp - 0x4c]
push edx
mov ecx, esi
call fcn.004e05f0
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x13
push 0
push str.__NegotiateRequest_
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 5
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp eax, dword [ecx]
lea ecx, [ebp - 0x30]
setne byte [ebp - 0x75]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp byte [ebp - 0x75], 0
je 0x4de830
lea edx, [ebp - 0x30]
push edx
mov ecx, ebx
call fcn.004de370
push 1
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebx + 0xe4]
mov byte [ebp - 4], 6
call fcn.004e1710
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ecx]
push 0xc
push 0
push str.__SauronMsg_
lea ecx, [ebp - 0x4c]
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, eax
mov dword [ebp - 0x7c], esi
cmp esi, dword [ecx]
je 0x4de9ad
push 0xb
push 0
push str._SauronMsg_
lea ecx, [ebp - 0x4c]
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
sub esi, eax
add esi, 0xc
push esi
push eax
lea edx, [ebp - 0x68]
push edx
lea ecx, [ebp - 0x4c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov byte [ebp - 4], 7
call fcn.004c6a00
cmp dword [ebp - 0x50], 0x10
mov esi, dword [ebp - 0x64]
jae 0x4de890
lea esi, [ebp - 0x64]
mov ecx, 8
cmp dword [ebx + 0xa4], ecx
jb 0x4de8a5
mov edx, dword [ebx + 0x90]
jmp 0x4de8ab
lea edx, [ebx + 0x90]
cmp dword [ebx + 0x88], ecx
jb 0x4de8b8
mov ecx, dword [ebx + 0x74]
jmp 0x4de8bb
lea ecx, [ebx + 0x74]
mov edi, dword [eax]
push esi
push edx
mov edx, dword [edi]
push ecx
mov ecx, dword [ebp - 0x70]
push str.Incoming_message_from_IP___ls___ls_:___hs_.
push ecx
push 3
push eax
call edx
mov eax, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x7c]
add esp, 0x1c
push ecx
add edx, 0xc
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x4c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 8
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 7
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 9
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x68]
push edx
mov byte [ebp - 4], 0xa
call fcn.004d22d0
add esp, 8
push ebx
sub esp, 0x1c
lea eax, [ebp - 0x30]
mov ecx, esp
mov dword [ebp - 0x7c], esp
push eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov ecx, dword [ebx + 0x28]
call fcn.004bf140
push 0
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::resize_unsigned_int_]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 9
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [ebp - 4], 7
lea ecx, [ebp - 0x68]
jmp 0x4de823
lea eax, [ebx + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [ebx + 0xe0], 0
je 0x4dea76
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [ebp - 4], 0xc
call fcn.004c6a00
cmp dword [ebx + 0xdc], 0x10
lea esi, [ebx + 0xc4]
mov dword [ebp - 0x80], eax
jb 0x4de9ed
mov edi, dword [esi + 4]
jmp 0x4de9f0
lea edi, [esi + 4]
mov ecx, 8
cmp dword [ebx + 0xa4], ecx
jb 0x4dea05
mov edx, dword [ebx + 0x90]
jmp 0x4dea0b
lea edx, [ebx + 0x90]
cmp dword [ebx + 0x88], ecx
jb 0x4dea18
mov ecx, dword [ebx + 0x74]
jmp 0x4dea1b
lea ecx, [ebx + 0x74]
mov eax, dword [eax]
mov eax, dword [eax]
push edi
push edx
mov edx, dword [ebp - 0x80]
push ecx
mov ecx, dword [ebp - 0x70]
push str.Outgoing_message_to_IP___ls___ls_:___hs_.
push ecx
push 3
push edx
call eax
add esp, 0x1c
push 0x1e
push 0
push str.QueryConfigControlNameResponse
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
push 0
push esi
lea ecx, [ebx + 0xe4]
call fcn.004e1710
push 0x57ef93
mov ecx, esi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
lea ecx, [ebp - 0x30]
mov byte [ebx + 0xe0], 0
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [ebx + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [ebx + 0xe4]
mov ecx, esi
call fcn.004e0c90
test al, al
je 0x4deb1d
mov eax, dword [ebx + 0x1dc]
lea ecx, [ebp - 0x7c]
push ecx
lea edx, [ebp - 0x74]
add eax, 0x64
push edx
mov ecx, esi
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x7c], eax
call fcn.004e1e30
test al, al
je 0x4deb1d
mov esi, dword [ebp - 0x7c]
mov edi, dword [ebp - 0x74]
mov eax, dword [ebx + 0x6c]
push 0
push esi
push edi
push eax
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x4deb05
call fcn.004c6a00
cmp dword [ebx + 0x88], 8
jb 0x4deae6
mov ebx, dword [ebx + 0x74]
jmp 0x4deae9
add ebx, 0x74
mov edx, dword [ebp - 0x70]
mov ecx, dword [eax]
push ebx
push str.Socket_error_while_sending_on_IP___ls_.
push edx
push 1
push eax
mov eax, dword [ecx]
call eax
add esp, 0x14
mov byte [ebp - 0x69], 1
jmp 0x4deb0d
sub esi, eax
add edi, eax
test esi, esi
jg 0x4deac1
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x4deb1d
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov dword [ebp - 4], 0xffffffff
mov bl, byte [ebp - 0x69]
mov edx, dword [ebp - 0x70]
movzx ecx, bl
push ecx
push str.bRetVal
push str..ServerToolkitTCPConnectionSession.cpp
push 0x1a1
push edx
call fcn.004c6a00
mov ecx, eax
call fcn.00402520
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0051973e
mov esp, ebp
pop ebp
ret