Function at 0x1401d7600
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 qword [rsp + 0x18], rbx
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x630]
sub rsp, 0x730
movzx r12d, byte [rbp + 0x698]
xor eax, eax
mov rsi, qword [rbp + 0x6a0]
mov r13, r8
mov qword [rsp + 0x40], rax
mov edi, edx
mov dword [rsp + 0x5c], eax
mov eax, 1
mov dword [rsp + 0x60], eax
mov dword [rbp + 0x698], eax
mov dword [rsp + 0x64], r12d
test rsi, rsi
je 0x1401d7666
mov dword [rsi], 0xffffffff
mov r14d, dword [rbp + 0x690]
cmp r9d, eax
mov r15d, 2
mov eax, reloc.WS2_32.dll_socket
mov ecx, r15d
mov ebx, 0x76c
cmovne ebx, r9d
mov edx, r15d
test r14d, r14d
lea r8d, [r15 + 0xf]
cmovne ecx, eax
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x30], rax
cmp rax, 0xffffffffffffffff
jne 0x1401d76e1
test rsi, rsi
je 0x1401d76b0
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r15d
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.socket
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
xor eax, eax
jmp 0x1401d810e
xorps xmm0, xmm0
xor eax, eax
mov qword [rbp - 0xe], rax
mov dword [rbp - 6], eax
mov word [rbp - 2], ax
lea r15d, [rax + 0x10]
movups xmmword [rbp - 0x7e], xmm0
movups xmmword [rbp - 0x6e], xmm0
movups xmmword [rbp - 0x5e], xmm0
movups xmmword [rbp - 0x4e], xmm0
movups xmmword [rbp - 0x3e], xmm0
movups xmmword [rbp - 0x2e], xmm0
movups xmmword [rbp - 0x1e], xmm0
test r14d, r14d
je 0x1401d77af
mov eax, reloc.WS2_32.dll_socket
mov word [rbp - 0x80], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401d773a
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x7e], ax
movups xmm0, xmmword [0x140282ab8]
movups xmmword [rbp - 0x78], xmm0
mov r14, qword [rsp + 0x30]
lea r9, [rsp + 0x60]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 4
mov rcx, r14
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1401d7953
test rsi, rsi
je 0x1401d777e
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.setsockopt_SO_REUSEADDR_..._
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
jmp 0x1401d8100
mov eax, 2
mov word [rbp - 0x80], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401d77cf
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x7e], ax
lea rcx, str.223.255.255.255
mov dword [rbp - 0x7c], 0
call qword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, eax
lea rdx, [rsp + 0x38]
call qword [sym.imp.IPHLPAPI.DLL_GetBestInterface]
test eax, eax
jne 0x1401d7745
xor r14d, r14d
mov eax, 0x3c00
mov dword [rbp + 0x688], eax
xor esi, esi
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 rdi, rax
test rax, rax
je 0x1401d7882
xor r8d, r8d
lea rax, [rbp + 0x688]
mov r9, rdi
mov qword [rsp + 0x20], rax
mov edx, r15d
lea ecx, [r8 + 2]
call qword [sym.imp.IPHLPAPI.DLL_GetAdaptersAddresses]
mov r14d, eax
cmp eax, 0x6f
jne 0x1401d7882
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
inc esi
cmp esi, 3
jge 0x1401d7870
mov eax, dword [rbp + 0x688]
jmp 0x1401d7808
mov edi, dword [rbp + 0x678]
mov rsi, qword [rbp + 0x6a0]
jmp 0x1401d7745
test r14d, r14d
jne 0x1401d7940
mov rax, rdi
test rdi, rdi
je 0x1401d7870
mov edx, dword [rsp + 0x38]
cmp dword [rax + 4], edx
jne 0x1401d78a5
mov rcx, qword [rax + 0x18]
test rcx, rcx
jne 0x1401d78d9
mov rax, qword [rax + 8]
test rax, rax
jne 0x1401d7897
mov r14, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [rbp + 0x678]
mov rsi, qword [rbp + 0x6a0]
jmp 0x1401d774a
mov rsi, qword [rcx + 0x10]
lea r9, [rsp + 0x58]
mov r14, qword [rsp + 0x30]
xor edx, edx
mov rcx, r14
mov dword [rsp + 0x20], 4
mov eax, dword [rsi + 4]
lea r8d, [rdx + 9]
mov dword [rsp + 0x58], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1401d7935
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.setsockopt
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
mov eax, dword [rsi + 4]
mov dword [rbp - 0x7c], eax
jmp 0x1401d78b3
mov r14, qword [rsp + 0x30]
test rdi, rdi
je 0x1401d78c7
jmp 0x1401d78b3
mov ebx, dword [rbp + 0x690]
mov r8d, 0xa
mov dword [rsp + 0x20], 4
test ebx, ebx
je 0x1401d79cb
mov dword [rbp + 0x688], r12d
lea r9, [rbp + 0x688]
mov r12, qword [rsp + 0x30]
lea edx, [r8 + 0x1f]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1401d7a1c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, 2
mov ebx, eax
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.setsockopt_IPV6_MULTICAST_HOPS_..._
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
mov ebx, dword [rbp + 0x690]
jmp 0x1401d7a22
mov r12, qword [rsp + 0x30]
lea r9, [rsp + 0x64]
mov rcx, r12
xor edx, edx
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1401d7a1c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, 2
mov ebx, eax
mov ecx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.setsockopt_IP_MULTICAST_TTL_..._
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
mov ebx, dword [rbp + 0x690]
jmp 0x1401d7a22
mov r14d, 2
test r13, r13
je 0x1401d7a8e
test ebx, ebx
jne 0x1401d7a8e
mov rcx, r13
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp + 0x688], eax
cmp eax, 0xffffffff
je 0x1401d7a8e
lea r9, [rbp + 0x688]
mov dword [rbp - 0x7c], eax
xor edx, edx
mov dword [rsp + 0x20], 4
lea r8d, [rbx + 9]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1401d7a8e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.setsockopt_IP_MULTICAST_IF
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
mov ebx, dword [rbp + 0x690]
lea rdx, [rbp - 0x80]
mov eax, 0x1c
test ebx, ebx
mov rcx, r12
cmovne r15d, eax
mov r8d, r15d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1401d7af8
test rsi, rsi
je 0x1401d7abe
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.bind
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1401d810e
mov r15, qword [rbp + 0x6a0]
test r15, r15
je 0x1401d7b0b
mov dword [r15], 0
mov r13, qword [rbp + 0x670]
mov eax, 0x10624dd3
mul edi
mov eax, 1
shr edx, 6
test edx, edx
mov ecx, edx
cmove ecx, eax
mov eax, 0x3e8
cmovne eax, edi
mov dword [rsp + 0x6c], ecx
cmp qword [r13], 0
mov dword [rbp + 0x688], eax
je 0x1401d80fb
xor r14d, r14d
lea rdx, str._FF02::C_
test ebx, ebx
mov ebx, dword [rbp + 0x698]
je 0x1401d7b68
test ebx, ebx
lea r9, str._FF05::C_
cmovne r9, rdx
jmp 0x1401d7b6f
lea r9, str.239.255.255.250
mov rax, qword [r13]
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 dword [rsp + 0x28], ecx
mov edx, 0x600
lea rcx, [rbp + 0x30]
mov qword [rsp + 0x20], rax
call fcn.1401c0260
mov esi, eax
cmp eax, 0x600
jae 0x1401d8129
xorps xmm0, xmm0
mov edi, 2
movups xmmword [rbp], xmm0
mov dword [rbp + 8], edi
movups xmmword [rbp + 0x10], xmm0
movups xmmword [rbp + 0x20], xmm0
cmp dword [rbp + 0x690], r14d
je 0x1401d7bd4
test ebx, ebx
lea rcx, str.FF05::C
lea rax, str.FF02::C
cmovne rcx, rax
jmp 0x1401d7bdb
lea rcx, str.239.255.255.250
lea r9, [rsp + 0x78]
lea r8, [rbp]
lea rdx, str.1900
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
test eax, eax
jne 0x1401d80d5
mov rdi, qword [rsp + 0x78]
test rdi, rdi
je 0x1401d7c85
lea r15d, [rax + 2]
lea r13d, [rax + 1]
mov eax, dword [rdi + 0x10]
lea rdx, [rbp + 0x30]
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov rax, qword [rdi + 0x20]
mov r8d, esi
mov rcx, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov esi, eax
test eax, eax
jns 0x1401d7c66
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r15d
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, ebx
lea r8, str.sendto
mov rcx, rax
lea rdx, str.Socket_error:__s___d_n
call fcn.1401693b0
jmp 0x1401d7c69
mov r14d, r13d
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x1401d7c11
mov r15, qword [rbp + 0x6a0]
mov r13, qword [rbp + 0x670]
mov rdi, qword [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r14d, r14d
jne 0x1401d7ca1
test r15, r15
je 0x1401d7caa
mov dword [r15], 0xffffff9b
jmp 0x1401d7caa
cmp dword [rbp + 0x6a8], 0
je 0x1401d7cb5
cmp qword [r13 + 8], 0
jne 0x1401d8042
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, edx
shr eax, 6
mov dword [rsp + 0x58], eax
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, dword [rbp + 0x688]
mov dword [rsp + 0x68], ecx
jmp 0x1401d7ce6
mov r12, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x40]
nop dword [rax + rax]
lea rcx, [rsp + 0x5c]
mov r9d, eax
mov qword [rsp + 0x20], rcx
lea rdx, [rbp + 0x30]
mov rcx, r12
mov r8d, 0x600
call fcn.1401d9990
mov dword [rsp + 0x38], eax
mov esi, eax
test eax, eax
js 0x1401d80bc
je 0x1401d8026
xor r10d, r10d
mov qword [rsp + 0x48], r10
mov r12d, r10d
mov qword [rsp + 0x50], r10
mov r13d, r10d
mov qword [rsp + 0x70], r10
mov r15d, r10d
mov edx, r10d
mov ebx, r10d
mov ecx, r10d
mov edi, r10d
mov r14d, r10d
test eax, eax
jle 0x1401d7fee
movzx eax, byte [rbp + r14 + 0x30]
cmp al, 0xa
je 0x1401d7d8d
cmp al, 0xd
je 0x1401d7d8d
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
cmp al, 0x3a
jne 0x1401d7e84
test ebx, ebx
mov rax, r14
cmovne rax, rcx
mov rcx, rax
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x1401d7e84
test ebx, ebx
je 0x1401d7e77
lea rax, [rbp + 0x30]
add rax, rcx
nop dword [rax]
inc ebx
lea rax, [rax + 1]
cmp byte [rax], 0x20
je 0x1401d7da0
movsxd rax, edx
lea rsi, [rbp + 0x30]
add rsi, rax
lea rdx, str.location:
mov rcx, rsi
mov r8d, 9
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
test eax, eax
jne 0x1401d7df6
mov r8, qword [rsp + 0x50]
lea r9, [rbp + 0x30]
mov esi, dword [rsp + 0x38]
mov r12d, edi
movsxd rax, ebx
sub r12d, ebx
add r9, rax
xor ebx, ebx
xor ecx, ecx
mov qword [rsp + 0x48], r9
jmp 0x1401d7e81
mov r8d, 3
lea rdx, [0x14028261c]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
test eax, eax
jne 0x1401d7e34
mov r9, qword [rsp + 0x48]
lea r8, [rbp + 0x30]
mov esi, dword [rsp + 0x38]
mov r13d, edi
movsxd rax, ebx
sub r13d, ebx
add r8, rax
xor ebx, ebx
xor ecx, ecx
mov qword [rsp + 0x50], r8
jmp 0x1401d7e81
mov r8d, 4
lea rdx, str.usn:
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
mov r9, qword [rsp + 0x48]
test eax, eax
jne 0x1401d7e68
movsxd rax, ebx
lea r10, [rbp + 0x30]
add r10, rax
mov r15d, edi
mov qword [rsp + 0x70], r10
sub r15d, ebx
mov r8, qword [rsp + 0x50]
xor ebx, ebx
mov esi, dword [rsp + 0x38]
xor ecx, ecx
jmp 0x1401d7e81
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
lea edx, [rdi + 1]
inc edi
inc r14
cmp edi, esi
jl 0x1401d7d55
test r8, r8
je 0x1401d7fee
test r9, r9
je 0x1401d7fee
mov rax, qword [rsp + 0x40]
mov rbx, rax
test rax, rax
je 0x1401d7f3b
movsxd rsi, r12d
movsxd r14, r13d
movsxd rdi, r15d
nop dword [rax]
mov rcx, qword [rbx + 8]
mov r8, rsi
mov rdx, r9
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1401d7f2e
mov rax, qword [rbx + 8]
cmp byte [rsi + rax], 0
jne 0x1401d7f2e
mov rdx, qword [rsp + 0x50]
mov r8, r14
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1401d7f2e
mov rax, qword [rbx + 0x10]
cmp byte [r14 + rax], 0
jne 0x1401d7f2e
test r15d, r15d
je 0x1401d7f1a
mov rdx, qword [rsp + 0x70]
mov r8, rdi
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1401d7f2e
mov rax, qword [rbx + 0x18]
cmp byte [rdi + rax], 0
mov eax, dword [rbp + 0x688]
je 0x1401d7ce1
mov rbx, qword [rbx]
mov r9, qword [rsp + 0x48]
test rbx, rbx
jne 0x1401d7ec0
movsxd rsi, r13d
movsxd rdi, r15d
movsxd r14, r12d
lea rcx, [rsi + 0x2b]
add rcx, rdi
add rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x1401d808a
mov rax, qword [rsp + 0x40]
lea rcx, [rbx + 0x24]
mov rdx, qword [rsp + 0x48]
mov r8, r14
mov qword [rbx], rax
lea rax, [r14 + 0x25]
add rax, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rax
inc rax
add rax, rsi
mov qword [rbx + 0x18], rax
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x50]
mov r8, rsi
mov byte [rbx + r14 + 0x24], 0
mov rcx, qword [rbx + 0x10]
call sub.VCRUNTIME140.dll_memcpy
lea eax, [r12 + r13]
movsxd rcx, eax
mov rax, qword [rsp + 0x70]
mov byte [rcx + rbx + 0x25], 0
test rax, rax
je 0x1401d7fce
mov rcx, qword [rbx + 0x18]
mov r8, rdi
mov rdx, rax
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [rsp + 0x38]
lea eax, [r15 + r13]
add eax, r12d
mov qword [rsp + 0x40], rbx
cdqe
mov byte [rax + rbx + 0x26], 0
mov eax, dword [rsp + 0x5c]
mov dword [rbx + 0x20], eax
jmp 0x1401d7ff3
mov rbx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r12, qword [rsp + 0x30]
mov ecx, eax
imul eax, dword [rsp + 0x58], 0x3e8
sub ecx, eax
mov eax, dword [rbp + 0x688]
sub ecx, dword [rsp + 0x68]
cmp ecx, eax
jg 0x1401d8034
mov qword [rsp + 0x40], rbx
test esi, esi
jle 0x1401d8034
jmp 0x1401d7cf0
test rbx, rbx
je 0x1401d8034
cmp dword [rbp + 0x6a8], 0
je 0x1401d80a3
mov r13, qword [rbp + 0x670]
mov r15, qword [rbp + 0x6a0]
mov ebx, dword [rbp + 0x690]
test ebx, ebx
je 0x1401d806f
cmp dword [rbp + 0x698], 0
je 0x1401d8065
mov dword [rbp + 0x698], 0
sub r13, 8
jmp 0x1401d806f
mov dword [rbp + 0x698], 1
add r13, 8
mov qword [rbp + 0x670], r13
cmp qword [r13], 0
je 0x1401d80fb
mov ecx, dword [rsp + 0x6c]
jmp 0x1401d7b45
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401d8100
mov dword [rax], 0xffffff9a
jmp 0x1401d8100
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401d8100
mov dword [rax], 0
jmp 0x1401d8100
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401d8100
mov dword [rax], 0xffffff9b
jmp 0x1401d8100
test r15, r15
je 0x1401d80e1
mov dword [r15], 0xffffff9b
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.getaddrinfo___failed:__d_n
mov rcx, rax
call fcn.1401693b0
mov r14, qword [rsp + 0x30]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x780]
add rsp, 0x730
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r14, qword [rsp + 0x30]
test r15, r15
je 0x1401d8100
mov dword [r15], 0xffffff9a
jmp 0x1401d8100