Function at 0x42f720
Capabilities:
Check for time delay via gettickcount
Create tcp socket
Create udp socket
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 ebp
mov ebp, esp
sub esp, 0x6f8
mov eax, dword [0x501230]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
movzx ebx, byte [ebp + 0x1c]
push esi
mov dword [ebp - 0x6a4], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x68c], eax
mov dword [ebp - 0x690], 0
mov dword [ebp - 0x6c4], 0
mov dword [ebp - 0x6c8], 1
mov dword [ebp - 0x694], ebx
mov dword [ebp - 0x6cc], ebx
mov dword [ebp - 0x6b0], 1
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x688], edi
test eax, eax
je 0x42f793
mov dword [eax], 0xffffffff
cmp dword [ebp + 0x14], 1
mov esi, 0x76c
push 0x11
cmovne esi, dword [ebp + 0x14]
mov ecx, 0x17
cmp dword [ebp + 0x18], 0
mov eax, 2
push 2
cmovne eax, ecx
push eax
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [ebp - 0x6a0], eax
cmp eax, 0xffffffff
jne 0x42f80f
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x42f7d7
mov dword [eax], 0xffffff9b
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0x4e33a0
push str.Socket_error:__s___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c75e8
mov esp, ebp
pop ebp
ret
push 0x7e
lea eax, [ebp - 0x682]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [ebp + 0x18], 0
je 0x42f861
mov eax, 0x17
mov word [ebp - 0x684], ax
test esi, esi
jle 0x42f84e
cmp esi, 0x10000
jge 0x42f84e
push esi
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x682], ax
movups xmm0, xmmword [0x4eb3a8]
movups xmmword [ebp - 0x67c], xmm0
jmp 0x42f9bf
mov eax, 2
mov word [ebp - 0x684], ax
test esi, esi
jle 0x42f887
cmp esi, 0x10000
jge 0x42f887
push esi
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x682], ax
lea eax, [ebp - 0x6ac]
mov dword [ebp - 0x680], 0
push eax
push str.223.255.255.255
call dword [sym.imp.WSOCK32.dll_inet_addr]
push eax
call sub.IPHLPAPI.DLL_GetBestInterface
test eax, eax
jne 0x42f9bf
mov eax, 0x3c00
xor ebx, ebx
mov dword [ebp - 0x698], eax
xor edi, edi
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x42f913
lea eax, [ebp - 0x698]
push eax
push esi
push 0
push 0x10
push 2
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
mov ebx, eax
cmp ebx, 0x6f
jne 0x42f913
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
inc edi
cmp edi, 3
jge 0x42f9b3
mov eax, dword [ebp - 0x698]
jmp 0x42f8c0
test ebx, ebx
jne 0x42f99e
mov eax, esi
test esi, esi
je 0x42f9b3
mov edx, dword [ebp - 0x6ac]
nop dword [eax + eax]
cmp dword [eax + 4], edx
jne 0x42f93c
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x42f945
mov eax, dword [eax + 8]
test eax, eax
jne 0x42f930
jmp 0x42f9a2
mov edi, dword [ecx + 0xc]
push 4
mov eax, dword [edi + 4]
mov dword [ebp - 0x6a8], eax
lea eax, [ebp - 0x6a8]
push eax
push 9
push 0
push dword [ebp - 0x6a0]
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
jns 0x42f993
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.setsockopt
push str.Socket_error:__s___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
mov eax, dword [edi + 4]
mov dword [ebp - 0x680], eax
jmp 0x42f9a2
test esi, esi
je 0x42f9b3
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0x688]
mov ebx, dword [ebp - 0x694]
mov esi, dword [sym.imp.WSOCK32.dll_setsockopt]
lea eax, [ebp - 0x6c8]
push 4
push eax
push 4
push 0xffff
push dword [ebp - 0x6a0]
call esi
test eax, eax
jns 0x42fa1b
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x42f9f1
mov dword [eax], 0xffffff9b
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.setsockopt_SO_REUSEADDR_..._
push str.Socket_error:__s___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
jmp 0x430128
cmp dword [ebp + 0x18], 0
push 4
je 0x42fa4f
lea eax, [ebp - 0x698]
mov dword [ebp - 0x698], ebx
mov ebx, dword [ebp - 0x6a0]
push eax
push 0xa
push 0x29
push ebx
call esi
test eax, eax
jns 0x42fa8c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.setsockopt_IPV6_MULTICAST_HOPS_..._
jmp 0x42fa73
mov ebx, dword [ebp - 0x6a0]
lea eax, [ebp - 0x6cc]
push eax
push 0xa
push 0
push ebx
call esi
test eax, eax
jns 0x42fa8c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.setsockopt_IP_MULTICAST_TTL_..._
push str.Socket_error:__s___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
test edi, edi
je 0x42faed
cmp dword [ebp + 0x18], 0
jne 0x42faed
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x698], eax
cmp eax, 0xffffffff
je 0x42faed
push 4
mov dword [ebp - 0x680], eax
lea eax, [ebp - 0x698]
push eax
push 9
push 0
push ebx
call esi
mov edi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test eax, eax
jns 0x42faf3
call edi
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push eax
push str.setsockopt_IP_MULTICAST_IF
push str.Socket_error:__s___d_n
push 2
call ebx
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
jmp 0x42faf9
mov edi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp dword [ebp + 0x18], 0
mov edx, 0x1c
mov esi, dword [ebp - 0x6a0]
mov eax, 0x10
cmovne eax, edx
push eax
lea eax, [ebp - 0x684]
push eax
push esi
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
je 0x42fb6a
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x42fb33
mov dword [eax], 0xffffff9b
call edi
push eax
push str.bind
push str.Socket_error:__s___d_n
push 2
call ebx
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c75e8
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x68c]
test esi, esi
je 0x42fb7a
mov dword [esi], 0
mov ecx, dword [ebp - 0x6a4]
mov eax, 0x10624dd3
mul dword [ebp + 0xc]
mov eax, 1
shr edx, 6
test edx, edx
mov edi, edx
cmove edi, eax
mov eax, 0x3e8
cmovne eax, dword [ebp + 0xc]
cmp dword [ecx], 0
mov dword [ebp - 0x6d8], edi
mov dword [ebp - 0x698], eax
je 0x430128
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp - 0x6b0]
xor ebx, ebx
mov edx, str._FF05::C_
test eax, eax
je 0x42fbd5
test esi, esi
mov eax, str._FF02::C_
cmove eax, edx
jmp 0x42fbda
mov eax, str.239.255.255.250
push edi
push dword [ecx]
push eax
push str.M_SEARCH__HTTP_1.1_r_nHOST:__s:1900_r_nST:__s_r_nMAN:__ssdp:discover__r_nMX:__u_r_n_r_n
lea eax, [ebp - 0x604]
push 0x600
push eax
call fcn.0042aae0
mov edi, eax
add esp, 0x18
cmp edi, 0x600
jae 0x430118
xorps xmm0, xmm0
movups xmmword [ebp - 0x6f8], xmm0
mov dword [ebp - 0x6f0], 2
movups xmmword [ebp - 0x6e8], xmm0
cmp dword [ebp + 0x18], ebx
je 0x42fc36
test esi, esi
mov eax, str.FF02::C
mov ecx, str.FF05::C
cmove eax, ecx
jmp 0x42fc3b
mov eax, str.239.255.255.250
lea ecx, [ebp - 0x6c0]
push ecx
lea ecx, [ebp - 0x6f8]
push ecx
push str.1900
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x4300ec
mov esi, dword [ebp - 0x6c0]
test esi, esi
je 0x42fccb
nop word [eax + eax]
push dword [esi + 0x10]
lea eax, [ebp - 0x604]
push dword [esi + 0x18]
push 0
push edi
push eax
push dword [ebp - 0x6a0]
call dword [sym.imp.WSOCK32.dll_sendto]
mov edi, eax
test edi, edi
jns 0x42fcb9
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.sendto
push str.Socket_error:__s___d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0x10
jmp 0x42fcbe
mov ebx, 1
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x42fc70
mov esi, dword [ebp - 0x6c0]
push esi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebx, ebx
jne 0x42fce8
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x42fcee
mov dword [eax], 0xffffff9b
jmp 0x42fcee
cmp dword [ebp + 0x24], 0
je 0x42fcfe
mov ecx, dword [ebp - 0x6a4]
cmp dword [ecx + 4], 0
jne 0x430070
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, edx
shr eax, 6
mov dword [ebp - 0x6d0], eax
imul eax, eax, 0x3e8
sub ecx, eax
mov eax, dword [ebp - 0x698]
mov dword [ebp - 0x6d4], ecx
nop dword [eax]
mov ebx, dword [ebp - 0x690]
lea ecx, [ebp - 0x6c4]
push ecx
push eax
push 0x600
lea eax, [ebp - 0x604]
push eax
push dword [ebp - 0x6a0]
call fcn.00431be0
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x6a8], edi
test edi, edi
js 0x4300da
je 0x430060
xor eax, eax
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x6b8], eax
xor edx, edx
mov dword [ebp - 0x688], eax
xor esi, esi
mov dword [ebp - 0x6bc], eax
mov dword [ebp - 0x69c], eax
mov dword [ebp - 0x6ac], eax
mov dword [ebp - 0x6b4], ebx
mov dword [ebp - 0x694], ecx
test edi, edi
jle 0x430026
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x604]
cmp al, 0xa
je 0x42fddb
cmp al, 0xd
je 0x42fddb
mov edi, dword [ebp - 0x688]
cmp al, 0x3a
jne 0x42feaa
test esi, esi
mov eax, ecx
cmovne eax, esi
mov esi, eax
jmp 0x42feaa
test esi, esi
je 0x42fea1
inc esi
lea edi, [ebp - 0x604]
add edi, esi
cmp byte [edi], 0x20
je 0x42fde3
push 9
lea ebx, [ebp - 0x604]
add ebx, edx
push str.location:
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
add esp, 0xc
test eax, eax
jne 0x42fe31
mov ecx, dword [ebp - 0x694]
mov ebx, dword [ebp - 0x6b4]
mov dword [ebp - 0x6b8], edi
mov edi, ecx
sub edi, esi
xor esi, esi
mov dword [ebp - 0x688], edi
jmp 0x42fea7
push 3
push 0x4e3394
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
add esp, 0xc
test eax, eax
jne 0x42fe6c
mov ecx, dword [ebp - 0x694]
mov eax, ecx
sub eax, esi
mov dword [ebp - 0x6bc], edi
mov dword [ebp - 0x69c], eax
mov edi, dword [ebp - 0x688]
xor esi, esi
mov ebx, dword [ebp - 0x6b4]
jmp 0x42fea7
push 4
push str.usn:
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__memicmp]
mov ecx, dword [ebp - 0x694]
add esp, 0xc
test eax, eax
jne 0x42fe5c
mov ebx, ecx
mov dword [ebp - 0x6ac], edi
mov edi, dword [ebp - 0x688]
sub ebx, esi
mov dword [ebp - 0x6b4], ebx
xor esi, esi
jmp 0x42fea7
mov edi, dword [ebp - 0x688]
lea edx, [ecx + 1]
inc ecx
mov dword [ebp - 0x694], ecx
cmp ecx, dword [ebp - 0x6a8]
jl 0x42fdb0
cmp dword [ebp - 0x6bc], 0
je 0x430020
mov eax, dword [ebp - 0x6b8]
test eax, eax
je 0x430020
mov ecx, dword [ebp - 0x690]
mov esi, ecx
test ecx, ecx
je 0x42ff68
push edi
push eax
push dword [esi + 4]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x42ff5c
mov eax, dword [esi + 4]
cmp byte [edi + eax], 0
jne 0x42ff5c
push dword [ebp - 0x69c]
push dword [ebp - 0x6bc]
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x42ff5c
mov eax, dword [esi + 8]
mov edx, dword [ebp - 0x69c]
cmp byte [edx + eax], 0
jne 0x42ff5c
test ebx, ebx
je 0x42ff49
push ebx
push dword [ebp - 0x6ac]
push dword [esi + 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x42ff5c
mov eax, dword [esi + 0xc]
cmp byte [ebx + eax], 0
mov eax, dword [ebp - 0x698]
je 0x42fd30
mov esi, dword [esi]
mov eax, dword [ebp - 0x6b8]
test esi, esi
jne 0x42fee8
mov eax, dword [ebp - 0x69c]
add eax, 0x1b
add eax, ebx
add eax, edi
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x4300b6
mov eax, dword [ebp - 0x690]
lea ecx, [esi + 0x14]
mov edx, dword [ebp - 0x69c]
mov dword [esi], eax
inc edx
lea eax, [edi + 0x15]
mov dword [esi + 4], ecx
add eax, esi
mov dword [esi + 8], eax
add eax, edx
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x6b8]
push edi
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
push dword [ebp - 0x69c]
mov byte [esi + edi + 0x14], 0
push dword [ebp - 0x6bc]
push dword [esi + 8]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x69c]
add esp, 0x18
add eax, esi
mov byte [eax + edi + 0x15], 0
mov eax, dword [ebp - 0x6ac]
test eax, eax
je 0x42fff9
push ebx
push eax
push dword [esi + 0xc]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [esi + ebx]
mov ebx, esi
add eax, dword [ebp - 0x69c]
mov dword [ebp - 0x690], ebx
mov byte [eax + edi + 0x16], 0
mov eax, dword [ebp - 0x6c4]
mov edi, dword [ebp - 0x6a8]
mov dword [esi + 0x10], eax
jmp 0x43002c
mov edi, dword [ebp - 0x6a8]
mov ebx, dword [ebp - 0x690]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
imul eax, dword [ebp - 0x6d0], 0x3e8
sub ecx, eax
mov eax, dword [ebp - 0x698]
sub ecx, dword [ebp - 0x6d4]
cmp ecx, eax
jg 0x43006a
mov dword [ebp - 0x690], ebx
test edi, edi
jg 0x42fd36
jmp 0x43006a
test ebx, ebx
je 0x43006a
cmp dword [ebp + 0x24], 0
je 0x4300c8
mov ecx, dword [ebp - 0x6a4]
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x430099
cmp dword [ebp - 0x6b0], 0
je 0x43008f
mov dword [ebp - 0x6b0], 0
sub ecx, 4
jmp 0x430099
mov dword [ebp - 0x6b0], 1
add ecx, 4
mov dword [ebp - 0x6a4], ecx
cmp dword [ecx], 0
je 0x430128
mov edi, dword [ebp - 0x6d8]
jmp 0x42fbb8
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x430128
mov dword [eax], 0xffffff9a
jmp 0x430128
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x430128
mov dword [eax], 0
jmp 0x430128
mov eax, dword [ebp - 0x68c]
test eax, eax
je 0x430128
mov dword [eax], 0xffffff9b
jmp 0x430128
mov esi, dword [ebp - 0x68c]
test esi, esi
je 0x4300fc
mov dword [esi], 0xffffff9b
push eax
push str.getaddrinfo___failed:__d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004020f0
add esp, 0xc
jmp 0x430128
mov esi, dword [ebp - 0x68c]
test esi, esi
je 0x430128
mov dword [esi], 0xffffff9a
push dword [ebp - 0x6a0]
call dword [sym.imp.WSOCK32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x690]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004c75e8
mov esp, ebp
pop ebp
ret