Function at 0x140122f10
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:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x668]
sub rsp, 0x768
mov rax, qword [0x1401dc478]
xor rax, rsp
mov qword [rbp + 0x650], rax
mov rsi, qword [rbp + 0x6e0]
xor eax, eax
movzx r13d, byte [rbp + 0x6d8]
mov ebx, r9d
mov qword [rsp + 0x58], rax
mov r12, r8
mov dword [rbp - 0x80], eax
mov eax, 1
mov dword [rbp - 0x7c], eax
mov edi, edx
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x38], edx
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x48], rsi
mov dword [rbp - 0x78], r13d
test rsi, rsi
je 0x140122f87
mov dword [rsi], 0xffffffff
mov r14d, dword [rbp + 0x6d0]
mov eax, 0x76c
mov r15d, 2
cmp ebx, 1
mov ecx, r15d
mov edx, r15d
cmove ebx, eax
mov eax, reloc.WS2_32.dll_socket
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 0x140123001
test rsi, rsi
je 0x140122fd0
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.140034970
xor eax, eax
jmp 0x1401239f4
xorps xmm0, xmm0
xor eax, eax
mov qword [rbp + 0x42], rax
mov dword [rbp + 0x4a], eax
mov word [rbp + 0x4e], ax
lea r15d, [rax + 0x10]
movups xmmword [rbp - 0x2e], xmm0
movups xmmword [rbp - 0x1e], xmm0
movups xmmword [rbp - 0xe], xmm0
movups xmmword [rbp + 2], xmm0
movups xmmword [rbp + 0x12], xmm0
movups xmmword [rbp + 0x22], xmm0
movups xmmword [rbp + 0x32], xmm0
test r14d, r14d
je 0x1401230ce
mov eax, reloc.WS2_32.dll_socket
mov word [rbp - 0x30], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x14012305a
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x2e], ax
movups xmm0, xmmword [0x140193de8]
movups xmmword [rbp - 0x28], xmm0
mov r14, qword [rsp + 0x30]
lea r9, [rbp - 0x7c]
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 0x140123264
test rsi, rsi
je 0x14012309d
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.140034970
jmp 0x1401239e6
mov eax, 2
mov word [rbp - 0x30], ax
lea eax, [rbx - 1]
cmp eax, 0xfffe
ja 0x1401230ee
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x2e], ax
lea rcx, str.223.255.255.255
mov dword [rbp - 0x2c], 0
call qword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, eax
lea rdx, [rsp + 0x70]
call sub.IPHLPAPI.DLL_GetBestInterface
test eax, eax
jne 0x140123065
xor r14d, r14d
mov eax, 0x3c00
mov dword [rsp + 0x40], 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 0x140123195
xor r8d, r8d
lea rax, [rsp + 0x40]
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 0x140123195
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 0x140123187
mov eax, dword [rsp + 0x40]
jmp 0x140123124
mov edi, dword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
jmp 0x140123065
test r14d, r14d
jne 0x140123255
mov rax, rdi
test rdi, rdi
je 0x140123187
mov edx, dword [rsp + 0x70]
nop word [rax + rax]
cmp dword [rax + 4], edx
jne 0x1401231be
mov rcx, qword [rax + 0x18]
test rcx, rcx
jne 0x1401231ee
mov rax, qword [rax + 8]
test rax, rax
jne 0x1401231b0
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 [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
jmp 0x14012306a
mov rsi, qword [rcx + 0x10]
lea r9, [rsp + 0x3c]
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 + 0x3c], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14012324a
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.140034970
mov eax, dword [rsi + 4]
mov dword [rbp - 0x2c], eax
jmp 0x1401231cc
mov r14, qword [rsp + 0x30]
test rdi, rdi
je 0x1401231e0
jmp 0x1401231cc
mov ebx, dword [rbp + 0x6d0]
mov r8d, 0xa
mov dword [rsp + 0x20], 4
test ebx, ebx
je 0x1401232d8
mov dword [rsp + 0x3c], r13d
lea r9, [rsp + 0x3c]
mov r13, qword [rsp + 0x30]
lea edx, [r8 + 0x1f]
mov rcx, r13
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140123328
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.140034970
mov ebx, dword [rbp + 0x6d0]
jmp 0x14012332e
mov r13, qword [rsp + 0x30]
lea r9, [rbp - 0x78]
mov rcx, r13
xor edx, edx
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140123328
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.140034970
mov ebx, dword [rbp + 0x6d0]
jmp 0x14012332e
mov r14d, 2
test r12, r12
je 0x14012339d
cmp byte [r12], 0
je 0x14012339d
test ebx, ebx
jne 0x14012339d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x3c], eax
cmp eax, 0xffffffff
je 0x14012339d
lea r9, [rsp + 0x3c]
mov dword [rbp - 0x2c], eax
xor edx, edx
mov dword [rsp + 0x20], 4
lea r8d, [rbx + 9]
mov rcx, r13
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14012339d
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.140034970
mov ebx, dword [rbp + 0x6d0]
lea rdx, [rbp - 0x30]
mov eax, 0x1c
test ebx, ebx
mov rcx, r13
cmovne r15d, eax
mov r8d, r15d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140123407
test rsi, rsi
je 0x1401233cd
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.140034970
mov rcx, r13
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1401239f4
mov r15, qword [rsp + 0x48]
test r15, r15
je 0x140123418
mov dword [r15], 0
mov r12, qword [rsp + 0x78]
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 [rbp - 0x74], ecx
cmp qword [r12], 0
mov dword [rsp + 0x38], eax
je 0x1401239e1
xor r14d, r14d
lea rdx, str._FF02::C_
test ebx, ebx
mov ebx, dword [rsp + 0x50]
je 0x14012346e
test ebx, ebx
lea r9, str._FF05::C_
cmovne r9, rdx
jmp 0x140123475
lea r9, str.239.255.255.250
mov rax, qword [r12]
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 + 0x50]
mov qword [rsp + 0x20], rax
call fcn.14001ed50
mov esi, eax
cmp eax, 0x600
jae 0x140123a17
xorps xmm0, xmm0
mov edi, 2
movups xmmword [rbp - 0x60], xmm0
mov dword [rbp - 0x58], edi
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
cmp dword [rbp + 0x6d0], r14d
je 0x1401234da
test ebx, ebx
lea rcx, str.FF05::C
lea rax, str.FF02::C
cmovne rcx, rax
jmp 0x1401234e1
lea rcx, str.239.255.255.250
lea r9, [rbp - 0x68]
lea r8, [rbp - 0x60]
lea rdx, str.1900
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
test eax, eax
jne 0x1401239bb
mov rdi, qword [rbp - 0x68]
test rdi, rdi
je 0x140123580
lea r15d, [rax + 2]
lea r12d, [rax + 1]
mov eax, dword [rdi + 0x10]
lea rdx, [rbp + 0x50]
mov dword [rsp + 0x28], eax
xor r9d, r9d
mov rax, qword [rdi + 0x20]
mov r8d, esi
mov rcx, r13
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov esi, eax
test eax, eax
jns 0x140123566
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.140034970
jmp 0x140123569
mov r14d, r12d
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x140123511
mov r15, qword [rsp + 0x48]
mov r12, qword [rsp + 0x78]
mov rdi, qword [rbp - 0x68]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r14d, r14d
jne 0x14012359c
test r15, r15
je 0x1401235a5
mov dword [r15], 0xffffff9b
jmp 0x1401235a5
cmp dword [rbp + 0x6e8], 0
je 0x1401235b1
cmp qword [r12 + 8], 0
jne 0x140123937
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, edx
shr eax, 6
mov dword [rsp + 0x3c], eax
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x70], ecx
jmp 0x1401235e5
mov r13, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x58]
nop word [rax + rax]
lea rcx, [rbp - 0x80]
mov r9d, eax
mov qword [rsp + 0x20], rcx
lea rdx, [rbp + 0x50]
mov rcx, r13
mov r8d, 0x600
call fcn.1401252a0
mov dword [rsp + 0x40], eax
mov esi, eax
test eax, eax
js 0x1401239a4
je 0x14012391f
xor r10d, r10d
mov qword [rsp + 0x60], r10
mov r12d, r10d
mov qword [rsp + 0x68], r10
mov r13d, r10d
mov qword [rbp - 0x70], r10
mov r15d, r10d
mov edx, r10d
mov ebx, r10d
mov ecx, r10d
mov edi, r10d
mov r14d, r10d
test eax, eax
jle 0x1401238e9
movzx eax, byte [rbp + r14 + 0x50]
cmp al, 0xa
je 0x14012368b
cmp al, 0xd
je 0x14012368b
mov r9, qword [rsp + 0x60]
mov r8, qword [rsp + 0x68]
cmp al, 0x3a
jne 0x140123783
test ebx, ebx
mov rax, r14
cmovne rax, rcx
mov rcx, rax
mov eax, edi
cmovne eax, ebx
mov ebx, eax
jmp 0x140123783
test ebx, ebx
je 0x140123776
lea rax, [rbp + 0x50]
add rax, rcx
nop word [rax + rax]
inc ebx
lea rax, [rax + 1]
cmp byte [rax], 0x20
je 0x1401236a0
movsxd rax, edx
lea rsi, [rbp + 0x50]
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 0x1401236f6
mov r8, qword [rsp + 0x68]
lea r9, [rbp + 0x50]
mov esi, dword [rsp + 0x40]
mov r12d, edi
movsxd rax, ebx
sub r12d, ebx
add r9, rax
xor ebx, ebx
xor ecx, ecx
mov qword [rsp + 0x60], r9
jmp 0x140123780
mov r8d, 3
lea rdx, [0x14019290c]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
test eax, eax
jne 0x140123734
mov r9, qword [rsp + 0x60]
lea r8, [rbp + 0x50]
mov esi, dword [rsp + 0x40]
mov r13d, edi
movsxd rax, ebx
sub r13d, ebx
add r8, rax
xor ebx, ebx
xor ecx, ecx
mov qword [rsp + 0x68], r8
jmp 0x140123780
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 + 0x60]
test eax, eax
jne 0x140123767
movsxd rax, ebx
lea r10, [rbp + 0x50]
add r10, rax
mov r15d, edi
mov qword [rbp - 0x70], r10
sub r15d, ebx
mov r8, qword [rsp + 0x68]
xor ebx, ebx
mov esi, dword [rsp + 0x40]
xor ecx, ecx
jmp 0x140123780
mov r9, qword [rsp + 0x60]
mov r8, qword [rsp + 0x68]
lea edx, [rdi + 1]
inc edi
inc r14
cmp edi, esi
jl 0x140123653
test r8, r8
je 0x1401238e9
test r9, r9
je 0x1401238e9
mov rax, qword [rsp + 0x58]
mov rbx, rax
test rax, rax
je 0x140123838
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 0x14012382b
mov rax, qword [rbx + 8]
cmp byte [rsi + rax], 0
jne 0x14012382b
mov rdx, qword [rsp + 0x68]
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 0x14012382b
mov rax, qword [rbx + 0x10]
cmp byte [r14 + rax], 0
jne 0x14012382b
test r15d, r15d
je 0x140123819
mov rdx, qword [rbp - 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 0x14012382b
mov rax, qword [rbx + 0x18]
cmp byte [rdi + rax], 0
mov eax, dword [rsp + 0x38]
je 0x1401235e0
mov rbx, qword [rbx]
mov r9, qword [rsp + 0x60]
test rbx, rbx
jne 0x1401237c0
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 0x140123976
mov rax, qword [rsp + 0x58]
lea rcx, [rbx + 0x24]
mov rdx, qword [rsp + 0x60]
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 + 0x68]
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 [rbp - 0x70]
mov byte [rcx + rbx + 0x25], 0
test rax, rax
je 0x1401238ca
mov rcx, qword [rbx + 0x18]
mov r8, rdi
mov rdx, rax
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [rsp + 0x40]
lea eax, [r15 + r13]
add eax, r12d
mov qword [rsp + 0x58], rbx
cdqe
mov byte [rax + rbx + 0x26], 0
mov eax, dword [rbp - 0x80]
mov dword [rbx + 0x20], eax
jmp 0x1401238ee
mov rbx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r13, qword [rsp + 0x30]
mov ecx, eax
imul eax, dword [rsp + 0x3c], 0x3e8
sub ecx, eax
mov eax, dword [rsp + 0x38]
sub ecx, dword [rsp + 0x70]
cmp ecx, eax
jg 0x14012392d
mov qword [rsp + 0x58], rbx
test esi, esi
jle 0x14012392d
jmp 0x1401235f0
test rbx, rbx
je 0x14012392d
cmp dword [rbp + 0x6e8], 0
je 0x14012398d
mov r12, qword [rsp + 0x78]
mov r15, qword [rsp + 0x48]
mov ebx, dword [rbp + 0x6d0]
test ebx, ebx
je 0x14012395e
cmp dword [rsp + 0x50], 0
je 0x140123956
mov dword [rsp + 0x50], 0
sub r12, 8
jmp 0x14012395e
mov dword [rsp + 0x50], 1
add r12, 8
mov qword [rsp + 0x78], r12
cmp qword [r12], 0
je 0x1401239e1
mov ecx, dword [rbp - 0x74]
jmp 0x14012344d
mov rax, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401239e6
mov dword [rax], 0xffffff9a
jmp 0x1401239e6
mov rax, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401239e6
mov dword [rax], 0
jmp 0x1401239e6
mov rax, qword [rsp + 0x48]
mov r14, qword [rsp + 0x30]
test rax, rax
je 0x1401239e6
mov dword [rax], 0xffffff9b
jmp 0x1401239e6
test r15, r15
je 0x1401239c7
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.140034970
mov r14, qword [rsp + 0x30]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rsp + 0x58]
mov rcx, qword [rbp + 0x650]
xor rcx, rsp
call fcn.1401623e0
add rsp, 0x768
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r14, qword [rsp + 0x30]
test r15, r15
je 0x1401239e6
mov dword [r15], 0xffffff9a
jmp 0x1401239e6