Function at 0x140041dd0
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, 0x23d0
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.140047050
movsxd rbp, eax
mov dword [r14 + rsi], ebx
test eax, eax
js 0x1400420a6
mov r15d, 0x100
test di, di
je 0x140042038
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.140041330
test eax, eax
je 0x1400420a3
mov eax, 0x2fe0
mov rax, qword [rax + rsi]
test rax, rax
jne 0x140041ea7
call fcn.140174cc4
cmp dword [rax], 0x2740
jne 0x140042074
lea rcx, [rsp + 0x30]
call fcn.140059840
test eax, eax
jne 0x1400420c1
mov r10, qword [rsp + 0x30]
mov ebx, r14d
mov esi, dword [r10]
test esi, esi
je 0x140041f1b
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 0x140041f11
cmp dword [r8], 2
je 0x140041f1b
inc ebx
add r8, 0x18
cmp ebx, esi
jb 0x140041ef0
mov rcx, r10
call fcn.140174cec
cmp ebx, esi
jae 0x140041f33
lea rdx, str.failed_bind____d:_have_listen_on_the_port
jmp 0x14004207b
cmp dword [rsp + 0xa0], r14d
jne 0x140042038
mov rax, qword [0x140270f68]
mov dword [rsp + 0xa8], r12d
test rax, rax
je 0x140041f79
lea r9, [rsp + 0xa8]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 4
mov ecx, ebp
call rax
jmp 0x14004202c
cmp qword [0x140270f18], r14
je 0x140041fc3
mov rax, qword [rsp + 0x38]
mov ecx, 0x23d4
cmp dword [rcx + rax], r14d
jne 0x140041fc3
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rsi, rbp
mov rbx, qword [rax + rbp*8]
call fcn.14002e7d0
test dword [rbx + 0x68], 0x10000000
jne 0x140041fc6
jmp 0x140041fc9
mov rsi, rbp
mov r12d, r14d
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rbx, qword [rax + rsi*8]
call fcn.14002e7d0
cmp qword [rbx + 0x40], r14
je 0x140041fff
cmp dword [rbx + 0xc], 2
jne 0x140041fff
cmp word [rbx + 0x6c], r14w
jne 0x14004202f
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.140170a40
mov r14d, eax
test r14d, r14d
jne 0x1400420d3
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.140041330
test eax, eax
je 0x1400420a3
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, 0x580003
call fcn.140028e10
mov ecx, ebp
call fcn.140048860
jmp 0x1400420a6
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, 0x580000
call fcn.1400292e0
int3
lea r8, str.SO_REUSEADDR
mov ecx, 0x580003
lea rdx, str.failed_setsockopt__s_:__m
call fcn.140028e10
lea rdx, str.failed_SO_REUSEADDR:__m
mov ecx, 0x580000
call fcn.1400292e0
int3