Function at 0x1400cd020
Capabilities:
Check for time delay via gettickcount
Get local ipv4 addresses
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x688]
sub rsp, 0x760
mov rax, qword [0x1401d4770]
xor rax, rsp
mov qword [rbp + 0x650], rax
mov rsi, qword [rbp + 0x6c0]
xor edi, edi
mov qword [rbp - 0x70], rsi
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x60], 1
lea r14d, [rdi + 2]
mov dword [rsp + 0x64], r14d
test rsi, rsi
je 0x1400cd086
or dword [rsi], 0xffffffff
mov r8d, reloc.WS2_32.dll_recvfrom
mov edx, r14d
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp - 0x68], rax
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x1400cd0e0
test rsi, rsi
je 0x1400cd0b0
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call fcn.14014b850
mov rcx, rax
lea r8, str.socket
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.140024ee0
xor eax, eax
jmp 0x1400cd88e
xor edx, edx
lea rcx, [rbp - 0x30]
mov r8d, 0x80
call fcn.140145ba0
lea rcx, str.223.255.255.255
mov word [rbp - 0x30], r14w
mov dword [rbp - 0x2c], edi
call qword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, eax
lea rdx, [rsp + 0x3c]
call qword [sym.imp.IPHLPAPI.DLL_GetBestInterface]
test eax, eax
jne 0x1400cd244
mov eax, 0x3c00
mov r15d, edi
mov dword [rsp + 0x38], eax
mov r12d, edi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x1400cd193
xor r8d, r8d
lea rax, [rsp + 0x38]
mov r9, r14
mov qword [rsp + 0x20], rax
lea edx, [r8 + 0x10]
lea ecx, [rdx - 0xe]
call qword [sym.imp.IPHLPAPI.DLL_GetAdaptersAddresses]
mov r15d, eax
cmp eax, 0x6f
jne 0x1400cd193
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
inc r12d
mov r14, rdi
cmp r12d, 3
jge 0x1400cd193
mov eax, dword [rsp + 0x38]
jmp 0x1400cd12a
test r15d, r15d
jne 0x1400cd225
mov rax, r14
test r14, r14
je 0x1400cd23e
mov edx, dword [rsp + 0x3c]
cmp dword [rax + 4], edx
jne 0x1400cd1ba
mov rcx, qword [rax + 0x18]
test rcx, rcx
jne 0x1400cd1c5
mov rax, qword [rax + 8]
test rax, rax
je 0x1400cd22a
jmp 0x1400cd1ac
mov r15, qword [rcx + 0x10]
lea r9, [rsp + 0x30]
xor edx, edx
mov dword [rsp + 0x20], 4
mov rcx, r13
mov eax, dword [r15 + 4]
lea r8d, [rdx + 9]
mov dword [rsp + 0x30], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400cd21c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call fcn.14014b850
mov rcx, rax
lea r8, str.setsockopt
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.140024ee0
mov eax, dword [r15 + 4]
mov dword [rbp - 0x2c], eax
jmp 0x1400cd22a
test r14, r14
je 0x1400cd23e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r14d, 2
lea r9, [rsp + 0x60]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 4
mov rcx, r13
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400cd2a2
test rsi, rsi
je 0x1400cd274
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call fcn.14014b850
mov rcx, rax
lea r8, str.setsockopt_SO_REUSEADDR_..._
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.140024ee0
jmp 0x1400cd87d
xor edx, edx
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x64]
mov rcx, r13
lea r8d, [rdx + 0xa]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400cd2eb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call fcn.14014b850
mov rcx, rax
lea r8, str.setsockopt_IP_MULTICAST_TTL_..._
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.140024ee0
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x30]
mov rcx, r13
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1400cd33b
test rsi, rsi
je 0x1400cd30d
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call fcn.14014b850
mov rcx, rax
lea r8, str.bind
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.140024ee0
jmp 0x1400cd882
test rsi, rsi
je 0x1400cd342
mov dword [rsi], edi
mov rax, qword [str.0:e_]
test rax, rax
je 0x1400cd87d
lea rcx, str.urn:schemas_upnp_org:service:WANIPConnection:1
mov qword [rbp - 0x78], rdi
mov qword [rsp + 0x78], rcx
mov dword [rsp + 0x28], 1
lea r9, str.239.255.255.250
lea r8, str.M_SEARCH__HTTP_1.1_r_nHOST:__s:1900_r_nST:__s_r_nMAN:__ssdp:discover__r_nMX:__u_r_n_r_n
mov qword [rsp + 0x20], rax
mov edx, 0x600
lea rcx, [rbp + 0x50]
mov r12d, edi
call fcn.14002b980
mov r15d, eax
cmp eax, 0x600
jae 0x1400cd872
xorps xmm0, xmm0
lea r9, [rbp - 0x80]
movups xmmword [rbp - 0x60], xmm0
lea r8, [rbp - 0x60]
mov dword [rbp - 0x58], r14d
lea rdx, str.1900
lea rcx, str.239.255.255.250
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
test eax, eax
jne 0x1400cd84b
mov r14, qword [rbp - 0x80]
test r14, r14
je 0x1400cd449
mov eax, dword [r14 + 0x10]
lea rdx, [rbp + 0x50]
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov rax, qword [r14 + 0x20]
mov r8d, r15d
mov rcx, r13
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov r15d, eax
test eax, eax
jns 0x1400cd436
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call fcn.14014b850
mov rcx, rax
lea r8, str.sendto
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.140024ee0
jmp 0x1400cd43c
mov r12d, 1
mov r14, qword [r14 + 0x28]
test r14, r14
jne 0x1400cd3de
mov r14, qword [rbp - 0x80]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r12d, r12d
jne 0x1400cd470
test rsi, rsi
je 0x1400cd462
mov dword [rsi], 0xffffff9b
mov rax, qword [rsp + 0x78]
cmp qword [rax], rdi
jne 0x1400cd809
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
mov eax, edx
shr eax, 6
imul ecx, eax, 0x3e8
mov dword [rsp + 0x68], eax
sub r8d, ecx
mov dword [rsp + 0x6c], r8d
mov rbx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov r9d, 0x3e8
mov r8d, 0x600
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x50]
mov rcx, r13
call fcn.1400cd914
mov dword [rsp + 0x3c], eax
mov r15d, eax
test eax, eax
js 0x1400cd83e
je 0x1400cd804
mov edx, edi
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], edx
mov r8d, edi
mov dword [rsp + 0x34], edi
mov ebx, edi
mov qword [rsp + 0x58], rdi
mov rcx, rdi
mov dword [rsp + 0x30], edi
mov r14d, edi
mov qword [rsp + 0x70], rdi
mov r12, rdi
jle 0x1400cd7ce
mov al, byte [rbp + r12 + 0x50]
cmp al, 0xa
je 0x1400cd53c
cmp al, 0xd
je 0x1400cd53c
mov r9d, dword [rsp + 0x34]
mov r10d, dword [rsp + 0x30]
mov r11, qword [rsp + 0x40]
cmp al, 0x3a
jne 0x1400cd645
test ebx, ebx
jne 0x1400cd645
mov ebx, r14d
mov rcx, r12
jmp 0x1400cd645
test ebx, ebx
je 0x1400cd632
lea rax, [rbp + 0x50]
add rax, rcx
inc rax
inc ebx
cmp byte [rax], 0x20
je 0x1400cd54b
movsxd rax, r8d
lea r15, [rbp + 0x50]
add r15, rax
lea rdx, str.location:
mov rcx, r15
mov r8d, 9
call fcn.14015c678
test eax, eax
jne 0x1400cd597
movsxd rax, ebx
lea r11, [rbp + 0x50]
add r11, rax
mov r9d, r14d
sub r9d, ebx
mov qword [rsp + 0x40], r11
mov dword [rsp + 0x34], r9d
jmp 0x1400cd61d
mov r8d, 3
lea rdx, [0x1401b3e54]
mov rcx, r15
call fcn.14015c678
test eax, eax
jne 0x1400cd5d6
mov r9d, dword [rsp + 0x34]
lea r11, [rbp + 0x50]
movsxd rax, ebx
mov r10d, r14d
add rax, r11
mov r11, qword [rsp + 0x40]
sub r10d, ebx
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x30], r10d
jmp 0x1400cd622
mov r8d, 4
lea rdx, str.usn:
mov rcx, r15
call fcn.14015c678
mov r9d, dword [rsp + 0x34]
test eax, eax
jne 0x1400cd618
mov r10d, dword [rsp + 0x30]
lea r11, [rbp + 0x50]
movsxd rax, ebx
mov edx, r14d
add rax, r11
mov r11, qword [rsp + 0x40]
sub edx, ebx
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x38], edx
jmp 0x1400cd626
mov r11, qword [rsp + 0x40]
mov r10d, dword [rsp + 0x30]
mov edx, dword [rsp + 0x38]
mov r15d, dword [rsp + 0x3c]
mov ebx, edi
mov rcx, rdi
jmp 0x1400cd641
mov r9d, dword [rsp + 0x34]
mov r10d, dword [rsp + 0x30]
mov r11, qword [rsp + 0x40]
lea r8d, [r14 + 1]
inc r14d
inc r12
cmp r14d, r15d
jl 0x1400cd505
cmp qword [rsp + 0x58], rdi
je 0x1400cd7ce
test r11, r11
je 0x1400cd7ce
mov rax, qword [rsp + 0x48]
mov rbx, rax
test rax, rax
je 0x1400cd708
mov r13d, dword [rsp + 0x38]
mov rsi, qword [rsp + 0x58]
movsxd r15, r9d
movsxd r12, r10d
movsxd r14, edx
mov rcx, qword [rbx + 8]
mov r8, r15
mov rdx, r11
call fcn.14014ae60
test eax, eax
jne 0x1400cd6ea
mov rax, qword [rbx + 8]
cmp byte [r15 + rax], dil
jne 0x1400cd6ea
mov rcx, qword [rbx + 0x10]
mov r8, r12
mov rdx, rsi
call fcn.14014ae60
test eax, eax
jne 0x1400cd6ea
mov rax, qword [rbx + 0x10]
cmp byte [r12 + rax], dil
jne 0x1400cd6ea
test r13d, r13d
je 0x1400cd6e0
mov rdx, qword [rsp + 0x70]
mov r8, r14
mov rcx, qword [rbx + 0x18]
call fcn.14014ae60
test eax, eax
jne 0x1400cd6ea
mov rax, qword [rbx + 0x18]
cmp byte [r14 + rax], dil
je 0x1400cd6f7
mov rbx, qword [rbx]
mov r11, qword [rsp + 0x40]
test rbx, rbx
jne 0x1400cd68c
mov rsi, qword [rbp - 0x70]
mov r13, qword [rbp - 0x68]
test rbx, rbx
jne 0x1400cd498
movsxd r14, dword [rsp + 0x38]
movsxd r12, dword [rsp + 0x30]
movsxd r15, dword [rsp + 0x34]
lea rax, [r14 + r12]
lea rcx, [r15 + 0x2b]
add rcx, rax
call fcn.1401515b0
mov rbx, rax
test rax, rax
je 0x1400cd872
mov rax, qword [rsp + 0x48]
lea rcx, [rbx + 0x24]
mov rdx, qword [rsp + 0x40]
lea r9, [r15 + 0x25]
add r9, rbx
mov qword [rbx], rax
mov qword [rbx + 0x10], r9
mov r8, r15
inc r9
mov qword [rbx + 8], rcx
add r9, r12
mov qword [rbx + 0x18], r9
call fcn.140145200
mov rdx, qword [rsp + 0x58]
mov r8, r12
mov byte [r15 + rbx + 0x24], dil
mov rcx, qword [rbx + 0x10]
call fcn.140145200
mov r15d, dword [rsp + 0x34]
mov r12d, dword [rsp + 0x30]
lea eax, [r12 + r15]
movsxd rcx, eax
mov rax, qword [rsp + 0x70]
mov byte [rcx + rbx + 0x25], dil
test rax, rax
je 0x1400cd7aa
mov rcx, qword [rbx + 0x18]
mov r8, r14
mov rdx, rax
call fcn.140145200
mov eax, dword [rsp + 0x38]
add eax, r12d
mov qword [rsp + 0x48], rbx
add eax, r15d
mov r15d, dword [rsp + 0x3c]
cdqe
mov byte [rax + rbx + 0x26], dil
mov eax, dword [rsp + 0x50]
mov dword [rbx + 0x20], eax
jmp 0x1400cd7d3
mov rbx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
imul ecx, dword [rsp + 0x68], 0x3e8
mov r8d, eax
sub r8d, ecx
sub r8d, dword [rsp + 0x6c]
cmp r8d, 0x3e8
jg 0x1400cd809
mov qword [rsp + 0x48], rbx
test r15d, r15d
jle 0x1400cd809
jmp 0x1400cd49d
test rbx, rbx
jne 0x1400cd835
mov rbx, qword [rbp - 0x78]
lea rax, str.0:e_
add qword [rsp + 0x78], 8
inc rbx
mov qword [rbp - 0x78], rbx
mov rax, qword [rax + rbx*8]
test rax, rax
je 0x1400cd87d
mov r14d, 2
jmp 0x1400cd362
test rsi, rsi
je 0x1400cd87d
mov dword [rsi], edi
jmp 0x1400cd87d
test rsi, rsi
je 0x1400cd87d
mov dword [rsi], 0xffffff9b
jmp 0x1400cd87d
test rsi, rsi
je 0x1400cd856
mov dword [rsi], 0xffffff9b
mov ecx, r14d
call fcn.14014b850
mov rcx, rax
lea rdx, str.getaddrinfo___failed:__d_n
mov r8d, ebx
call fcn.140024ee0
jmp 0x1400cd87d
test rsi, rsi
je 0x1400cd87d
mov dword [rsi], 0xffffff9a
mov rdi, qword [rsp + 0x48]
mov rcx, r13
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, rdi
mov rcx, qword [rbp + 0x650]
xor rcx, rsp
call fcn.140140c60
lea r11, [rsp + 0x760]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret