Function at 0x4f50d0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x308
mov eax, dword [0x519008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x1dc]
cmp eax, 0xffffffff
je 0x4f549a
push 0
push 0
push eax
mov dword [ebp - 0x304], 0x2710
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
je 0x4f549a
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x300], eax
push ecx
push 0x8004667e
push eax
mov dword [ebp - 0xc], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, 0x2710
lea ecx, [ebp - 0x304]
call fcn.00427410
mov esi, dword [edi + 4]
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f54c0
push 4
push 0x24
call fcn.0040bee4
inc dword [esi + 0x18]
mov ecx, eax
mov eax, dword [esi + 0x1c]
add esp, 8
add eax, 0x24
mov dword [esi + 0x1c], eax
cmp eax, dword [esi + 0x20]
jbe 0x4f5177
mov dword [esi + 0x20], eax
mov al, byte [esi + 0x15]
mov byte [ecx + 2], al
mov al, byte [esi + 0x14]
lea esi, [ecx + 8]
mov byte [ecx + 3], al
mov dword [ecx + 4], 0x24000040
mov ebx, dword [edi + 4]
mov eax, 0x400
mov dword [esi], vtable.rhea::IProtocolChannell.0
mov dword [esi + 4], ebx
mov dword [esi + 0xe], 0x2000
mov word [esi + 0xc], ax
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f54d8
push 4
push 0x408
call fcn.0040bee4
inc dword [ebx + 0x18]
mov ecx, eax
mov eax, dword [ebx + 0x1c]
add esp, 8
add eax, 0x408
mov dword [ebx + 0x1c], eax
cmp eax, dword [ebx + 0x20]
jbe 0x4f51e0
mov dword [ebx + 0x20], eax
mov al, byte [ebx + 0x15]
mov byte [ecx + 2], al
mov al, byte [ebx + 0x14]
mov byte [ecx + 3], al
lea eax, [ecx + 8]
mov dword [ecx + 4], 0x8040000
mov dword [esi + 8], eax
mov ecx, esi
mov eax, dword [ebp - 0x304]
mov dword [esi], vtable.rhea::ProtocolChSocketTCP.0
mov dword [esi + 0x18], 0xffffffff
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x300]
push 0x1388
mov dword [ebp - 0x2f8], esi
mov dword [esi + 0x18], eax
call fcn.004faae0
movzx eax, ax
test eax, eax
je 0x4f5484
cmp eax, 0xfff5
jae 0x4f5484
movzx edx, word [esi + 0x10]
lea ecx, [ebp - 0x2f4]
push ecx
mov ecx, dword [esi + 8]
call fcn.004f99c0
add esp, 4
test al, al
je 0x4f528b
mov ecx, dword [edi + 4]
push 1
push 4
push 0x10
call fcn.00401140
push 0x2000
push 0x400
push dword [edi + 4]
mov ebx, eax
mov ecx, ebx
call fcn.004f8fc0
mov dword [ebx], vtable.rhea::ProtocolWebsocket.0
mov eax, dword [0x513c40]
jmp 0x4f52d5
cmp word [esi + 0x10], 0xc
jb 0x4f546e
mov ecx, dword [esi + 8]
call fcn.004f97a0
test al, al
je 0x4f546e
mov ecx, dword [edi + 4]
push 1
push 4
push 0x10
call fcn.00401140
push 0x1000
push 0x200
push dword [edi + 4]
mov ebx, eax
mov ecx, ebx
call fcn.004f8fc0
mov dword [ebx], vtable.rhea::ProtocolConsole.0
mov eax, dword [0x513c1c]
push dword [edi + 8]
mov ecx, ebx
mov dword [ebp - 0x2fc], ebx
push esi
call eax
test al, al
jne 0x4f5352
mov eax, dword [edi + 8]
push str.ProtocolServer::priv_checkIncomingConnection______client_handsake_failed__closing_connection_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
mov ecx, dword [edi + 4]
lea edx, [ebp - 0x2fc]
call fcn.004022c0
mov eax, dword [esi]
mov edx, dword [eax + 8]
cmp eax, vtable.rhea::ProtocolChSocketTCP.0
jne 0x4f54f1
mov eax, dword [esi + 0x18]
cmp eax, 0xffffffff
je 0x4f533f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x18], 0xffffffff
lea edx, [ebp - 0x2f8]
mov ecx, dword [edi + 4]
call fcn.004022c0
jmp 0x4f54ab
mov ecx, dword [edi + 4]
lea edx, [ebp - 0x2f8]
call fcn.004022c0
jmp 0x4f54ab
mov eax, dword [edi + 0xd8]
cmp eax, 0xffffffff
je 0x4f542d
mov edx, dword [edi + 0xe0]
imul edx, eax
add edx, dword [edi + 0xe8]
mov dword [ebp - 0x308], edx
mov eax, dword [edx]
inc dword [edi + 0xdc]
mov dword [edi + 0xd8], eax
mov eax, dword [ebp + 8]
mov dword [edx], ebx
mov cx, word [edx + 8]
mov dword [edx + 4], esi
mov word [eax], cx
lea ecx, [edi + 0x10c]
movzx eax, word [edx + 8]
push eax
lea eax, [ebp - 0x304]
push eax
call fcn.00403790
mov ecx, dword [edi + 0x108]
lea esi, [edi + 0xf4]
mov ebx, dword [esi + 0x10]
cmp ecx, 2
jae 0x4f53d1
push 0x40
mov ecx, esi
mov dword [esi + 0x14], 0x20
call fcn.0042a060
mov ecx, dword [esi + 0x14]
cmp ebx, ecx
jb 0x4f53fa
mov eax, ecx
mov edx, ecx
shr eax, 1
add eax, ecx
cmp eax, ecx
jbe 0x4f53f4
mov dword [esi + 0x14], eax
mov ecx, esi
add eax, eax
push eax
call fcn.0042a060
mov edx, dword [edi + 0x108]
mov ecx, edx
cmp ebx, edx
jae 0x4f53d5
cmp ebx, dword [esi + 0x10]
jb 0x4f5405
lea eax, [ebx + 1]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [eax + ebx*2]
mov eax, dword [ebp - 0x308]
mov ax, word [eax + 8]
mov word [ecx], ax
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 8]
push str.ProtocolServer::priv_checkIncomingConnection_____connection_was_accepted_but_we_have_no_more_free_handle__closing_client_socket_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov ecx, dword [0x51dd88]
add esp, 8
push str.ProtocolServer::checkIncomingConnection____connection_was_accepted_but_we_have_no_more_free_handle
push str._WARN_
push 1
push 0
push 1
call fcn.0042d790
push ecx
mov ecx, eax
call fcn.0042ea30
push esi
mov ecx, ebx
call fcn.004037e0
jmp 0x4f52f8
mov eax, dword [edi + 8]
push str.ProtocolServer::priv_checkIncomingConnection_____client_handsake_is_invalid__closing_connection_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
jmp 0x4f5306
mov eax, dword [edi + 8]
push str.ProtocolServer::priv_checkIncomingConnection_____timeout_waiting_for_handshake._Closing_connection_to_the_client_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
jmp 0x4f5306
mov eax, dword [edi + 8]
push str.ProtocolServer::priv_checkIncomingConnection_____accept_failed_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
mov ecx, dword [ebp - 8]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403d8c
mov esp, ebp
pop ebp
ret 4
push 1
push 0
push 0x503d60
push 4
push 0x1c
mov ecx, esi
call edx
mov esi, eax
jmp 0x4f518d
push 0
push 0
push 0x503d60
push 4
push 0x400
mov ecx, ebx
call edx
jmp 0x4f51f6
mov ecx, esi
call edx
jmp 0x4f533f