Function at 0x140001500
Capabilities:
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa8
mov rax, qword [0x140916040]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov word [rsp + 0x50], r9w
mov r14, r8
mov rdi, rdx
mov rsi, rcx
mov rbp, qword [rsp + 0x110]
mov rax, qword [rsp + 0x118]
mov qword [rsp + 0x78], rax
mov edx, 0x5e
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_StrChrW]
mov r15, rax
mov r13, 0xffffffffffffffff
test rax, rax
jne 0x14000157f
mov qword [rsp + 0x60], rdi
mov r12, rdi
mov qword [rsp + 0x68], rdi
xor ebx, ebx
mov r15d, ebx
mov dword [rsp + 0x70], ebx
jmp 0x1400015f4
sub r15, rdi
sar r15, 1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
movsxd rbx, eax
mov eax, 2
mul rbx
cmovb rax, r13
mov rcx, rax
call fcn.1408e8550
mov r12, rax
lea r8, [rbx + rbx]
mov rdx, rdi
mov rcx, rax
call fcn.140906ea0
movsxd rcx, r15d
xor ebx, ebx
mov word [r12 + rcx*2], bx
mov rdi, r12
mov qword [rsp + 0x60], r12
lea r12, [r12 + rcx*2]
add r12, 2
mov qword [rsp + 0x68], r12
mov r15d, 1
mov dword [rsp + 0x70], r15d
je 0x1400015ec
cmp word [r12], bx
jne 0x1400015f4
mov r12, rdi
mov qword [rsp + 0x68], rdi
mov r8, r14
movzx edx, word [rsp + 0x50]
mov rcx, rdi
call fcn.1408e5d50
test eax, eax
je 0x1400016ae
test rbp, rbp
je 0x14000168c
cmp word [rbp], 0
je 0x14000168c
mov rcx, rbp
call fcn.1408e5c80
mov rcx, qword [rsp + 0x78]
mov word [rcx], ax
cmp ax, 2
je 0x140001648
cmp ax, 0x17
je 0x140001641
mov ecx, 0x2741
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x1400016ae
mov edx, 0x1c
jmp 0x14000164d
mov edx, reloc.WS2_32.dll_recv
mov dword [rsp + 0x58], edx
movzx edx, ax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9, rcx
xor r8d, r8d
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_WSAStringToAddressW]
test eax, eax
jne 0x1400016ae
mov rax, qword [rsp + 0x78]
movzx eax, word [rax]
cmp word [r14], ax
je 0x14000168c
mov ecx, 0x273f
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x1400016ae
movzx ecx, word [r14]
mov edx, 1
mov r8d, 6
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, rax
mov qword [rsi + 0x28], rax
cmp rax, 0xffffffffffffffff
jne 0x1400016e1
test r15d, r15d
je 0x1400016bb
mov rcx, rdi
call fcn.1408e7f14
xor eax, eax
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1408e81d0
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov r8d, dword [rsi + 0x5c]
mov eax, dword [rsi + 0x60]
test r8d, r8d
je 0x1400016f6
test eax, eax
mov edx, 1
jne 0x1400016f8
mov edx, ebx
mov dword [rsp + 0x78], edx
mov dword [rsp + 0x7c], r8d
mov dword [rsp + 0x80], eax
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
mov r9d, ntohs
lea r8, [rsp + 0x78]
mov edx, 0x98000004
call qword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x140001755
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140001755
test eax, eax
jne 0x1400018da
mov edx, dword [rsi + 0x48]
mov rcx, qword [rsi + 0x28]
call fcn.1408e61f0
test eax, eax
jne 0x1400018da
mov eax, dword [rsi + 0x64]
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x58]
mov edx, 6
mov r8d, 1
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x1400018da
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
mov qword [rsi + 0x30], rax
lea r14, [rsi + 0xa8]
test r12, r12
je 0x140001846
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
mov r9d, r13d
mov r8, r12
xor edx, edx
mov ecx, 3
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ebp, [rax - 1]
test ebp, ebp
jle 0x140001846
mov rcx, qword [r14]
mov r10d, 1
sub r10d, dword [rcx - 8]
mov edx, dword [rcx - 0xc]
sub edx, ebp
or edx, r10d
jge 0x140001802
mov edx, ebp
mov rcx, r14
call fcn.1408e6de0
mov rax, qword [r14]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
mov r9d, r13d
mov r8, r12
xor edx, edx
mov ecx, 3
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rax, qword [r14]
cmp ebp, dword [rax - 0xc]
jg 0x1400018e5
mov dword [rax - 0x10], ebp
movsxd rcx, ebp
mov rax, qword [r14]
mov byte [rcx + rax], 0
jmp 0x14000189d
mov rax, qword [r14]
lea rdx, [rax - 0x18]
mov rbp, qword [rdx]
cmp dword [rdx + 8], 0
je 0x14000189d
cmp dword [rdx + 0x10], 0
jge 0x14000186d
cmp dword [rax - 0xc], 0
jl 0x1400018cf
mov dword [rax - 0x10], ebx
mov rax, qword [r14]
mov byte [rax], 0
jmp 0x14000189d
lock xadd dword [rdx + 0x10], r13d
sub r13d, 1
jg 0x140001882
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + htons]
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + 0x18]
add rax, 0x18
mov qword [r14], rax
mov r15d, dword [rsp + 0x70]
mov rdi, qword [rsp + 0x60]
movzx eax, word [rsp + 0x50]
mov word [rsi + 0xb0], ax
lea rcx, [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
nop
test r15d, r15d
je 0x1400018c5
mov rcx, rdi
call fcn.1408e7f14
mov eax, 1
jmp 0x1400016bd
mov ecx, 0x80070057
call fcn.1408e5c20
nop
mov ecx, 0x80004005
call fcn.1408e5c20
int3
mov ecx, 0x80070057
call fcn.1408e5c20
int3