Function at 0x4f5f82
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x519008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
push 0x8e8
push str.ProtocolServer::start___on_port__d...
mov eax, dword [edi + 8]
push eax
mov edx, dword [eax]
call dword [edx + 0xc]
mov ecx, dword [edi + 8]
add esp, 0xc
mov eax, dword [ecx]
cmp eax, vtable.rhea::NullLogger.0
jne 0x4f63d0
lea ebx, [edi + 0x1d8]
mov ecx, ebx
call fcn.004277d0
mov esi, eax
test esi, esi
jne 0x4f5fb7
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0x8004667e
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, 2
mov dword [ebp - 0x24], esi
push 0x8e8
mov word [ebp - 0x28], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x26], ax
lea eax, [ebp - 0x28]
push 0x10
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4f5fac
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 4], 0xffffffff
call fcn.0040c02b
mov eax, dword [eax]
add eax, 0xfffffff4
cmp eax, 0x74
ja case.0x4f5f7b.14
movzx eax, byte [eax + 0x4f641c]
jmp dword [eax*4 + 0x4f6404]
mov esi, 6
jmp 0x4f5fb7
mov esi, 5
jmp 0x4f5fb7
mov esi, 7
jmp 0x4f5fb7
mov esi, 8
jmp 0x4f5fb7
mov esi, 4
jmp 0x4f5fb7
mov esi, 0xff
jmp 0x4f5fb7
mov edx, dword [ebx]
mov ecx, ebx
call fcn.00427410
xor esi, esi
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
test esi, esi
je 0x4f5ff4
push esi
push str.FAIL__error_code_d_n
push ecx
call eax
mov ecx, dword [edi + 8]
add esp, 0xc
mov eax, dword [ecx]
cmp eax, vtable.rhea::NullLogger.0
jne 0x4f63d8
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret 4
push 0x50b7f4
push ecx
call eax
mov eax, dword [ebx + 4]
add esp, 8
mov ecx, dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4f6033
push 4
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push edx
push 0x1006
push 0xffff
push eax
call ecx
mov ecx, dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4f6033
mov dword [ebx], eax
mov eax, dword [edi + 0x1dc]
cmp eax, 0xffffffff
je 0x4f6058
push 4
lea edx, [ebp - 0x18]
mov dword [ebp - 0x18], 0x2710
push edx
push 0x1005
push 0xffff
push eax
call ecx
mov eax, dword [edi + 8]
push str.listen...
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [edi + 0x1dc]
add esp, 8
cmp eax, 0xffffffff
jne 0x4f6078
xor dl, dl
jmp 0x4f6089
push bind
push eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
sete dl
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
test dl, dl
jne 0x4f60e6
push 0
push str.FAIL_n
push ecx
call eax
mov ecx, dword [edi + 8]
add esp, 0xc
mov eax, dword [ecx]
cmp eax, vtable.rhea::NullLogger.0
jne 0x4f63e0
mov eax, dword [edi + 0x1dc]
cmp eax, 0xffffffff
je 0x4f60ce
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x1dc], 0xffffffff
pop edi
pop esi
mov eax, 0xb
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret 4
push 0x50b7f4
push ecx
call eax
add esp, 8
lea ecx, [edi + 0x10c]
call fcn.004f4220
mov esi, eax
mov byte [esi + 0xc], 1
mov ecx, dword [ebx]
mov dword [esi], ecx
mov ecx, dword [ebx + 4]
mov dword [esi + 4], ecx
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 0x37d
push eax
mov dword [esi + 8], eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov dword [esi + 0x10], 0xffffffff
mov esi, dword [edi + 4]
mov ebx, dword [edi + 0x108]
mov dword [edi + 0x104], 0
mov dword [edi + 0xd4], esi
mov dword [edi + 0xec], 0
mov eax, dword [esi]
lea ecx, [ebx + ebx*2]
shl ecx, 2
mov dword [ebp - 8], ecx
mov edx, dword [eax + 0xc]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f63e8
lea eax, [ecx + 8]
push 4
push eax
call fcn.0040bee4
mov edx, dword [ebp - 8]
mov ecx, eax
mov eax, dword [esi + 0x1c]
add edx, 8
inc dword [esi + 0x18]
add eax, edx
add esp, 8
mov dword [esi + 0x1c], eax
cmp eax, dword [esi + 0x20]
jbe 0x4f6190
mov dword [esi + 0x20], eax
movzx eax, byte [esi + 0x15]
mov byte [ecx + 2], al
movzx eax, byte [esi + 0x14]
mov byte [ecx + 3], al
mov eax, edx
shr eax, 0x18
mov byte [ecx + 4], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 5], al
mov eax, edx
shr eax, 8
mov byte [ecx + 6], al
lea eax, [ecx + 8]
mov byte [ecx + 7], dl
push dword [ebp - 8]
mov dword [edi + 0xf0], eax
push 0
push eax
call fcn.00405490
mov eax, dword [edi + 0xf0]
lea esi, [ebx - 1]
add esp, 0xc
mov dword [edi + 0xe0], 0xc
xor edx, edx
mov dword [edi + 0xe4], ebx
xor ecx, ecx
mov dword [edi + 0xdc], 0
mov dword [edi + 0xe8], eax
mov dword [edi + 0xd8], 0
test esi, esi
je 0x4f6227
jmp 0x4f6210
mov eax, dword [edi + 0xe8]
inc ecx
mov dword [edx + eax], ecx
add edx, 0xc
cmp ecx, esi
jb 0x4f6210
mov eax, dword [edi + 0xe8]
mov dword [edx + eax], 0xffffffff
xor esi, esi
xor edx, edx
test ebx, ebx
je 0x4f6261
jmp 0x4f6240
mov ecx, dword [edi + 0xec]
lea esi, [esi + 0xc]
mov eax, dword [edi + 0xf0]
add ecx, edx
or ecx, 0x100
inc edx
mov word [eax + esi - 4], cx
cmp edx, ebx
jb 0x4f6240
mov eax, dword [edi + 8]
push 0x8e9
push str.opening_UDP_port___d_...
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 0xc
mov dword [edi + 0x1e4], 0xffffffff
lea esi, [edi + 0x1e0]
mov dword [esi], 0x2710
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x4f62f5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xfffffff4
cmp eax, 0x7b
ja case.0x4f62b6.14
movzx eax, byte [eax + 0x4f64a8]
jmp dword [eax*4 + 0x4f6494]
mov edx, 1
jmp 0x4f62de
mov edx, 2
jmp 0x4f62de
mov edx, 3
jmp 0x4f62de
mov edx, 4
jmp 0x4f62de
mov edx, 0xff
mov eax, dword [edi + 8]
push edx
push str.FAILED__open___d__n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 0xc
jmp 0x4f639e
push 4
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 1
push ecx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x8004667e
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, 2
push 0x8e9
mov word [ebp - 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [ebp - 0x36], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push 0x10
push eax
push dword [edi + 0x1e4]
call dword [sym.imp.WS2_32.dll_bind]
mov edx, dword [edi + 8]
inc eax
neg eax
sbb eax, eax
mov ecx, dword [edx]
and eax, 0xffffff01
mov ecx, dword [ecx + 0xc]
add eax, 0xff
je 0x4f6385
push eax
push str.FAILED__bind___d__n
push edx
call ecx
add esp, 0xc
jmp 0x4f639e
push 0x50b7f4
push edx
call ecx
add esp, 8
lea ecx, [edi + 0x10c]
push 0xfffffffffffffffe
push esi
call fcn.00403790
mov eax, dword [edi + 8]
push str.Done__n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov ecx, dword [edi + 8]
add esp, 8
mov eax, dword [ecx]
cmp eax, vtable.rhea::NullLogger.0
jne 0x4f63fd
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403d8c
mov esp, ebp
pop ebp
ret 4
call dword [eax + 4]
jmp 0x4f5efb
call dword [eax + 8]
jmp 0x4f5fdf
call dword [eax + 8]
jmp 0x4f60b2
push 0
push 0
push 0x503d60
push 4
push ecx
mov ecx, esi
call edx
jmp 0x4f61bc
call dword [eax + 8]
jmp 0x4f63bb