Function at 0x14001b180
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
cmp byte [rcx + 0x170], 0
mov rbx, rcx
mov r15, qword [rcx + 0x20]
mov byte [rcx + 0x11b], 1
jne case.0x14001b1ec.10
xor r12d, r12d
lea r13, [0x140000000]
mov ebp, 0x1af
lea r14, [0x1400b2934]
lea esi, [r12 + 9]
movsxd rax, dword [rbx + 0x120]
lea rdi, [0x1400b2ef4]
cmp eax, 0x16
ja case.0x14001b1ec.10
mov ecx, dword [r13 + rax*4 + 0x1bd18]
add rcx, r13
jmp rcx
lea rdx, [rsp + 0x78]
mov rcx, rbx
call fcn.1400199f0
test rax, rax
je 0x14001b22c
cmp byte [rax], r12b
je 0x14001b22c
mov r8, qword [rsp + 0x78]
mov rdx, rax
mov rcx, rbx
call fcn.140019de0
test eax, eax
je 0x14001b960
mov dword [rbx + 0x120], 1
jmp 0x14001bbad
cmp dword [rbx + 0x120], r12d
jmp 0x14001b70f
mov r9, qword [rbx + 0xb0]
test r9, r9
je 0x14001b2a5
mov rdx, qword [rbx + 0x78]
lea r8, [r9 - 1]
mov rax, r12
test r8, r8
je 0x14001b26a
movzx ecx, byte [rdx + rax]
cmp cl, 0xd
je 0x14001b26a
cmp cl, 0xa
je 0x14001b26a
inc rax
cmp rax, r8
jb 0x14001b254
cmp rax, r8
jne 0x14001b2b1
cmp byte [rdx + rax], 0xa
je 0x14001b2b1
cmp r9, qword [rbx + 0xa8]
jne 0x14001b2a5
mov rcx, rbx
call fcn.1400186d0
test eax, eax
jne 0x14001b2a5
cmp qword [rbx + 0x60], r12
lea r8, [0x1400b3f60]
mov edx, 0x19e
mov rcx, rbx
cmovne edx, ebp
call fcn.1400196c0
cmp dword [rbx + 0x120], 1
jmp 0x14001b70f
cmp byte [rdx + rax], 0xd
jne 0x14001b2c5
cmp byte [rdx + rax + 1], 0xa
jne 0x14001b2c5
mov byte [rdx + rax], r12b
inc rax
mov byte [rdx + rax], r12b
inc rax
add qword [rbx + 0x78], rax
sub qword [rbx + 0xa8], rax
sub qword [rbx + 0xb0], rax
test rdx, rdx
je 0x14001b2a5
cmp byte [rdx], r12b
jne 0x14001b302
sub rdx, qword [rbx + 0x78]
mov qword [rbx + 0xd0], rdx
mov dword [rbx + 0x120], 3
jmp 0x14001bbad
mov rcx, rbx
call fcn.14001a500
test eax, eax
je 0x14001bbbb
mov dword [rbx + 0x120], 2
jmp 0x14001bbad
mov r8, qword [rbx + 0xb0]
test r8, r8
je 0x14001b391
mov rdi, qword [rbx + 0x78]
lea rdx, [r8 - 1]
mov rax, r12
test rdx, rdx
je 0x14001b356
nop dword [rax]
movzx ecx, byte [rdi + rax]
cmp cl, 0xd
je 0x14001b356
cmp cl, 0xa
je 0x14001b356
inc rax
cmp rax, rdx
jb 0x14001b340
cmp rax, rdx
jne 0x14001b39d
cmp byte [rdi + rax], 0xa
je 0x14001b39d
cmp r8, qword [rbx + 0xa8]
jne 0x14001b391
mov rcx, rbx
call fcn.1400186d0
test eax, eax
jne 0x14001b391
cmp qword [rbx + 0x60], r12
lea r8, [0x1400b3f60]
mov edx, 0x19e
mov rcx, rbx
cmovne edx, ebp
call fcn.1400196c0
cmp dword [rbx + 0x120], 2
jmp 0x14001b70f
cmp byte [rdi + rax], 0xd
jne 0x14001b3b1
cmp byte [rdi + rax + 1], 0xa
jne 0x14001b3b1
mov byte [rdi + rax], r12b
inc rax
mov byte [rdi + rax], r12b
inc rax
add qword [rbx + 0x78], rax
sub qword [rbx + 0xa8], rax
sub qword [rbx + 0xb0], rax
test rdi, rdi
je 0x14001b391
mov r8d, 1
mov rdx, rdi
mov rcx, rbx
call fcn.14001a5e0
test eax, eax
je 0x14001bbad
cmp byte [rdi], r12b
jne 0x14001bbad
sub rdi, qword [rbx + 0x78]
mov qword [rbx + 0xd0], rdi
mov dword [rbx + 0x120], 3
jmp 0x14001bbad
mov rcx, rbx
call fcn.14001a760
cmp dword [rbx + 0x120], 0x13
je 0x14001bbad
mov dword [rbx + 0x120], 4
jmp 0x14001b78e
mov rcx, rbx
call fcn.140019f60
cmp dword [rbx + 0x120], 0x13
je 0x14001bbad
mov rcx, rbx
call fcn.140017ba0
test eax, eax
jne 0x14001bc38
cmp qword [rbx + 0x38], r12
je 0x14001b515
mov r11, qword [rbx + 0x58]
mov r9, rdi
movzx ecx, byte [r11]
test cl, cl
je 0x14001b4a9
mov r10, r11
sub r10, rdi
movzx r8d, byte [r9]
cmp cl, r8b
je 0x14001b49c
lea eax, [rcx - 0x41]
movsx edx, cl
cmp al, 0x19
ja 0x14001b489
add edx, 0x20
lea eax, [r8 - 0x41]
cmp al, 0x19
movsx eax, r8b
ja 0x14001b498
add eax, 0x20
cmp dl, al
jne 0x14001b4b6
movzx ecx, byte [r10 + r9 + 1]
inc r9
test cl, cl
jne 0x14001b473
mov eax, r12d
cmp byte [r9], al
sete al
test eax, eax
jne 0x14001b507
movzx ecx, byte [r11]
mov r9, r14
test cl, cl
je 0x14001b4fa
sub r11, r14
movzx r8d, byte [r9]
cmp cl, r8b
je 0x14001b4ed
lea eax, [rcx - 0x41]
movsx edx, cl
cmp al, 0x19
ja 0x14001b4da
add edx, 0x20
lea eax, [r8 - 0x41]
cmp al, 0x19
movsx eax, r8b
ja 0x14001b4e9
add eax, 0x20
cmp dl, al
jne 0x14001b515
movzx ecx, byte [r11 + r9 + 1]
inc r9
test cl, cl
jne 0x14001b4c4
mov eax, r12d
cmp byte [r9], al
sete al
test eax, eax
je 0x14001b515
mov qword [rbx + 0xd8], r12
mov byte [rbx + 0x119], 1
cmp qword [rbx + 0xd8], r12
mov eax, 6
cmove eax, esi
mov dword [rbx + 0x120], eax
jmp 0x14001b78e
cmp qword [rbx + 0xe8], 0x19
jne case.0x14001b1ec.10
mov dword [rbx + 0x120], 6
mov dword [rsp + 0x70], r12d
jmp 0x14001b91c
cmp qword [rbx + 0xb0], r12
je 0x14001b56f
mov rcx, rbx
call fcn.140019fe0
cmp dword [rbx + 0x120], 0x13
je 0x14001bbad
mov rax, qword [rbx + 0xd8]
test rax, rax
je 0x14001b59f
cmp rax, 0xffffffffffffffff
jne case.0x14001b1ec.10
cmp qword [rbx + 0xb0], r12
jne case.0x14001b1ec.10
cmp byte [rbx + 0x119], r12b
je case.0x14001b1ec.10
cmp byte [rbx + 0x12c], r12b
je 0x14001b788
cmp byte [rbx + 0x119], r12b
jne 0x14001b788
mov dword [rbx + 0x120], 7
jmp 0x14001b78e
mov r9, qword [rbx + 0xb0]
test r9, r9
je 0x14001b635
mov rdx, qword [rbx + 0x78]
lea r8, [r9 - 1]
mov rax, r12
test r8, r8
je 0x14001b5fa
movzx ecx, byte [rdx + rax]
cmp cl, 0xd
je 0x14001b5fa
cmp cl, 0xa
je 0x14001b5fa
inc rax
cmp rax, r8
jb 0x14001b5e4
cmp rax, r8
jne 0x14001b641
cmp byte [rdx + rax], 0xa
je 0x14001b641
cmp r9, qword [rbx + 0xa8]
jne 0x14001b635
mov rcx, rbx
call fcn.1400186d0
test eax, eax
jne 0x14001b635
cmp qword [rbx + 0x60], r12
lea r8, [0x1400b3f60]
mov edx, 0x19e
mov rcx, rbx
cmovne edx, ebp
call fcn.1400196c0
cmp dword [rbx + 0x120], 7
jmp 0x14001b70f
cmp byte [rdx + rax], 0xd
jne 0x14001b655
cmp byte [rdx + rax + 1], 0xa
jne 0x14001b655
mov byte [rdx + rax], r12b
inc rax
mov byte [rdx + rax], r12b
inc rax
add qword [rbx + 0x78], rax
sub qword [rbx + 0xa8], rax
sub qword [rbx + 0xb0], rax
test rdx, rdx
je 0x14001b635
cmp byte [rdx], r12b
je 0x14001b788
mov rcx, rbx
call fcn.14001a500
test eax, eax
je 0x14001bc72
mov dword [rbx + 0x120], 8
jmp 0x14001bbad
mov r8, qword [rbx + 0xb0]
test r8, r8
je 0x14001b708
mov rdi, qword [rbx + 0x78]
lea rdx, [r8 - 1]
mov rax, r12
test rdx, rdx
je 0x14001b6cd
movzx ecx, byte [rdi + rax]
cmp cl, 0xd
je 0x14001b6cd
cmp cl, 0xa
je 0x14001b6cd
inc rax
cmp rax, rdx
jb 0x14001b6b7
cmp rax, rdx
jne 0x14001b734
cmp byte [rdi + rax], 0xa
je 0x14001b734
cmp r8, qword [rbx + 0xa8]
jne 0x14001b708
mov rcx, rbx
call fcn.1400186d0
test eax, eax
jne 0x14001b708
cmp qword [rbx + 0x60], r12
lea r8, [0x1400b3f60]
mov edx, 0x19e
mov rcx, rbx
cmovne edx, ebp
call fcn.1400196c0
cmp dword [rbx + 0x120], 8
jne 0x14001bbad
cmp byte [rbx + 0x119], r12b
je case.0x14001b1ec.10
mov edx, 1
mov rcx, rbx
call fcn.140017cd0
jmp 0x14001bbad
cmp byte [rdi + rax], 0xd
jne 0x14001b748
cmp byte [rdi + rax + 1], 0xa
jne 0x14001b748
mov byte [rdi + rax], r12b
inc rax
mov byte [rdi + rax], r12b
inc rax
add qword [rbx + 0x78], rax
sub qword [rbx + 0xa8], rax
sub qword [rbx + 0xb0], rax
test rdi, rdi
je 0x14001b708
mov r8d, reloc.WS2_32.dll_recv
mov rdx, rdi
mov rcx, rbx
call fcn.14001a5e0
test eax, eax
je 0x14001bbad
cmp byte [rdi], r12b
jne 0x14001bbad
mov dword [rbx + 0x120], esi
cmp byte [rbx + 0x170], r12b
jne case.0x14001b1ec.10
jmp 0x14001bbad
mov rcx, rbx
call fcn.140019f60
cmp dword [rbx + 0x120], 0x13
je 0x14001bbad
cmp qword [rbx + 0x38], r12
je case.0x14001b1ec.10
mov rcx, rbx
call fcn.140018740
test eax, eax
jne 0x14001bc7e
lea rdx, [0x1400b33d8]
jmp 0x14001b957
mov rax, qword [rbx + 0x38]
lea r9, [rsp + 0x70]
mov rcx, qword [rbx + 0x110]
mov edx, 6
mov dword [rsp + 0x70], r12d
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
cmp qword [rax + 0x28], r12
je 0x14001b855
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0x38]
mov rdx, rbx
mov dword [rbx + 0x120], reloc.WS2_32.dll_shutdown
call fcn.14001c230
cmp eax, 1
je 0x14001b83a
mov edx, 1
mov rcx, rbx
call fcn.140017cd0
jmp 0x14001bbad
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x14001bbad
mov qword [rbx + 0x38], r12
call fcn.14001c390
jmp 0x14001bbad
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [rbx + 0x12c], r12b
mov eax, reloc.WS2_32.dll_listen
mov ecx, send
cmovne eax, ecx
mov dword [rbx + 0x120], eax
jmp 0x14001bbad
mov rcx, qword [rbx + 0x38]
cmp qword [rcx + 0x18], r12
je 0x14001b88e
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rbx + 0x38]
cmp qword [rcx + 0x60], r12
jne 0x14001bc8a
cmp qword [rcx + 0x18], r12
je 0x14001b8ac
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rbx + 0x120], reloc.WS2_32.dll_recv
jmp 0x14001bbad
mov rcx, qword [rbx + 0x38]
cmp qword [rcx + 0x18], r12
je 0x14001b8cf
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rbx + 0x38]
mov rax, qword [rcx + 0x60]
test rax, rax
je 0x14001b89c
cmp qword [rbx + 0xe0], rax
je 0x14001b89c
mov rcx, rbx
call fcn.140017ea0
mov rcx, qword [rbx + 0x38]
cmp eax, 1
jne 0x14001bcbb
cmp qword [rcx + 0x18], r12
je 0x14001b90a
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rbx + 0x120], send
mov dword [rsp + 0x70], 1
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x70]
mov edx, 6
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x14001bbad
mov rcx, rbx
call fcn.140018740
test eax, eax
jne 0x14001b972
lea rdx, str.Closing_connection__failed_to_create_response_header__n
mov rcx, qword [rbx + 0x20]
call fcn.14001d140
mov edx, 1
mov rcx, rbx
call fcn.140017cd0
jmp 0x14001bbad
cmp byte [rbx + 0x12c], r12b
je 0x14001b99a
mov rax, qword [rbx + 0xc8]
cmp qword [rbx + 0xc0], rax
je 0x14001b99a
mov dword [rbx + 0x120], send
jmp 0x14001bbad
mov dword [rbx + reloc.WS2_32.dll_select0], 0x12
jmp 0x14001bbad
cmp dword [rbx + 0x128], 0x66
jne 0x14001b9ce
mov rcx, qword [rbx + 0x38]
mov dword [rbx + 0x120], 4
call fcn.14001c390
mov qword [rbx + 0x38], r12
jmp 0x14001bbad
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x70]
mov edx, 6
mov dword [rsp + 0x70], r12d
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0x38]
call fcn.14001c390
mov qword [rbx + 0x38], r12
cmp qword [r15 + 0x70], r12
je 0x14001ba2b
cmp byte [rbx + 0x10c], r12b
je 0x14001ba2b
mov byte [rbx + 0x10c], r12b
lea r8, [rbx + 0x48]
mov rcx, qword [r15 + 0x78]
xor r9d, r9d
mov rdx, rbx
call qword [r15 + reloc.WS2_32.dll_WSASetLastError]
cmp dword [rbx + 0x70], 1
jne 0x14001bafd
cmp byte [rbx + 0x119], r12b
jne 0x14001bafd
mov rax, qword [rbx + 0x20]
mov rsi, qword [rbx + 0x78]
mov r14, qword [rbx + 0xb0]
mov rdi, qword [rbx + 0x40]
mov qword [rbx + 0x68], r12
mov dword [rbx + 0x120], r12d
mov qword [rbx + 0x88], r12
mov qword [rbx + 0x90], r12
mov qword [rbx + 0xd0], r12
mov dword [rbx + 0x70], r12d
mov rbp, qword [rax + 0xd8]
shr rbp, 1
test rsi, rsi
je 0x14001baa3
mov rcx, qword [rdi]
cmp rsi, rcx
je 0x14001baa3
test r14, r14
je 0x14001baa0
mov r8, r14
mov rdx, rsi
call fcn.140053cd0
mov rsi, qword [rdi]
mov r8, qword [rdi + 8]
mov qword [rdi + 0x18], r8
cmp r8, r14
jbe 0x14001bac0
mov rcx, qword [rdi]
sub r8, r14
add rcx, r14
xor edx, edx
call fcn.1400541f0
test rsi, rsi
je 0x14001bad1
lea rax, [rbp + 0xf]
and rax, 0xfffffffffffffff0
mov qword [rdi + 0x10], rax
mov rax, qword [rbx + 0x20]
lea r14, [0x1400b2934]
mov qword [rbx + 0x78], rsi
mov ebp, 0x1af
mov esi, 9
mov rcx, qword [rax + 0xd8]
shr rcx, 1
mov qword [rbx + 0xa8], rcx
jmp 0x14001bb4c
xor edx, edx
mov rcx, rbx
call fcn.140017cd0
mov rdi, qword [rbx + 0x40]
test rdi, rdi
je 0x14001bb36
mov rcx, qword [rdi]
cmp dword [rdi + 0x20], r12d
jne 0x14001bb20
call fcn.140056c3c
jmp 0x14001bb2e
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, rdi
call fcn.140056c3c
mov qword [rbx + 0x40], r12
mov qword [rbx + 0x78], r12
mov qword [rbx + 0xa8], r12
mov qword [rbx + 0xb0], r12
mov byte [rbx + 0x10c], r12b
mov qword [rbx + 0x48], r12
mov qword [rbx + 0xe8], r12
mov dword [rbx + 0x128], r12d
mov qword [rbx + 0x28], r12
mov qword [rbx + 0x30], r12
mov qword [rbx + 0xe0], r12
mov byte [rbx + 0x12c], r12b
mov qword [rbx + 0x130], r12
mov qword [rbx + 0x138], r12
mov qword [rbx + 0x58], r12
mov qword [rbx + 0x60], r12
mov qword [rbx + 0x80], r12
mov qword [rbx + 0xb8], r12
mov qword [rbx + 0xc0], r12
mov qword [rbx + 0xc8], r12
cmp byte [rbx + 0x170], r12b
jne case.0x14001b1ec.10
jmp 0x14001b1ca
lea r8, [0x1400b4ae0]
mov edx, 0x190
mov rcx, rbx
call fcn.1400196c0
cmp byte [rbx + 0x170], 0
jne 0x14001bce9
mov rdi, qword [rbx + 0x100]
test rdi, rdi
je 0x14001bce9
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
mov rcx, rax
movabs rax, 0x624dd2f1a9fbe77
sub rcx, qword [0x1400b93d0]
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 9
sub rcx, qword [rbx + 0xf8]
cmp rdi, rcx
jge 0x14001bce9
mov edx, 2
mov rcx, rbx
call fcn.140017cd0
jmp 0x14001bcf1
mov dword [rbx + 0x120], 5
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x70]
mov edx, 6
mov dword [rsp + 0x70], 1
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp case.0x14001b1ec.10
lea r8, str._html__head__title_Request_malformed__title___head__body_Your_HTTP_request_was_syntactically_incorrect.__body___html_
jmp 0x14001bbc2
mov dword [rbx + 0x120], 0xa
jmp 0x14001bc42
mov rcx, rbx
call fcn.140017d80
cmp eax, 1
jne case.0x14001b1ec.10
mov rcx, qword [rbx + 0x38]
cmp qword [rcx + 0x18], r12
je 0x14001bcaf
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rbx + 0x120], send
jmp 0x14001bc42
cmp qword [rcx + 0x18], r12
je case.0x14001b1ec.10
add rcx, 0x38
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp case.0x14001b1ec.10
mov rcx, rbx
call fcn.14001af90
xor eax, eax
jmp 0x14001bcfd
mov byte [rbx + 0x11b], r12b
jmp 0x14001bcf8
mov rcx, rbx
call fcn.1400197c0
mov byte [rbx + 0x11b], 0
mov eax, 1
mov rbx, qword [rsp + 0x80]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret