Function at 0x1800370f0
Capabilities:
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push rbp
push rsi
push r12
sub rsp, 0x980
xor ebp, ebp
mov edx, 2
mov byte [rsp + 0x9d0], 0
lea r8d, [rbp + 0x11]
mov ecx, edx
mov r12, rbp
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x48], 1
call qword [sym.imp.WS2_32.dll_socket]
test eax, eax
mov rsi, rax
jns 0x18003713c
xor eax, eax
add rsp, 0x980
pop r12
pop rsi
pop rbp
ret
lea rcx, [rsp + 0xa0]
xor edx, edx
mov r8d, 0x80
mov qword [rsp + 0x9a0], rbx
mov qword [rsp + 0x9a8], rdi
call sub.ntdll.dll_memset
lea rcx, str.223.255.255.255
mov word [rsp + 0xa0], 2
mov dword [rsp + 0xa4], ebp
call qword [sym.imp.WS2_32.dll_inet_addr]
lea r8, [rsp + 0x120]
xor edx, edx
mov ecx, eax
call sub.IPHLPAPI.DLL_GetBestRoute
test eax, eax
jne 0x180037295
mov rcx, qword [0x180052eb0]
lea r8d, [rax + 0x1c]
xor edx, edx
mov dword [rsp + 0x9c8], ebp
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rdi, rax
je 0x180037295
lea rdx, [rsp + 0x9c8]
xor r8d, r8d
mov rcx, rax
call sub.IPHLPAPI.DLL_GetIpAddrTable
cmp eax, 0x7a
jne 0x180037202
mov rcx, qword [0x180052eb0]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8d, dword [rsp + 0x9c8]
mov rcx, qword [0x180052eb0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rdi, rdi
je 0x180037295
lea rdx, [rsp + 0x9c8]
xor r8d, r8d
mov rcx, rdi
call sub.IPHLPAPI.DLL_GetIpAddrTable
mov ecx, dword [rdi]
mov r11d, ebp
test ecx, ecx
jle 0x180037283
mov edx, dword [rsp + 0x130]
lea rax, [rdi + 8]
cmp dword [rax], edx
je 0x180037245
add r11d, 1
add rax, 0x18
cmp r11d, ecx
jl 0x180037232
jmp 0x180037283
movsxd rax, r11d
xor edx, edx
lea r9, [rsp + 0x9d8]
lea rbx, [rax + rax*2]
lea r8d, [rdx + 9]
movsxd rcx, esi
mov eax, dword [rdi + rbx*8 + 4]
mov dword [rsp + 0x20], 4
mov dword [rsp + 0x9d8], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
mov r11d, dword [rdi + rbx*8 + 4]
mov dword [rsp + 0xa4], r11d
mov rcx, qword [0x180052eb0]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
movsxd rsi, esi
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov r8d, 4
mov rcx, rsi
mov dword [rsp + 0x20], 4
mov qword [rsp + 0x40], rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x18003730f
cmp byte [rsp + 0x9d0], bpl
je 0x1800372eb
xor edx, edx
lea r9, [rsp + 0x9d0]
mov rcx, rsi
lea r8d, [rdx + 0xa]
mov dword [rsp + 0x20], 1
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rdx, [rsp + 0xa0]
mov r8d, 0x10
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x180037316
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x180037841
cmp qword [str.urn:schemas_upnp_org:device:InternetGatewayDevice:1], rbp
mov qword [rsp + 0x60], rbp
je 0x180037835
mov qword [rsp + 0x9b0], r13
mov qword [rsp + 0x978], r14
lea rax, str.urn:schemas_upnp_org:device:InternetGatewayDevice:1
mov qword [rsp + 0x970], r15
nop
nop
nop
mov rax, qword [rax]
lea r9, str.239.255.255.250
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
lea rcx, [rsp + 0x370]
mov edx, 0x600
mov dword [rsp + 0x28], 2
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll__snprintf]
xor edx, edx
lea r8d, [rdx + 0x30]
lea rcx, [rsp + 0x70]
mov edi, eax
call sub.ntdll.dll_memset
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x70]
lea rdx, str.1900
lea rcx, str.239.255.255.250
mov dword [rsp + 0x74], ebp
mov dword [rsp + 0x78], 2
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x180037813
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x180037407
nop
mov eax, dword [rbx + 0x10]
lea rdx, [rsp + 0x370]
xor r9d, r9d
mov dword [rsp + 0x28], eax
mov rax, qword [rbx + 0x20]
mov r8d, edi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov rbx, qword [rbx + 0x28]
test rbx, rbx
mov edi, eax
jne 0x1800373d0
mov rbx, qword [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test edi, edi
js 0x180037813
nop
nop
xor r9d, r9d
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x160]
lea ecx, [r9 + 0x40]
xor r8d, r8d
mov qword [rsp + 0x168], rsi
mov dword [rsp + 0x160], 1
mov dword [rsp + 0x58], 2
mov dword [rsp + 0x5c], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x180037813
test eax, eax
je 0x1800377d7
lea rdx, [rsp + 0x370]
xor r9d, r9d
mov r8d, 0x600
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
mov edi, eax
mov dword [rsp + 0x9c8], eax
js 0x180037813
test eax, eax
je 0x1800377d7
xor edx, edx
xor r14d, r14d
xor r15d, r15d
xor r13d, r13d
xor esi, esi
xor ebp, ebp
xor ebx, ebx
xor ecx, ecx
test eax, eax
mov qword [rsp + 0x9d8], rdx
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x50], rdx
jle 0x1800377e5
mov al, byte [rsp + rbp + 0x370]
cmp al, 0xa
je 0x18003750b
cmp al, 0xd
je 0x18003750b
cmp al, 0x3a
jne 0x180037658
test ebx, ebx
jne 0x180037649
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
mov ebx, esi
mov rcx, rbp
jmp 0x180037665
test ebx, ebx
je 0x180037637
lea rax, [rsp + rcx + 0x370]
nop
nop
add rax, 1
add ebx, 1
cmp byte [rax], 0x20
je 0x180037520
movsxd rax, edx
lea rdx, str.location
mov r8d, 8
lea rdi, [rsp + rax + 0x370]
mov rcx, rdi
call qword [sym.imp.ntdll.dll__memicmp]
test eax, eax
jne 0x180037582
mov r8, qword [rsp + 0x30]
mov edi, dword [rsp + 0x9c8]
movsxd rax, ebx
lea r9, [rsp + rax + 0x370]
mov r14d, esi
lea edx, [rsi + 1]
sub r14d, ebx
xor ebx, ebx
mov qword [rsp + 0x9d8], r9
xor ecx, ecx
jmp 0x180037665
lea rdx, [0x18004b81c]
mov r8d, 2
mov rcx, rdi
call qword [sym.imp.ntdll.dll__memicmp]
test eax, eax
jne 0x1800375cd
mov r9, qword [rsp + 0x9d8]
mov edi, dword [rsp + 0x9c8]
movsxd rax, ebx
lea r8, [rsp + rax + 0x370]
mov r15d, esi
lea edx, [rsi + 1]
sub r15d, ebx
xor ebx, ebx
mov qword [rsp + 0x30], r8
xor ecx, ecx
jmp 0x180037665
lea rdx, [0x18004b820]
mov r8d, 3
mov rcx, rdi
call qword [sym.imp.ntdll.dll__memicmp]
test eax, eax
jne 0x18003761a
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
mov edi, dword [rsp + 0x9c8]
movsxd rax, ebx
mov r13d, esi
lea edx, [rsi + 1]
sub r13d, ebx
lea r10, [rsp + rax + 0x370]
xor ebx, ebx
mov qword [rsp + 0x50], r10
xor ecx, ecx
jmp 0x180037665
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
mov edi, dword [rsp + 0x9c8]
xor ebx, ebx
lea edx, [rsi + 1]
xor ecx, ecx
jmp 0x180037665
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
lea edx, [rsi + 1]
jmp 0x180037665
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
jmp 0x180037665
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
add esi, 1
add rbp, 1
cmp esi, edi
jl 0x1800374d5
test r8, r8
je 0x1800377c3
test r9, r9
je 0x1800377c3
mov rdi, qword [rsp + 0x38]
mov rbx, r12
movsxd rbp, r14d
test rdi, rdi
movsxd r12, r15d
movsxd rsi, r13d
je 0x180037716
nop
mov rdi, qword [rbx + 8]
mov r8, rbp
mov rdx, r9
mov rcx, rdi
call sub.ntdll.dll_memcmp
test eax, eax
jne 0x180037701
cmp byte [rdi + rbp], al
jne 0x180037701
mov rdi, qword [rbx + 0x10]
mov rdx, qword [rsp + 0x30]
mov r8, r12
mov rcx, rdi
call sub.ntdll.dll_memcmp
test eax, eax
jne 0x180037701
cmp byte [rdi + r12], al
jne 0x180037701
test r13d, r13d
je 0x1800376f3
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rbx + 0x20]
mov r8, rsi
call sub.ntdll.dll_memcmp
test eax, eax
jne 0x180037701
mov rax, qword [rbx + 0x20]
cmp byte [rsi + rax], 0
je 0x1800377be
mov rbx, qword [rbx]
mov r9, qword [rsp + 0x9d8]
test rbx, rbx
jne 0x1800376a0
mov rdi, qword [rsp + 0x38]
mov rcx, qword [0x180052eb0]
lea eax, [r13 + r15]
xor edx, edx
lea r8d, [rax + r14 + 0x30]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rbx, rax
je 0x180037813
mov rdx, qword [rsp + 0x9d8]
lea rcx, [rax + 0x28]
mov qword [rax], rdi
mov qword [rax + 8], rcx
lea rax, [rax + rbp + 0x29]
mov r8, rbp
mov qword [rbx + 0x10], rax
lea rax, [rax + r12 + 1]
mov qword [rbx + 0x20], rax
call sub.ntdll.dll_memcpy
mov rdx, qword [rsp + 0x30]
mov byte [rbx + rbp + 0x28], 0
mov rcx, qword [rbx + 0x10]
mov r8, r12
call sub.ntdll.dll_memcpy
mov rax, qword [rsp + 0x50]
lea r11, [r12 + rbp]
test rax, rax
mov byte [r11 + rbx + 0x29], 0
je 0x1800377a1
mov rcx, qword [rbx + 0x20]
mov r8, rsi
mov rdx, rax
call sub.ntdll.dll_memcpy
lea rax, [rsi + r12]
mov qword [rsp + 0x38], rbx
mov r12, rbx
add rax, rbp
mov byte [rax + rbx + 0x2a], 0
mov dword [rbx + 0x18], 0
jmp 0x1800377c3
mov r12, qword [rsp + 0x38]
cmp dword [rsp + 0x9c8], 0
jle 0x1800377de
mov rsi, qword [rsp + 0x40]
jmp 0x180037420
test r12, r12
jne 0x180037813
jmp 0x1800377ea
mov rsi, qword [rsp + 0x40]
jmp 0x1800377ea
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x60]
lea rax, str.urn:schemas_upnp_org:device:InternetGatewayDevice:1
mov ebp, 0
add rbx, 1
cmp qword [rax + rbx*8], 0
lea rax, [rax + rbx*8]
mov qword [rsp + 0x60], rbx
jne 0x180037350
mov rsi, qword [rsp + 0x40]
mov r12, qword [rsp + 0x38]
mov r15, qword [rsp + 0x970]
mov r14, qword [rsp + 0x978]
mov r13, qword [rsp + 0x9b0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, r12
mov rbx, qword [rsp + 0x9a0]
mov rdi, qword [rsp + 0x9a8]
add rsp, 0x980
pop r12
pop rsi
pop rbp
ret