Function at 0x180171240
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rdi
push r15
sub rsp, 0x98
mov rax, qword [rcx]
mov r15d, r9d
movzx ebx, r8w
mov rbp, rdx
mov rdi, rcx
call qword [rax + 0x170]
test eax, eax
je 0x180171579
mov rcx, rdi
call fcn.180168630
test eax, eax
je 0x180171579
mov rax, qword [rdi]
mov qword [rsp + 0xc8], rsi
mov rcx, rdi
mov qword [rsp + 0xd0], r12
mov qword [rsp + 0x90], r14
call qword [rax + 0x178]
xor esi, esi
mov rcx, rbp
mov dword [rdi + 0x18], 1
mov qword [rdi + 0x1c], 5
mov dword [rdi + 0x24], 1
mov word [rsp + 0x30], si
mov word [rsp + 0x70], si
call fcn.18015d2e0
lea r14d, [rsi + 0x1c]
mov word [rsp + 0x30], ax
lea r12d, [rsi + 0x10]
test ax, ax
je 0x180171348
cmp ax, 2
je 0x1801712fb
cmp ax, 0x17
je 0x1801712f6
mov ecx, 0x2741
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, esi
jmp 0x180171358
mov ecx, r14d
jmp 0x1801712fe
mov ecx, r12d
movzx edx, ax
lea rax, [rsp + 0xc0]
mov dword [rsp + 0xc0], ecx
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSAStringToAddressW]
test eax, eax
je 0x18017132e
mov eax, esi
jmp 0x180171358
test bx, bx
je 0x180171341
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x32], ax
mov eax, 1
jmp 0x180171358
lea r8, [rsp + 0x30]
movzx edx, bx
mov rcx, rbp
call fcn.18015d620
test eax, eax
je 0x180171512
lea rax, [rsp + 0x70]
lea r8, [rsp + 0x30]
movzx r9d, bx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xe0]
mov rdx, rbp
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.1801715f0
test eax, eax
je 0x180171512
movzx eax, word [rsp + 0x70]
cmp ax, 2
je 0x1801713cd
cmp ax, 0x17
je 0x1801713cd
movzx ebx, word [rsp + 0xe8]
test bx, bx
je 0x180171437
cmp ax, 2
je 0x1801713e5
cmp ax, 0x17
je 0x1801713e5
movzx ecx, word [rsp + 0x30]
call fcn.180163980
jmp 0x1801713ea
movzx ebx, word [rsp + 0xe8]
test bx, bx
jne 0x1801713b5
cmp ax, 2
lea rdx, [rsp + 0x70]
jmp 0x18017141d
lea rax, [rsp + 0x70]
movups xmm0, xmmword [rax]
movzx ecx, bx
movups xmmword [rsp + 0x50], xmm0
movsd xmm1, qword [rax + 0x10]
movsd qword [rsp + 0x60], xmm1
mov eax, dword [rax + 0x18]
mov dword [rsp + 0x68], eax
call qword [sym.imp.WS2_32.dll_htons]
cmp word [rsp + 0x50], 2
mov word [rsp + 0x52], ax
lea rdx, [rsp + 0x50]
mov rcx, qword [rdi + 0x28]
cmove r14d, r12d
mov r8d, r14d
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x180171503
mov eax, 1
lock xadd qword [0x18026e3b8], rax
inc rax
jne 0x18017145b
mov eax, 1
lock xadd qword [0x18026e3b8], rax
inc rax
xor ecx, ecx
mov qword [rdi + 0x38], rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rdi]
mov rdx, qword [rdi + 0x28]
mov rcx, rdi
call qword [rax + pe_nt_image_headers64]
cmp eax, 2
je 0x1801714ea
lea rdx, [rsp + 0x30]
mov r8d, r15d
mov rcx, rdi
call fcn.180171790
test eax, eax
je 0x1801714db
lea rax, [rdi + 0x60]
lea r8, [0x1801718e0]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
call fcn.18017b9a4
mov qword [rdi + 0x58], rax
test rax, rax
je 0x1801714cd
mov rcx, qword [rdi + 8]
mov esi, 1
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x180171552
mov dword [rdi + 0x64], 8
mov ecx, 0x65f
jmp 0x180171521
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x64], ntohs
jmp 0x18017151f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
mov dword [rdi + 0x64], 5
test eax, eax
cmove eax, ecx
jmp 0x18017151f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x64], 4
jmp 0x18017151f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x64], 3
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rdi + 0x18], esi
mov qword [rdi + 0x1c], 5
mov dword [rdi + 0x24], 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, qword [rdi]
mov rcx, rdi
mov ebx, eax
call qword [rdx + reloc.WS2_32.dll_htonl]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [rsp + 0x90]
mov r12, qword [rsp + 0xd0]
mov eax, esi
mov rsi, qword [rsp + 0xc8]
add rsp, 0x98
pop r15
pop rdi
pop rbp
pop rbx
ret
xor eax, eax
add rsp, 0x98
pop r15
pop rdi
pop rbp
pop rbx
ret