Function at 0x41f270
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc8
mov eax, dword [0x53de10]
xor eax, esp
mov dword [esp + 0xc4], eax
push ebx
push ebp
mov ebp, dword [esp + 0xd4]
push esi
push edi
mov ebx, edx
mov eax, dword [ebx + 0xe8]
mov edi, ecx
cmp edi, 0x989680
mov dword [esp + 0x24], eax
jb 0x41f2bd
push edi
push str.lws_handshake_server
push str._s:_assert:_len__ld_n
mov esi, 1
call fcn.004214d0
add esp, 0xc
cmp dword [ebx], 0
jne 0x41f2e0
push str.lws_handshake_server
push str._s:_assert:_NULL_ah_n
mov esi, 1
call fcn.004214d0
add esp, 8
lea esp, [esp]
mov ecx, edi
sub edi, 1
test ecx, ecx
je 0x41f806
mov al, byte [ebx + 0x166]
xor edx, edx
test edi, edi
setne dl
shl edx, 7
xor edx, dword [ebx + 0x160]
and edx, 0x80
xor dword [ebx + 0x160], edx
test al, al
je 0x41f317
cmp al, 2
jne 0x41f35d
mov eax, dword [ebp]
movzx ecx, byte [eax]
add eax, 1
mov dword [ebp], eax
push ecx
mov eax, ebx
call fcn.004248c0
add esp, 4
test eax, eax
jne 0x41f4ec
cmp byte [ebx + 0x24], 0x5a
jne 0x41f2e0
push 3
mov ecx, ebx
call fcn.00424560
add esp, 4
test eax, eax
je 0x41f3ab
mov eax, dword [ebx]
movzx ecx, byte [eax + 0x41b]
test ecx, ecx
jne 0x41f381
xor esi, esi
jmp 0x41f38c
movsx eax, byte [ebx + 0x166]
push eax
push str.lws_handshake_server
push str._s:_bad_wsi_mode__d_n
mov esi, 1
call fcn.004214d0
add esp, 0xc
jmp 0x41f4ec
lea ecx, [ecx + ecx*2]
movzx esi, word [eax + ecx*2 + 8]
add esi, dword [eax + 4]
mov edx, dword [ebx + 0xec]
mov edi, dword [edx + 0x158]
mov eax, dword [esp + 0x24]
call fcn.0041e430
test eax, eax
je 0x41f3ab
mov dword [ebx + 0xec], eax
mov eax, dword [ebx + 0xec]
mov edx, 1
add dword [eax + 0x14c], edx
mov ecx, 0x100
test dword [ebx + 0x160], ecx
jne 0x41f3db
mov eax, dword [ebx + 0xec]
add dword [eax + 0x148], edx
or dword [ebx + 0x160], ecx
lea eax, [esp + 0x18]
push eax
mov byte [ebx + 0x166], 4
call fcn.004bb0d2
mov edx, dword [esp + 0x20]
mov eax, dword [ebx + 0x10c]
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0xe4], edx
xor edx, edx
add esp, 4
cmp eax, edx
mov dword [ebx + 0xe0], ecx
mov byte [ebx + 0x16b], 0
je 0x41f440
mov ecx, dword [ebx + 0x108]
cmp ecx, edx
je 0x41f426
mov dword [ecx + 0x10c], eax
mov eax, dword [ebx + 0x10c]
mov ecx, dword [ebx + 0x108]
mov dword [eax], ecx
mov dword [ebx + 0x10c], edx
mov dword [ebx + 0x108], edx
mov esi, dword [ebx]
movzx edx, byte [esi + 0x41d]
mov eax, edx
xor ecx, ecx
test eax, eax
je 0x41f7d6
jmp 0x41f460
lea edi, [eax + eax*2]
movzx edi, word [esi + edi*2 + 0xa]
lea eax, [eax + eax*2 + 6]
movzx eax, byte [esi + eax*2]
add ecx, edi
test eax, eax
jne 0x41f460
test ecx, ecx
je 0x41f7d6
test edx, edx
je 0x41f48d
lea ecx, [edx + edx*2]
movzx eax, word [esi + ecx*2 + 8]
add eax, dword [esi + 4]
push str.websocket
push eax
call fcn.004b92d9
add esp, 8
test eax, eax
jne 0x41f4ec
mov eax, dword [ebx + 0xec]
mov esi, 1
add dword [eax + 0x150], esi
cmp dword [ebx + 0xfc], 0
jne 0x41f4c6
push str.NULL_protocol_at_lws_read_n
call fcn.004214d0
add esp, 4
push 0x7f
lea edx, [esp + 0x54]
push edx
push ebx
mov eax, 0xc
call fcn.004245a0
add esp, 0xc
test eax, eax
jge 0x41f510
push str.protocol_list_too_long
call fcn.004214d0
add esp, 4
mov eax, dword [ebx]
mov ecx, dword [eax + 0xc74]
mov dword [eax + 0xc70], ecx
push 1
mov eax, ebx
call fcn.00424370
add esp, 4
mov eax, 1
jmp 0x41f808
push 0xc
mov ecx, ebx
call fcn.00424560
add esp, 4
mov byte [esp + eax + 0x50], 0
cmp byte [esp + 0x50], 0
lea ebp, [esp + 0x50]
mov dword [esp + 0x18], 0
je 0x41f61a
cmp dword [esp + 0x18], 0
jne 0x41f65f
xor eax, eax
mov cl, byte [ebp]
test cl, cl
je 0x41f560
cmp cl, 0x2c
je 0x41f560
mov byte [esp + eax + 0x28], cl
add eax, 1
add ebp, 1
cmp eax, 0x1f
jb 0x41f545
cmp byte [ebp], 0
mov byte [esp + eax + 0x28], 0
je 0x41f56e
add ebp, 1
mov edi, dword [ebx + 0xec]
xor edx, edx
mov dword [esp + 0x14], edx
mov eax, dword [edi + 0x118]
cmp dword [eax + 4], edx
je 0x41f609
xor eax, eax
jmp 0x41f590
mov ecx, dword [edi + 0x118]
mov eax, dword [eax + ecx]
test eax, eax
je 0x41f5ca
lea esi, [esp + 0x28]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x41f5c1
test cl, cl
je 0x41f5bd
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x41f5c1
add eax, 2
add esi, 2
test cl, cl
jne 0x41f5a1
xor eax, eax
jmp 0x41f5c6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x41f5ef
mov ecx, dword [ebx + 0xec]
add edx, 1
lea eax, [edx + edx*2]
add eax, eax
add eax, eax
mov dword [esp + 0x14], edx
mov ecx, dword [ecx + 0x118]
add eax, eax
cmp dword [ecx + eax + 4], 0
jne 0x41f590
jmp 0x41f609
mov eax, dword [edi + 0x118]
lea edx, [edx + edx*2]
lea ecx, [eax + edx*8]
mov dword [ebx + 0xfc], ecx
mov dword [esp + 0x18], 1
cmp byte [ebp], 0
jne 0x41f538
cmp dword [esp + 0x18], 0
jne 0x41f65f
mov eax, dword [ebx]
movzx ecx, byte [eax + 0x424]
test ecx, ecx
je 0x41f638
lea edx, [ecx + ecx*2]
movzx ecx, word [eax + edx*2 + 8]
add ecx, dword [eax + 4]
jne 0x41f4ec
mov eax, dword [ebx + 0xec]
mov dword [esp + 0x14], 0
movzx ecx, byte [eax + 0x184]
mov eax, dword [eax + 0x118]
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*8]
mov dword [ebx + 0xfc], ecx
call fcn.00421290
test eax, eax
jne 0x41f4ec
mov ecx, dword [ebx]
movzx eax, byte [ecx + 0x424]
test eax, eax
je 0x41f684
lea edx, [eax + eax*2]
movzx eax, word [ecx + edx*2 + 8]
add eax, dword [ecx + 4]
mov edx, dword [ebx + 0x110]
mov ecx, dword [ebx + 0xfc]
push 0
push eax
mov eax, dword [ecx + 4]
push edx
push 0x14
push ebx
call eax
add esp, 0x14
test eax, eax
je 0x41f6b2
push str.User_code_denied_connection_n
mov esi, 2
jmp 0x41f4e4
cmp byte [ebx + 0x165], 0xd
jne 0x41f4ec
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, ebx
call fcn.00426450
add esp, 4
test eax, eax
jne 0x41f4ec
mov eax, dword [ebx + 0xec]
mov ecx, dword [esp + 0x14]
mov edx, dword [eax + 0x124]
add ecx, ecx
add ecx, ecx
add edx, ecx
mov dword [ebx + 0x100], edx
mov esi, dword [eax + 0x124]
mov esi, dword [ecx + esi]
lea edx, [ebx + 0x104]
mov dword [edx], esi
mov eax, dword [eax + 0x124]
mov dword [ecx + eax], ebx
mov eax, dword [edx]
test eax, eax
je 0x41f718
mov dword [eax + 0x100], edx
push 0xe0
push 0
mov ecx, 0xa
mov esi, ebx
lea edi, [esp + 0x30]
push ebx
rep movsd dword es:[edi], dword [esi]
call fcn.004bbbe0
mov ecx, 0xa
lea esi, [esp + 0x34]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0xfc]
mov byte [ebx + 0x166], 5
mov eax, dword [ecx + 0xc]
add esp, 0xc
test eax, eax
jne 0x41f75b
mov eax, 0x1000
add eax, 0x10
mov dword [esp + 0x14], eax
add eax, 4
push eax
push 0
call dword [0x543a94]
add esp, 8
test eax, eax
mov dword [ebx + 0x28], eax
jne 0x41f791
mov edx, dword [esp + 0x14]
push edx
push str.Out_of_Mem_allocating_rx_buffer__d_n
lea esi, [eax + 1]
call fcn.004214d0
add esp, 8
mov eax, esi
jmp 0x41f808
mov edx, dword [ebx + 0x13c]
mov eax, dword [esp + 0x14]
push 4
lea ecx, [esp + 0x18]
push ecx
push 0x1001
push 0xffff
push edx
mov dword [ebx + 0x2c], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x41f806
mov eax, dword [esp + 0x14]
push eax
push str.Failed_to_set_SNDBUF_to__d
mov esi, 2
call fcn.004214d0
add esp, 8
lea eax, [esi - 1]
jmp 0x41f808
push 0xe0
push 0
push ebx
call fcn.004bbbe0
add esp, 0xc
mov ecx, ebx
mov byte [ebx + 0x166], 2
mov byte [ebx + 0x167], 0
mov dword [ebx + 0x20], 0xffffffff
mov dword [ebx], esi
call fcn.0041e980
jmp 0x41f808
xor eax, eax
mov ecx, dword [esp + 0xd4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b883d
add esp, 0xc8
ret