Function at 0x140169fb0
Capabilities:
Connect socket
Get socket status
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x1e8]
sub rsp, 0x2c0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x140479080]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov rdi, rcx
xor r12d, r12d
cmp dword [rcx + 0x34], r12d
je 0x14016a021
cmp byte [0x1404a2d71], r12b
jne 0x14016a012
lea ecx, [r12 + 1]
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov byte [0x1404a2d71], 1
call qword [sym.imp.WINMM.dll_timeGetTime]
mov r15d, dword [rdi + 0x34]
add r15d, eax
jmp 0x14016a024
mov r15d, r12d
cmp qword [rdi + 0x50], r12
jne 0x14016a140
xor eax, eax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x48], 1
movzx edx, word [rdi + 0x28]
lea rcx, [rsp + 0x78]
call fcn.1401699f0
cmp qword [rax + 0x18], 0x10
jb 0x14016a06e
mov rax, qword [rax]
lea rcx, [rdi + 8]
cmp qword [rdi + 0x20], 0x10
jb 0x14016a07d
mov rcx, qword [rdi + 8]
lea r9, [rdi + 0x50]
lea r8, [rsp + 0x40]
mov rdx, rax
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
lea rcx, [rsp + 0x78]
call fcn.14000b5d0
test ebx, ebx
je 0x14016a140
lea rdx, [rdi + 8]
lea rcx, [0x1404a3288]
call fcn.1400ae190
test rax, rax
jne 0x14016a0cf
mov dword [rdi + 0x2c], 0x7d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x30], eax
mov al, 1
jmp 0x14016a3de
movzx edx, word [rdi + 0x28]
lea rcx, [rsp + 0x78]
call fcn.1401699f0
mov rbx, rax
cmp qword [rax + 0x18], 0x10
jb 0x14016a0ea
mov rbx, qword [rax]
lea rdx, [rdi + 8]
lea rcx, [0x1404a3288]
call fcn.1400ae330
cmp qword [rax + 0x18], 0x10
jb 0x14016a104
mov rax, qword [rax]
lea r9, [rdi + 0x50]
lea r8, [rsp + 0x40]
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
lea rcx, [rsp + 0x78]
call fcn.14000b5d0
test ebx, ebx
je 0x14016a140
mov dword [rdi + 0x2c], 0x83
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x30], eax
mov al, 1
jmp 0x14016a3de
cmp dword [rdi + 0x58], 0xffffffff
jne 0x14016a357
cmp dword [rdi + 0x38], 0
je 0x14016a2a9
mov rax, qword [rdi + 0x40]
mov rbx, qword [rax]
cmp rbx, rax
je 0x14016a2a9
cmp byte [0x1404a2d71], 0
jne 0x14016a17f
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov byte [0x1404a2d71], 1
call qword [sym.imp.WINMM.dll_timeGetTime]
cmp dword [rbx + 0x20], eax
jae 0x14016a254
movsxd rcx, dword [rbx + 0x1c]
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
movsxd rcx, dword [rbx + 0x1c]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rdx, rbx
mov r8, qword [rbx + 0x10]
movzx r9d, byte [r8 + 0x19]
test r9b, r9b
je 0x14016a1da
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x14016a1d5
cmp rbx, qword [rax + 0x10]
jne 0x14016a1d5
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x14016a1c2
mov rbx, rax
jmp 0x14016a1ff
mov rbx, r8
mov rcx, qword [r8]
cmp byte [rcx + 0x19], 0
jne 0x14016a1ff
nop word [rax + rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x14016a1f0
mov rax, rdx
test r9b, r9b
je 0x14016a226
mov rcx, qword [rdx + 8]
cmp byte [rcx + 0x19], 0
jne 0x14016a23c
cmp rax, qword [rcx + 0x10]
jne 0x14016a23c
mov rax, rcx
mov rcx, qword [rcx + 8]
cmp byte [rcx + 0x19], 0
je 0x14016a211
jmp 0x14016a23c
mov rcx, qword [r8]
cmp byte [rcx + 0x19], 0
jne 0x14016a23c
nop
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x14016a230
lea rcx, [rdi + 0x40]
call fcn.14000be40
mov edx, 0x28
mov rcx, rax
call fcn.14023ed44
jmp 0x14016a29f
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x14016a280
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x14016a27b
cmp rbx, qword [rax + 0x10]
jne 0x14016a27b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x14016a268
mov rbx, rax
jmp 0x14016a29f
mov rbx, rax
mov rcx, qword [rax]
cmp byte [rcx + 0x19], 0
jne 0x14016a29f
nop dword [rax]
mov rbx, rcx
mov rax, qword [rcx]
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x14016a290
cmp rbx, qword [rdi + 0x40]
jne 0x14016a164
mov rax, qword [rdi + 0x50]
mov r8d, dword [rax + 0xc]
mov edx, dword [rax + 8]
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov dword [rdi + 0x58], eax
cmp eax, 0xffffffff
jne 0x14016a2dc
mov dword [rdi + 0x2c], 0xaa
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x30], eax
mov al, 1
jmp 0x14016a3de
cmp dword [rdi + 0x34], 0
jne 0x14016a2ed
cmp byte [rdi + 0x65], 0
mov dword [rsp + 0x30], r12d
je 0x14016a2f5
mov dword [rsp + 0x30], 1
movsxd rcx, eax
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [rsp + 0x38], r12d
movsxd rcx, dword [rdi + 0x58]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov r8d, 0x80
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x34], 1
movsxd rcx, dword [rdi + 0x58]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov edx, 6
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp dword [rdi + 0x60], 0
jne 0x14016a42c
cmp dword [rdi + 0x34], 0
je 0x14016a38d
cmp byte [0x1404a2d71], 0
jne 0x14016a382
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov byte [0x1404a2d71], 1
call qword [sym.imp.WINMM.dll_timeGetTime]
cmp eax, r15d
jae 0x14016a393
cmp byte [rdi + 0x64], 0
je 0x14016a3a7
mov qword [rdi + 0x2c], 0xc3
mov rcx, rdi
call fcn.14016a920
mov al, 1
jmp 0x14016a3de
mov rdx, qword [rdi + 0x50]
movsxd rcx, dword [rdi + 0x58]
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14016a425
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14016a409
cmp byte [rdi + 0x65], 0
je 0x14016a425
mov dword [rdi + 0x60], 1
xor al, al
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.14023ed20
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov dword [rdi + 0x2c], 0xdd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x30], eax
mov rcx, rdi
call fcn.14016a920
mov al, 1
jmp 0x14016a3de
mov dword [rdi + 0x60], 1
cmp qword [rdi + 0x98], 0
je 0x14016a3dc
cmp dword [rdi + 0x34], 0
je 0x14016a44a
call fcn.1401ad120
cmp eax, r15d
jae 0x14016a641
cmp byte [rdi + 0x64], 0
jne 0x14016a641
cmp byte [rdi + 0x65], 0
je 0x14016a481
cmp dword [rdi + 0x34], 0
je 0x14016a481
cmp dword [rdi + 0x68], 0
jne 0x14016a470
call fcn.1401ad120
mov dword [rdi + 0x68], eax
jmp 0x14016a481
call fcn.1401ad120
sub eax, dword [rdi + 0x68]
cmp eax, dword [rdi + 0x34]
jae 0x14016a5ef
movsxd rcx, dword [rdi + 0x58]
mov qword [rbp - 0x58], rcx
mov dword [rbp - 0x60], 1
mov qword [rsp + 0x38], r12
inc ecx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rbp - 0x60]
xor edx, edx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x14016a635
test eax, eax
jne 0x14016a526
cmp dword [rdi + 0x60], 1
jne 0x14016a50c
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x34], 4
movsxd rcx, dword [rdi + 0x58]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1007
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [rsp + 0x30], 0
je 0x14016a50c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14016a60e
cmp byte [rdi + 0x65], 0
jne 0x14016a3dc
mov ecx, 1
call qword [case.0x14024b920.42]
jmp 0x14016a42c
mov dword [rdi + 0x60], 2
lea rcx, [rdi + 0x78]
call fcn.14016aad0
mov r9, rax
lea rcx, [rdi + 0x78]
call fcn.14016aad0
mov r8d, dword [rax + 8]
sub r8d, dword [rdi + 0x70]
mov rdx, qword [r9]
add rdx, qword [rdi + 0x70]
movsxd rcx, dword [rdi + 0x58]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
cmp ebx, 0xffffffff
jne 0x14016a57f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x14016a50c
mov dword [rdi + 0x2c], 0x152
jmp 0x14016a410
test eax, eax
jle 0x14016a599
cmp dword [rdi + 0x34], 0
je 0x14016a599
call fcn.1401ad120
mov r15d, eax
add r15d, dword [rdi + 0x34]
mov dword [rdi + 0x68], r12d
add qword [rdi + 0x70], rbx
mov r8, qword [rdi + 0x70]
lea rcx, [rdi + 0x78]
call fcn.14016aad0
cmp r8, qword [rax + 8]
jb 0x14016a42c
lea rcx, [rdi + 0x78]
call fcn.14016aad0
mov rcx, qword [rax]
call fcn.14023ed44
sub qword [rdi + 0x98], 1
jne 0x14016a5df
mov qword [rdi + 0x90], r12
mov qword [rdi + 0x70], r12
jmp 0x14016a42c
inc qword [rdi + 0x90]
mov qword [rdi + 0x70], r12
jmp 0x14016a42c
mov dword [rdi + 0x68], r12d
mov byte [rdi + 0x64], 0
mov qword [rdi + 0x2c], 0x104
mov rcx, rdi
call fcn.14016a920
mov al, 1
jmp 0x14016a3de
mov dword [rdi + 0x2c], 0x136
mov eax, dword [rsp + 0x30]
test eax, eax
jne 0x14016a623
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x30], eax
mov rcx, rdi
call fcn.14016a920
mov al, 1
jmp 0x14016a3de
mov dword [rdi + 0x2c], 0x121
jmp 0x14016a410
mov byte [rdi + 0x64], 0
mov qword [rdi + 0x2c], 0xf2
mov rcx, rdi
call fcn.14016a920
mov al, 1
jmp 0x14016a3de