Function at 0x1400407d0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword gs:[0x58]
or r13d, 0xffffffff
mov r14d, 0x22c8
mov r12d, 1
movzx edi, dx
mov ecx, r12d
mov rsi, qword [rax]
lea edx, [r13 + 7]
mov eax, r12d
mov qword [rsp + 0x38], rsi
mov ebx, dword [r14 + rsi]
test ebx, ebx
cmovne eax, ebx
xor r8d, r8d
mov dword [r14 + rsi], eax
call fcn.140045a70
movsxd rbp, eax
mov dword [r14 + rsi], ebx
test eax, eax
js 0x140040aa6
mov r15d, 0x100
test di, di
je 0x140040a38
xor eax, eax
lea r8d, [r13 + 0x11]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x48], rax
xor r14d, r14d
mov eax, 2
mov qword [rsp + 0x30], r14
mov word [rsp + 0x40], ax
mov ecx, ebp
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x44], eax
mov word [rsp + 0x42], di
call fcn.14003fd30
test eax, eax
je 0x140040aa3
mov eax, 0x2f80
mov rax, qword [rax + rsi]
test rax, rax
jne 0x1400408a7
call fcn.140176084
cmp dword [rax], 0x2740
jne 0x140040a74
lea rcx, [rsp + 0x30]
call fcn.14005a520
test eax, eax
jne 0x140040ac1
mov r10, qword [rsp + 0x30]
mov ebx, r14d
mov esi, dword [r10]
test esi, esi
je 0x14004091b
movzx eax, r15w
lea r8, [r10 + 4]
movzx r9d, di
imul r9d, eax
movzx eax, di
shr ax, 8
add r9w, ax
nop
movzx edx, word [r8 + 8]
mov ecx, edx
movzx eax, r15w
imul ecx, eax
shr dx, 8
add cx, dx
cmp cx, r9w
jne 0x140040911
cmp dword [r8], 2
je 0x14004091b
inc ebx
add r8, 0x18
cmp ebx, esi
jb 0x1400408f0
mov rcx, r10
call fcn.1401760ac
cmp ebx, esi
jae 0x140040933
lea rdx, str.failed_bind____d:_have_listen_on_the_port
jmp 0x140040a7b
cmp dword [rsp + 0xa0], r14d
jne 0x140040a38
mov rax, qword [0x14027dfc8]
mov dword [rsp + 0xa8], r12d
test rax, rax
je 0x140040979
lea r9, [rsp + 0xa8]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 4
mov ecx, ebp
call rax
jmp 0x140040a2c
cmp qword [0x14027e030], r14
je 0x1400409c3
mov rax, qword [rsp + 0x38]
mov ecx, 0x22cc
cmp dword [rcx + rax], r14d
jne 0x1400409c3
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rsi, rbp
mov rbx, qword [rax + rbp*8]
call sub.KERNEL32.dll_LeaveCriticalSection
test dword [rbx + 0x68], 0x10000000
jne 0x1400409c6
jmp 0x1400409c9
mov rsi, rbp
mov r12d, r14d
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rbx, qword [rax + rsi*8]
call sub.KERNEL32.dll_LeaveCriticalSection
cmp qword [rbx + 0x40], r14
je 0x1400409ff
cmp dword [rbx + 0xc], 2
jne 0x1400409ff
cmp word [rbx + 0x6c], r14w
jne 0x140040a2f
movsxd rcx, dword [rbx + 0x70]
lea r9, [rsp + 0xa8]
mov r8d, 4
mov dword [rsp + 0x20], 4
mov edx, 0xffff
call qword [sym.imp.WS2_32.dll_setsockopt]
movsxd rcx, eax
call fcn.140171010
mov r14d, eax
test r14d, r14d
jne 0x140040ad3
xor eax, eax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x48], rax
mov ecx, ebp
mov eax, 2
mov word [rsp + 0x42], di
mov word [rsp + 0x40], ax
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x44], eax
call fcn.14003fd30
test eax, eax
je 0x140040aa3
lea rdx, str.failed_bind____d:__m
movzx ecx, di
movzx eax, r15w
imul ecx, eax
shr di, 8
add cx, di
movzx r8d, cx
mov ecx, 0x4b0003
call fcn.14002d1f0
mov ecx, ebp
call fcn.140047290
jmp 0x140040aa6
mov r13d, ebp
mov eax, r13d
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.failed_getting_tcp_table
mov ecx, 0x4b0000
call fcn.14002d6c0
int3
lea r8, str.SO_REUSEADDR
mov ecx, 0x4b0003
lea rdx, str.failed_setsockopt__s_:__m
call fcn.14002d1f0
lea rdx, str.failed_SO_REUSEADDR:__m
mov ecx, 0x4b0000
call fcn.14002d6c0
int3