Function at 0x1401dda30
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 0x1401dda96
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 0x1401ddb10
test rsi, rsi
je 0x1401ddae0
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r15d
mov ebx, eax
call fcn.14020f614
mov rcx, rax
lea r8, str.socket
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
xor eax, eax
jmp 0x1401de539
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 0x1401ddbdd
mov eax, reloc.WS2_32.dll_socket
mov word [rbp - 0x80], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401ddb69
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x7e], ax
movups xmm0, xmmword [0x1402da338]
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 0x1401ddd7e
test rsi, rsi
je 0x1401ddbad
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call fcn.14020f614
mov rcx, rax
lea r8, str.setsockopt_SO_REUSEADDR_..._
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
jmp 0x1401de52b
mov eax, 2
mov word [rbp - 0x80], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401ddbfd
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 sub.IPHLPAPI.DLL_GetBestInterface
test eax, eax
jne 0x1401ddb74
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 0x1401ddcae
xor r8d, r8d
lea rax, [rbp + 0x688]
mov r9, rdi
mov qword [rsp + 0x20], rax
mov edx, r15d
lea ecx, [r8 + 2]
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
mov r14d, eax
cmp eax, 0x6f
jne 0x1401ddcae
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 0x1401ddc9c
mov eax, dword [rbp + 0x688]
jmp 0x1401ddc35
mov edi, dword [rbp + 0x678]
mov rsi, qword [rbp + 0x6a0]
jmp 0x1401ddb74
test r14d, r14d
jne 0x1401ddd6b
mov rax, rdi
test rdi, rdi
je 0x1401ddc9c
mov edx, dword [rsp + 0x38]
cmp dword [rax + 4], edx
jne 0x1401ddcd1
mov rcx, qword [rax + 0x18]
test rcx, rcx
jne 0x1401ddd05
mov rax, qword [rax + 8]
test rax, rax
jne 0x1401ddcc3
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 0x1401ddb79
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 0x1401ddd60
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call fcn.14020f614
mov rcx, rax
lea r8, str.setsockopt
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
mov eax, dword [rsi + 4]
mov dword [rbp - 0x7c], eax
jmp 0x1401ddcdf
mov r14, qword [rsp + 0x30]
test rdi, rdi
je 0x1401ddcf3
jmp 0x1401ddcdf
mov ebx, dword [rbp + 0x690]
mov r8d, 0xa
mov dword [rsp + 0x20], 4
test ebx, ebx
je 0x1401dddf5
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 0x1401dde45
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, 2
mov ebx, eax
mov ecx, r14d
call fcn.14020f614
mov rcx, rax
lea r8, str.setsockopt_IPV6_MULTICAST_HOPS_..._
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
mov ebx, dword [rbp + 0x690]
jmp 0x1401dde4b
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 0x1401dde45
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14d, 2
mov ebx, eax
mov ecx, r14d
call fcn.14020f614
mov rcx, rax
lea r8, str.setsockopt_IP_MULTICAST_TTL_..._
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
mov ebx, dword [rbp + 0x690]
jmp 0x1401dde4b
mov r14d, 2
test r13, r13
je 0x1401ddeb6
test ebx, ebx
jne 0x1401ddeb6
mov rcx, r13
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp + 0x688], eax
cmp eax, 0xffffffff
je 0x1401ddeb6
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 0x1401ddeb6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call fcn.14020f614
mov rcx, rax
lea r8, str.setsockopt_IP_MULTICAST_IF
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
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 0x1401ddf1f
test rsi, rsi
je 0x1401ddee6
mov dword [rsi], 0xffffff9b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r14d
mov ebx, eax
call fcn.14020f614
mov rcx, rax
lea r8, str.bind
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1401de539
mov r15, qword [rbp + 0x6a0]
test r15, r15
je 0x1401ddf32
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 0x1401de526
xor r14d, r14d
lea rdx, str._FF02::C_
test ebx, ebx
mov ebx, dword [rbp + 0x698]
je 0x1401ddf8f
test ebx, ebx
lea r9, str._FF05::C_
cmovne r9, rdx
jmp 0x1401ddf96
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.1401d81f0
mov esi, eax
cmp eax, 0x600
jae 0x1401de554
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 0x1401ddffb
test ebx, ebx
lea rcx, str.FF05::C
lea rax, str.FF02::C
cmovne rcx, rax
jmp 0x1401de002
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 0x1401de501
mov rdi, qword [rsp + 0x78]
test rdi, rdi
je 0x1401de0b3
lea r15d, [rax + 2]
lea r13d, [rax + 1]
nop dword [rax + rax]
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 0x1401de094
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, r15d
mov ebx, eax
call fcn.14020f614
mov rcx, rax
lea r8, str.sendto
mov r9d, ebx
lea rdx, str.Socket_error:__s___d_n
call fcn.14016d0d0
jmp 0x1401de097
mov r14d, r13d
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x1401de040
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 0x1401de0cf
test r15, r15
je 0x1401de0d8
mov dword [r15], 0xffffff9b
jmp 0x1401de0d8
cmp dword [rbp + 0x6a8], 0
je 0x1401de0e3
cmp qword [r13 + 8], 0
jne 0x1401de46e
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 0x1401de115
mov r12, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x40]
nop word [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.1401dfda0
mov dword [rsp + 0x38], eax
mov esi, eax
test eax, eax
js 0x1401de4e8
je 0x1401de452
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 0x1401de41a
movzx eax, byte [rbp + r14 + 0x30]
cmp al, 0xa
je 0x1401de1bd
cmp al, 0xd
je 0x1401de1bd
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
cmp al, 0x3a
jne 0x1401de2b1
test ebx, ebx
mov rax, r14
cmovne rax, rcx
mov rcx, rax
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x1401de2b1
test ebx, ebx
je 0x1401de2a4
lea rax, [rbp + 0x30]
add rax, rcx
nop dword [rax]
inc ebx
lea rax, [rax + 1]
cmp byte [rax], 0x20
je 0x1401de1d0
movsxd rax, edx
lea rsi, [rbp + 0x30]
add rsi, rax
lea rdx, str.location:
mov rcx, rsi
mov r8d, 9
call fcn.14021d430
test eax, eax
jne 0x1401de225
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 0x1401de2ae
mov r8d, 3
lea rdx, [0x1402d9e9c]
mov rcx, rsi
call fcn.14021d430
test eax, eax
jne 0x1401de262
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 0x1401de2ae
mov r8d, 4
lea rdx, str.usn:
mov rcx, rsi
call fcn.14021d430
mov r9, qword [rsp + 0x48]
test eax, eax
jne 0x1401de295
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 0x1401de2ae
mov r9, qword [rsp + 0x48]
mov r8, qword [rsp + 0x50]
lea edx, [rdi + 1]
inc edi
inc r14
cmp edi, esi
jl 0x1401de185
test r8, r8
je 0x1401de41a
test r9, r9
je 0x1401de41a
mov rax, qword [rsp + 0x40]
mov rbx, rax
test rax, rax
je 0x1401de368
movsxd rsi, r12d
movsxd r14, r13d
movsxd rdi, r15d
nop word [rax + rax]
mov rcx, qword [rbx + 8]
mov r8, rsi
mov rdx, r9
call fcn.14021d350
test eax, eax
jne 0x1401de35b
mov rax, qword [rbx + 8]
cmp byte [rsi + rax], 0
jne 0x1401de35b
mov rdx, qword [rsp + 0x50]
mov r8, r14
mov rcx, qword [rbx + 0x10]
call fcn.14021d350
test eax, eax
jne 0x1401de35b
mov rax, qword [rbx + 0x10]
cmp byte [r14 + rax], 0
jne 0x1401de35b
test r15d, r15d
je 0x1401de347
mov rdx, qword [rsp + 0x70]
mov r8, rdi
mov rcx, qword [rbx + 0x18]
call fcn.14021d350
test eax, eax
jne 0x1401de35b
mov rax, qword [rbx + 0x18]
cmp byte [rdi + rax], 0
mov eax, dword [rbp + 0x688]
je 0x1401de110
mov rbx, qword [rbx]
mov r9, qword [rsp + 0x48]
test rbx, rbx
jne 0x1401de2f0
movsxd rsi, r13d
movsxd rdi, r15d
movsxd r14, r12d
lea rcx, [rsi + 0x2b]
add rcx, rdi
add rcx, r14
call fcn.140218fdc
mov rbx, rax
test rax, rax
je 0x1401de4b6
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 fcn.140207eb0
mov rdx, qword [rsp + 0x50]
mov r8, rsi
mov byte [rbx + r14 + 0x24], 0
mov rcx, qword [rbx + 0x10]
call fcn.140207eb0
lea eax, [r12 + r13]
movsxd rcx, eax
mov rax, qword [rsp + 0x70]
mov byte [rcx + rbx + 0x25], 0
test rax, rax
je 0x1401de3fa
mov rcx, qword [rbx + 0x18]
mov r8, rdi
mov rdx, rax
call fcn.140207eb0
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 0x1401de41f
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 0x1401de460
mov qword [rsp + 0x40], rbx
test esi, esi
jle 0x1401de460
jmp 0x1401de120
test rbx, rbx
je 0x1401de460
cmp dword [rbp + 0x6a8], 0
je 0x1401de4cf
mov r13, qword [rbp + 0x670]
mov r15, qword [rbp + 0x6a0]
mov ebx, dword [rbp + 0x690]
test ebx, ebx
je 0x1401de49b
cmp dword [rbp + 0x698], 0
je 0x1401de491
mov dword [rbp + 0x698], 0
sub r13, 8
jmp 0x1401de49b
mov dword [rbp + 0x698], 1
add r13, 8
mov qword [rbp + 0x670], r13
cmp qword [r13], 0
je 0x1401de526
mov ecx, dword [rsp + 0x6c]
jmp 0x1401ddf6c
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401de52b
mov dword [rax], 0xffffff9a
jmp 0x1401de52b
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401de52b
mov dword [rax], 0
jmp 0x1401de52b
mov rax, qword [rbp + 0x6a0]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401de52b
mov dword [rax], 0xffffff9b
jmp 0x1401de52b
test r15, r15
je 0x1401de50d
mov dword [r15], 0xffffff9b
mov ecx, edi
call fcn.14020f614
mov rcx, rax
lea rdx, str.getaddrinfo___failed:__d_n
mov r8d, ebx
call fcn.14016d0d0
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 0x1401de52b
mov dword [r15], 0xffffff9a
jmp 0x1401de52b