Function at 0x1401d9640
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 0x1401d96a6
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 0x1401d9721
test rsi, rsi
je 0x1401d96f0
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.14016b3f0
xor eax, eax
jmp 0x1401da14e
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 0x1401d97ef
mov eax, reloc.WS2_32.dll_socket
mov word [rbp - 0x80], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401d977a
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x7e], ax
movups xmm0, xmmword [0x1402846c8]
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 0x1401d9993
test rsi, rsi
je 0x1401d97be
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.14016b3f0
jmp 0x1401da140
mov eax, 2
mov word [rbp - 0x80], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401d980f
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 0x1401d9785
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 0x1401d98c2
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 0x1401d98c2
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 0x1401d98b0
mov eax, dword [rbp + 0x688]
jmp 0x1401d9848
mov edi, dword [rbp + 0x678]
mov rsi, qword [rbp + 0x6a0]
jmp 0x1401d9785
test r14d, r14d
jne 0x1401d9980
mov rax, rdi
test rdi, rdi
je 0x1401d98b0
mov edx, dword [rsp + 0x38]
cmp dword [rax + 4], edx
jne 0x1401d98e5
mov rcx, qword [rax + 0x18]
test rcx, rcx
jne 0x1401d9919
mov rax, qword [rax + 8]
test rax, rax
jne 0x1401d98d7
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 0x1401d978a
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 0x1401d9975
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.14016b3f0
mov eax, dword [rsi + 4]
mov dword [rbp - 0x7c], eax
jmp 0x1401d98f3
mov r14, qword [rsp + 0x30]
test rdi, rdi
je 0x1401d9907
jmp 0x1401d98f3
mov ebx, dword [rbp + 0x690]
mov r8d, 0xa
mov dword [rsp + 0x20], 4
test ebx, ebx
je 0x1401d9a0b
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 0x1401d9a5c
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.14016b3f0
mov ebx, dword [rbp + 0x690]
jmp 0x1401d9a62
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 0x1401d9a5c
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.14016b3f0
mov ebx, dword [rbp + 0x690]
jmp 0x1401d9a62
mov r14d, 2
test r13, r13
je 0x1401d9ace
test ebx, ebx
jne 0x1401d9ace
mov rcx, r13
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp + 0x688], eax
cmp eax, 0xffffffff
je 0x1401d9ace
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 0x1401d9ace
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.14016b3f0
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 0x1401d9b38
test rsi, rsi
je 0x1401d9afe
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.14016b3f0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1401da14e
mov r15, qword [rbp + 0x6a0]
test r15, r15
je 0x1401d9b4b
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 0x1401da13b
xor r14d, r14d
lea rdx, str._FF02::C_
test ebx, ebx
mov ebx, dword [rbp + 0x698]
je 0x1401d9ba8
test ebx, ebx
lea r9, str._FF05::C_
cmovne r9, rdx
jmp 0x1401d9baf
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.1401c22a0
mov esi, eax
cmp eax, 0x600
jae 0x1401da169
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 0x1401d9c14
test ebx, ebx
lea rcx, str.FF05::C
lea rax, str.FF02::C
cmovne rcx, rax
jmp 0x1401d9c1b
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 0x1401da115
mov rdi, qword [rsp + 0x78]
test rdi, rdi
je 0x1401d9cc5
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 0x1401d9ca6
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.14016b3f0
jmp 0x1401d9ca9
mov r14d, r13d
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x1401d9c51
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 0x1401d9ce1
test r15, r15
je 0x1401d9cea
mov dword [r15], 0xffffff9b
jmp 0x1401d9cea
cmp dword [rbp + 0x6a8], 0
je 0x1401d9cf5
cmp qword [r13 + 8], 0
jne 0x1401da082
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 0x1401d9d26
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.1401db9d0
mov dword [rsp + 0x38], eax
mov esi, eax
test eax, eax
js 0x1401da0fc
je 0x1401da066
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 0x1401da02e
movzx eax, byte [rbp + r14 + 0x30]
cmp al, 0xa
je 0x1401d9dcd
cmp al, 0xd
je 0x1401d9dcd
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
cmp al, 0x3a
jne 0x1401d9ec4
test ebx, ebx
mov rax, r14
cmovne rax, rcx
mov rcx, rax
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x1401d9ec4
test ebx, ebx
je 0x1401d9eb7
lea rax, [rbp + 0x30]
add rax, rcx
nop dword [rax]
inc ebx
lea rax, [rax + 1]
cmp byte [rax], 0x20
je 0x1401d9de0
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 0x1401d9e36
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 0x1401d9ec1
mov r8d, 3
lea rdx, [0x14028422c]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
test eax, eax
jne 0x1401d9e74
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 0x1401d9ec1
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 0x1401d9ea8
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 0x1401d9ec1
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
lea edx, [rdi + 1]
inc edi
inc r14
cmp edi, esi
jl 0x1401d9d95
test r8, r8
je 0x1401da02e
test r9, r9
je 0x1401da02e
mov rax, qword [rsp + 0x40]
mov rbx, rax
test rax, rax
je 0x1401d9f7b
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 0x1401d9f6e
mov rax, qword [rbx + 8]
cmp byte [rsi + rax], 0
jne 0x1401d9f6e
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 0x1401d9f6e
mov rax, qword [rbx + 0x10]
cmp byte [r14 + rax], 0
jne 0x1401d9f6e
test r15d, r15d
je 0x1401d9f5a
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 0x1401d9f6e
mov rax, qword [rbx + 0x18]
cmp byte [rdi + rax], 0
mov eax, dword [rbp + 0x688]
je 0x1401d9d21
mov rbx, qword [rbx]
mov r9, qword [rsp + 0x48]
test rbx, rbx
jne 0x1401d9f00
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 0x1401da0ca
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 0x1401da00e
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 0x1401da033
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 0x1401da074
mov qword [rsp + 0x40], rbx
test esi, esi
jle 0x1401da074
jmp 0x1401d9d30
test rbx, rbx
je 0x1401da074
cmp dword [rbp + 0x6a8], 0
je 0x1401da0e3
mov r13, qword [rbp + 0x670]
mov r15, qword [rbp + 0x6a0]
mov ebx, dword [rbp + 0x690]
test ebx, ebx
je 0x1401da0af
cmp dword [rbp + 0x698], 0
je 0x1401da0a5
mov dword [rbp + 0x698], 0
sub r13, 8
jmp 0x1401da0af
mov dword [rbp + 0x698], 1
add r13, 8
mov qword [rbp + 0x670], r13
cmp qword [r13], 0
je 0x1401da13b
mov ecx, dword [rsp + 0x6c]
jmp 0x1401d9b85
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401da140
mov dword [rax], 0xffffff9a
jmp 0x1401da140
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401da140
mov dword [rax], 0
jmp 0x1401da140
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401da140
mov dword [rax], 0xffffff9b
jmp 0x1401da140
test r15, r15
je 0x1401da121
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.14016b3f0
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 0x1401da140
mov dword [r15], 0xffffff9a
jmp 0x1401da140