Function at 0x1800367c0
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
push r13
sub rsp, 0x978
xor ebp, ebp
mov r13d, 2
mov byte [rsp + 0x9d0], 0
lea r8d, [rbp + 0x11]
mov edx, r13d
mov ecx, r13d
mov r12, rbp
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x48], 1
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
test eax, eax
jns 0x180036815
xor eax, eax
add rsp, 0x978
pop r13
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], r13w
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 0x180036972
mov rcx, qword [0x180059270]
lea r8d, [rax + 0x1c]
xor edx, edx
mov dword [rsp + 0x9c8], ebp
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x180036972
lea rdx, [rsp + 0x9c8]
xor r8d, r8d
mov rcx, rax
call sub.IPHLPAPI.DLL_GetIpAddrTable
cmp eax, 0x7a
jne 0x1800368da
mov rcx, qword [0x180059270]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8d, dword [rsp + 0x9c8]
mov rcx, qword [0x180059270]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rdi, rdi
je 0x180036972
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 0x180036960
mov edx, dword [rsp + 0x130]
lea rax, [rdi + 8]
nop word [rax + rax]
cmp dword [rax], edx
je 0x180036922
inc r11d
add rax, 0x18
cmp r11d, ecx
jl 0x180036910
jmp 0x180036960
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 [0x180059270]
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 0x1800369ec
cmp byte [rsp + 0x9d0], bpl
je 0x1800369c8
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 0x1800369f3
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x180036f1a
mov qword [rsp + 0x60], rbp
cmp qword [str.urn:schemas_upnp_org:device:InternetGatewayDevice:1], rbp
je 0x180036f0e
mov qword [rsp + 0x9b0], r14
lea rax, str.urn:schemas_upnp_org:device:InternetGatewayDevice:1
mov qword [rsp + 0x970], r15
nop dword [rax]
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], r13d
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], r13d
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x180036ef4
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x180036ad7
nop dword [rax]
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]
mov edi, eax
test rbx, rbx
jne 0x180036aa0
mov rbx, qword [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test edi, edi
js 0x180036ef4
nop dword [rax + rax]
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], r13d
mov dword [rsp + 0x5c], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x180036ef4
test eax, eax
je 0x180036ead
lea rdx, [rsp + 0x370]
xor r9d, r9d
mov r8d, 0x600
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
mov edi, eax
mov dword [rsp + 0x9c8], eax
test eax, eax
js 0x180036ef4
test eax, eax
je 0x180036ead
xor edx, edx
xor r14d, r14d
xor r15d, r15d
xor r13d, r13d
xor esi, esi
xor ebp, ebp
xor ebx, ebx
xor ecx, ecx
mov qword [rsp + 0x9d8], rdx
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x50], rdx
test eax, eax
jle 0x180036ec1
mov al, byte [rsp + rbp + 0x370]
cmp al, 0xa
je 0x180036bd8
cmp al, 0xd
je 0x180036bd8
cmp al, 0x3a
jne 0x180036d26
test ebx, ebx
jne 0x180036d17
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
mov ebx, esi
mov rcx, rbp
jmp 0x180036d33
test ebx, ebx
je 0x180036d05
lea rax, [rsp + rcx + 0x370]
nop dword [rax + rax]
inc rax
inc ebx
cmp byte [rax], 0x20
je 0x180036bf0
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 0x180036c50
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 0x180036d33
lea rdx, [0x18005126c]
mov r8d, 2
mov rcx, rdi
call qword [sym.imp.ntdll.dll__memicmp]
test eax, eax
jne 0x180036c9b
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 0x180036d33
lea rdx, [0x180051270]
mov r8d, 3
mov rcx, rdi
call qword [sym.imp.ntdll.dll__memicmp]
test eax, eax
jne 0x180036ce8
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 0x180036d33
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 0x180036d33
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
lea edx, [rsi + 1]
jmp 0x180036d33
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
jmp 0x180036d33
mov r9, qword [rsp + 0x9d8]
mov r8, qword [rsp + 0x30]
inc esi
inc rbp
cmp esi, edi
jl 0x180036ba2
test r8, r8
je 0x180036e93
test r9, r9
je 0x180036e93
mov rdi, qword [rsp + 0x38]
mov rbx, r12
movsxd rbp, r14d
movsxd r12, r15d
movsxd rsi, r13d
test rdi, rdi
je 0x180036de6
nop dword [rax + rax]
mov rdi, qword [rbx + 8]
mov r8, rbp
mov rdx, r9
mov rcx, rdi
call sub.ntdll.dll_memcmp
test eax, eax
jne 0x180036dd1
cmp byte [rdi + rbp], al
jne 0x180036dd1
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 0x180036dd1
cmp byte [rdi + r12], al
jne 0x180036dd1
test r13d, r13d
je 0x180036dc3
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rbx + 0x20]
mov r8, rsi
call sub.ntdll.dll_memcmp
test eax, eax
jne 0x180036dd1
mov rax, qword [rbx + 0x20]
cmp byte [rsi + rax], 0
je 0x180036e8e
mov rbx, qword [rbx]
mov r9, qword [rsp + 0x9d8]
test rbx, rbx
jne 0x180036d70
mov rdi, qword [rsp + 0x38]
mov rcx, qword [0x180059270]
lea eax, [r13 + r15]
xor edx, edx
lea r8d, [rax + r14 + 0x30]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x180036ef4
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]
mov byte [r11 + rbx + 0x29], 0
test rax, rax
je 0x180036e71
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 0x180036e93
mov r12, qword [rsp + 0x38]
cmp dword [rsp + 0x9c8], 0
jle 0x180036eb4
mov rsi, qword [rsp + 0x40]
mov r13d, 2
jmp 0x180036af0
test r12, r12
jne 0x180036ef4
jmp 0x180036ecc
mov rsi, qword [rsp + 0x40]
mov r13d, 2
jmp 0x180036ecc
mov rsi, qword [rsp + 0x40]
mov r13d, 2
mov rbx, qword [rsp + 0x60]
lea rax, str.urn:schemas_upnp_org:device:InternetGatewayDevice:1
mov ebp, 0
inc rbx
cmp qword [rax + rbx*8], 0
lea rax, [rax + rbx*8]
mov qword [rsp + 0x60], rbx
jne 0x180036a20
mov rsi, qword [rsp + 0x40]
mov r12, qword [rsp + 0x38]
mov r15, qword [rsp + 0x970]
mov r14, 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, 0x978
pop r13
pop r12
pop rsi
pop rbp
ret