Function at 0x140012a10
Capabilities:
Set socket configuration

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0xff0]
mov eax, 0x10f0
call fcn.140167760
sub rsp, rax
mov rax, qword [0x140205108]
xor rax, rsp
mov qword [rbp + 0xfb0], rax
mov rdi, qword [rbp + 0x1030]
mov r14d, ecx
mov dword [rsp + 0x30], ecx
lea rcx, [0x1401fe050]
mov qword [rsp + 0x70], r9
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x38], rdi
cmp r14d, 2
jne 0x140012a7f
lea rcx, [0x1401fe020]
call fcn.140012320
test eax, eax
je 0x140012a92
jmp 0x14001332d
cmp r14d, 0x17
jne 0x140012a92
call fcn.140012320
test eax, eax
jne 0x14001332d
mov qword [rsp + 0x10e8], rbx
lea rdx, [0x140212f28]
mov qword [rsp + 0x10d8], r12
mov ebx, 1
mov qword [rsp + 0x10d0], r13
mov r13d, dword [rbp + 0x1038]
mov qword [rsp + 0x10c8], r15
lea r15d, [rbx + 3]
lea r12d, [rbx + 0xf]
test r13d, r13d
je 0x140012afe
cmp word [0x140212f20], 0x17
lea rcx, [0x140212f24]
mov r8d, r15d
cmove rcx, rdx
cmove r8d, r12d
mov rdx, qword [0x1401fe220]
call fcn.14016bbc0
test eax, eax
mov eax, ebx
jne 0x140012b04
mov eax, dword [0x14020f4b8]
cdqe
mov qword [rsp + 0x10e0], rsi
mov qword [rsp + 0x68], rax
test rax, rax
jle 0x140013303
lea rax, [0x14020f410]
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x40], rax
lea rsi, [rbp - 0x5e]
test rdi, rdi
je 0x140012b4f
test r13d, r13d
jne 0x140012b4f
lea rbx, [rdi + 0x1f8]
lea r14, [rdi + 0x214]
jmp 0x140012b71
lea rbx, [rsp + 0x78]
test rdi, rdi
je 0x140012b67
test r13d, r13d
jne 0x140012b67
lea r14, [rdi + 0x214]
jmp 0x140012b71
lea r14, [rsp + 0x78]
lea rbx, [rsp + 0x78]
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rax
mov dword [rbx + 0x18], eax
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], rax
mov dword [r14 + 0x18], eax
test r13d, r13d
je 0x140012bda
movzx edi, word [0x140212f20]
lea rax, [0x140212f28]
mov rdx, qword [0x1401fe220]
lea rcx, [0x140212f24]
cmp di, 0x17
mov r8, r15
cmove r8, r12
cmove rcx, rax
call fcn.14016bbc0
test eax, eax
je 0x140012bda
mov r12d, dword [0x140212f3c]
movzx r9d, di
mov word [rbx], di
mov rdi, qword [rsp + 0x40]
jmp 0x140012beb
mov rdi, qword [rsp + 0x40]
movzx r9d, word [rdi]
mov r12d, dword [rdi + 0x1c]
mov word [rbx], r9w
test r12d, r12d
mov eax, 6
mov r8d, reloc.WS2_32.dll_recvfrom
mov ecx, 2
cmovne r8d, eax
mov eax, r12d
neg eax
mov eax, reloc.WS2_32.dll_socket
sbb edx, edx
add edx, 2
cmp r9w, 0x17
cmove ecx, eax
call qword [0x1401fe230]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140013303
cmp word [rbx], 0x17
mov r8d, reloc.WS2_32.dll_recv
mov eax, 0x1c
mov rdx, rbx
cmove r8d, eax
mov rcx, r15
call qword [0x1401fe240]
test eax, eax
jne 0x1400132ec
lea ebx, [rax + 0x10]
test r13d, r13d
je 0x140012cb0
cmp word [0x140212f20], 0x17
lea rax, [0x140212f28]
mov rdx, qword [0x1401fe220]
lea rcx, [0x140212f24]
mov r8d, 4
cmove rcx, rax
cmove r8d, ebx
call fcn.14016bbc0
test eax, eax
je 0x140012cb0
movups xmm0, xmmword [0x140212f20]
movups xmmword [r14], xmm0
movsd xmm1, qword [0x140212f30]
movsd qword [r14 + 0x10], xmm1
mov eax, dword [0x140212f38]
jmp 0x140012cc5
movups xmm0, xmmword [rdi]
movups xmmword [r14], xmm0
movsd xmm1, qword [rdi + 0x10]
movsd qword [r14 + 0x10], xmm1
mov eax, dword [rdi + 0x18]
mov dword [r14 + 0x18], eax
test r12d, r12d
je 0x140012d1b
cmp word [r14], 0x17
mov eax, 0x1c
mov r8d, ebx
mov rdx, r14
cmove r8d, eax
mov rcx, r15
lea r9d, [rax - 0x14]
call fcn.140013c70
test eax, eax
jne 0x1400132ec
mov eax, 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], eax
mov r8d, eax
mov rcx, r15
lea edx, [rax + 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rsp + 0x50]
mov rdi, 0xffffffffffffffff
inc rdi
cmp byte [rax + rdi], 0
jne 0x140012d27
mov edx, edi
mov rcx, rax
call fcn.140014090
mov rdx, qword [rsp + 0x50]
lea rcx, [rbp - 0x51]
mov r13d, eax
mov qword [rbp - 0x5c], 0x1000001
mov eax, 0xff
mov word [rbp - 0x5e], r13w
cmp edi, eax
mov word [rbp - 0x54], 0
cmovg edi, eax
movsxd rbx, edi
mov r8, rbx
call fcn.14016bcc0
mov byte [rbp + rbx - 0x51], 0
lea rcx, [rbp - 0x51]
mov edx, 0x2e
lea rbx, [rbp - 0x52]
add edi, 0xd
call fcn.14016b930
test rax, rax
je 0x140012daf
nop dword [rax]
movzx ecx, al
mov edx, 0x2e
sub cl, bl
dec cl
mov byte [rbx], cl
lea rcx, [rax + 1]
mov rbx, rax
call fcn.14016b930
test rax, rax
jne 0x140012d90
movzx eax, dil
inc edi
sub al, bl
dec al
add al, sil
mov byte [rbx], al
movsxd rax, edi
inc edi
cmp dword [rbp + 0x1038], 1
mov byte [rbp + rax - 0x5e], 0
jne 0x140012dd8
mov ecx, reloc.WS2_32.dll_inet_ntoa
jmp 0x140012dea
cmp dword [rsp + 0x30], 0x17
mov ecx, 1
mov eax, 0x1c
cmove ecx, eax
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x5e], cl
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x5e], 0
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x5e], 1
test r12d, r12d
je 0x140012e20
movzx ecx, di
lea rsi, [rbp - 0x60]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x60], ax
add edi, 2
imul eax, dword [reloc.WS2_32.dll_getpeername], 0x3e8
mov r9d, edi
mov r8, rsi
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140027180
cmp eax, edi
je 0x140012e95
mov edx, 2
mov rcx, r15
call qword [0x1401fe2a0]
mov rcx, r15
call qword [0x1401fe2a8]
mov r12d, reloc.WS2_32.dll_recv
mov rcx, qword [rsp + 0x58]
add qword [rsp + 0x40], 0x20
inc rcx
mov qword [rsp + 0x58], rcx
cmp rcx, qword [rsp + 0x68]
jge 0x140013303
mov rdi, qword [rsp + 0x38]
mov r15d, 4
mov r13d, dword [rbp + 0x1038]
jmp 0x140012b31
cmp qword [rsp + 0x38], 0
je 0x140012eae
movsxd rax, edi
mov rdi, qword [rsp + 0x38]
add qword [rdi + 0x250], rax
jmp 0x140012eb3
mov rdi, qword [rsp + 0x38]
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
mov r9d, 0x1000
mov r8, rsi
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140026fd0
mov edx, 2
movsxd rbx, eax
mov rcx, r15
call qword [0x1401fe2a0]
mov rcx, r15
call qword [0x1401fe2a8]
cmp ebx, 0xd
jle 0x140012e5a
test rdi, rdi
je 0x140012f04
add qword [rdi + 0x258], rbx
test r12d, r12d
je 0x140012f60
movzx ecx, word [rsi]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x1000
sub ebx, 2
add rsi, 2
cmp ax, cx
ja 0x140012e5a
movzx edi, ax
cmp edi, ebx
jl 0x140012e5a
jle 0x140012f60
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
sub edi, ebx
movsxd r8, ebx
mov r9d, edi
add r8, rsi
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x20], eax
call fcn.140026fd0
cmp eax, edi
jne 0x140012e5a
cmp word [rsi], r13w
jne 0x140012e5a
movzx r8d, byte [rsi + 6]
mov r9d, 0x100
movzx eax, byte [rsi + 7]
imul r8d, r9d
add r8w, ax
cmp r8w, 1
jb 0x140013303
movzx edx, byte [rsi + 4]
movzx eax, byte [rsi + 5]
imul edx, r9d
add dx, ax
cmp dx, 1
jne 0x140012e5a
mov edx, reloc.WS2_32.dll_listen
cmp ebx, edx
jle 0x140012fc0
lea rax, [rsi + 0xd]
cmp byte [rax], 0
je 0x140012fc0
inc edx
inc rax
cmp edx, ebx
jl 0x140012fb2
add edx, 5
cmp edx, ebx
jge 0x140012e5a
mov r10d, 0xff
cmp r8w, r10w
jbe 0x140012fdb
movzx r8d, r10w
xor r9d, r9d
movzx r11d, r8w
lea r12d, [r9 + 0x10]
test r11d, r11d
je 0x140012e60
mov r14d, dword [rsp + 0x30]
lea r15d, [r9 + 4]
cmp r14d, 0x17
mov r10d, r12d
mov r13d, 0x1c
cmove r10d, r13d
nop dword [rax]
movsxd rax, edx
movzx eax, byte [rax + rsi]
cmp al, 0xc0
jae 0x140013042
nop dword [rax + rax]
test al, al
je 0x140013042
movzx r8d, al
lea eax, [rdx + 0xe]
add eax, r8d
cmp eax, ebx
jge 0x140013042
inc edx
add edx, r8d
movsxd rax, edx
movzx eax, byte [rax + rsi]
cmp al, 0xc0
jb 0x140013020
movsxd rax, edx
cmp byte [rax + rsi], 0
jne 0x14001304d
dec edx
lea eax, [r10 + rdx]
cmp eax, ebx
jg 0x140012e60
movsxd rdi, edx
movzx eax, byte [rdi + rsi + 0xb]
movzx r8d, byte [rdi + rsi + 0xa]
shl r8d, 8
add r8d, eax
lea eax, [rdx + 0xc]
add eax, r8d
mov edx, eax
cmp eax, ebx
jg 0x140012e60
cmp dword [rbp + 0x1038], 1
je 0x1400131f5
cmp byte [rdi + rsi + 2], 0
jne 0x140013203
movzx ecx, byte [rdi + rsi + 3]
cmp r14d, 0x17
mov eax, 1
cmove eax, r13d
cmp ecx, eax
jne 0x140013203
cmp r14d, 0x17
mov eax, r15d
cmove eax, r12d
cmp r8d, eax
jne 0x140013203
mov ecx, dword [rdi + rsi + 6]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp r14d, 0x17
lea rdx, [rsi + 0xc]
mov ebx, eax
cmove r15, r12
add rdx, rdi
mov r8, r15
mov r15, qword [rsp + 0x60]
mov rcx, r15
call fcn.14016bcc0
mov edi, 0xa8c0
mov r12d, 1
cmp ebx, edi
ja 0x140013106
test ebx, ebx
mov edi, ebx
cmove edi, r12d
lea rax, [0x1401fe050]
mov esi, edi
add rsi, qword [0x1401fe4a0]
lea rcx, [0x140212e20]
cmp r14d, 0x17
lea r14, [0x1401fe020]
cmove r14, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test r15, r15
je 0x140013247
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140013247
cmp qword [r14 + 0x18], 0
je 0x140013247
mov rbx, qword [r14 + 0x28]
test rbx, rbx
je 0x140013247
mov rax, qword [rbx + 0x18]
lea r8, [r14 + 8]
mov rdx, rbx
mov qword [r14 + 0x28], rax
call fcn.1400127b0
mov r8d, dword [r14 + 4]
lea rcx, [rbx + 0x20]
mov rdx, r15
call fcn.14016bcc0
mov qword [rbx + 0x10], rsi
xor edx, edx
xor r9d, r9d
mov qword [rbx + 0x18], r9
imul ecx, dword [rbx + 8], 0x11
imul eax, dword [rbx + 0xc], 0x1d
add eax, ecx
imul ecx, dword [rbx + 4], 7
add eax, ecx
mov ecx, dword [r14]
add eax, dword [rbx]
shr ecx, 2
div ecx
mov rax, qword [r14 + 0x18]
lea r8, [rdx*8]
mov rcx, qword [rax + r8]
lea rdx, [rax + r8]
test rcx, rcx
je 0x140013237
nop word [rax + rax]
mov rax, qword [0x1401fe4a0]
cmp qword [rcx + 0x10], rax
jl 0x140013214
mov rax, qword [rbx]
cmp rax, qword [rcx]
jne 0x1400131ef
mov rax, qword [rbx + 8]
cmp rax, qword [rcx + 8]
je 0x140013214
lea rdx, [rcx + 0x18]
jmp 0x14001322b
cmp byte [rdi + rsi + 2], 0
jne 0x140013203
cmp byte [rdi + rsi + 3], 0xc
je 0x140013268
inc r9d
cmp r9d, r11d
jl 0x140013010
jmp 0x140012e60
mov rax, qword [rcx + 0x18]
mov qword [rdx], rax
mov qword [rcx + 0x10], r9
mov rax, qword [r14 + 0x28]
mov qword [rcx + 0x18], rax
mov qword [r14 + 0x28], rcx
mov rcx, qword [rdx]
test rcx, rcx
jne 0x1400131d0
mov rax, qword [r14 + 0x18]
mov rax, qword [rax + r8]
mov qword [rbx + 0x18], rax
mov rax, qword [r14 + 0x18]
mov qword [r8 + rax], rbx
lea rcx, [0x140212e20]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140013260
mov dword [rcx], edi
mov eax, r12d
jmp 0x140013305
movsxd rax, ebx
lea rdx, [rsi + 0xc]
add rax, rdi
lea r8, [rsi + 0xc]
add r8, rax
add rdx, rdi
cmp rdx, r8
jae 0x14001329a
movzx eax, byte [rdx]
test al, al
je 0x14001329a
lea rcx, [rdx + 1]
mov byte [rdx], 0x2e
add rcx, rax
mov rdx, rcx
cmp rcx, r8
jb 0x140013281
mov rbx, qword [rsp + 0x38]
mov byte [rdx], 0
mov rcx, qword [rbx + 0x160]
test rcx, rcx
je 0x1400132b3
call fcn.140176420
lea rcx, [rsi + 0xd]
add rcx, rdi
call fcn.140183a70
mov r8, qword [rsp + 0x60]
xor r9d, r9d
mov rdx, rax
mov dword [rsp + 0x28], 2
mov ecx, r14d
mov qword [rbx + 0x160], rax
mov qword [rsp + 0x20], 0
call fcn.140012a10
jmp 0x140013305
mov edx, 2
mov rcx, r15
call qword [0x1401fe2a0]
mov rcx, r15
call qword [0x1401fe2a8]
xor eax, eax
mov rsi, qword [rsp + 0x10e0]
mov r12, qword [rsp + 0x10d8]
mov r13, qword [rsp + 0x10d0]
mov rbx, qword [rsp + 0x10e8]
mov r15, qword [rsp + 0x10c8]
mov rcx, qword [rbp + 0xfb0]
xor rcx, rsp
call fcn.1401677c0
add rsp, 0x10f0
pop r14
pop rdi
pop rbp
ret