Function at 0x40aa18
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Resolve dns

Disassembly:
mov eax, 0x451f06
call fcn.0044c764
sub esp, 0x7c
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 0x14], ebx
test byte [0x467828], 1
push edi
mov esi, 0x46780c
jne 0x40aa5f
or dword [0x467828], 1
push ebx
mov ecx, esi
mov dword [0x467824], 0xf
call fcn.004019d4
push 0x453e31
call fcn.0043a8a5
pop ecx
cmp dword [0x467820], ebx
jne 0x40ace9
push str.p3p.sogou.com
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
cmp edi, ebx
jne 0x40aad7
call fcn.0043cac4
push dword [eax]
call fcn.0043ca16
pop ecx
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040162e
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x54], 0x10
mov eax, dword [ebp - 0x68]
jae 0x40aaa1
lea eax, [ebp - 0x68]
push eax
push str.gethostbyname_:__s_n
push 0x80
push dword [0x467478]
call fcn.00429210
add esp, 0x10
mov ecx, dword [ebp + 8]
push 0x457422
call fcn.0040162e
push ebx
push 1
lea ecx, [ebp - 0x6c]
call fcn.004017a7
jmp 0x40acf2
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push 2
mov dword [ebp - 0x10], eax
pop eax
push 0x50
mov word [ebp - 0x24], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x22], ax
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
xor eax, eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
push 0x10
stosd dword es:[edi], eax
pop edi
push edi
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x40ab7b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0043ca16
pop ecx
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040162e
xor esi, esi
inc esi
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x68]
cmp dword [ebp - 0x54], edi
jae 0x40ab45
lea eax, [ebp - 0x68]
push eax
push str.connect_:__s_n
push 0x80
push dword [0x467478]
call fcn.00429210
add esp, 0x10
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp + 8]
push 0x457422
call fcn.0040162e
push ebx
push esi
jmp 0x40aaca
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40abe2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0043ca16
pop ecx
push eax
lea ecx, [ebp - 0x6c]
call fcn.0040162e
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x68]
cmp dword [ebp - 0x54], edi
jae 0x40abbb
lea eax, [ebp - 0x68]
push eax
push str.getsockname_:__s_n
push 0x80
push dword [0x467478]
call fcn.00429210
add esp, 0x10
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40aaba
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0x14], edi
je 0x40ac1a
push str.getsockname_:_size_mismatch_n
push 0x80
push dword [0x467478]
call fcn.00429210
mov ecx, dword [ebp + 8]
add esp, 0xc
push 0x457422
call fcn.0040162e
jmp 0x40acf2
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [ebp - 0x50]
call fcn.0040162e
mov dword [ebp - 4], 3
cmp dword [ebp - 0x30], ebx
jne 0x40ac50
mov ecx, dword [ebp + 8]
push 0x457422
call fcn.0040162e
push ebx
push 1
lea ecx, [ebp - 0x50]
jmp 0x40aacd
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], edi
jae 0x40ac5b
lea eax, [ebp - 0x4c]
push eax
push str.Local_IP_:__s_n
push 8
push dword [0x467478]
call fcn.00429210
add esp, 0x10
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x50]
push eax
mov ecx, esi
call fcn.004016f3
push 0x457f78
mov ecx, esi
call fcn.00402b8f
mov ecx, dword [0x467468]
cmp ecx, ebx
jne 0x40ac99
xor eax, eax
jmp 0x40ac9e
mov eax, dword [ecx]
call dword [eax + 0x10]
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00401f85
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.00402eb3
push ebx
push 1
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 3
call fcn.004017a7
push str._20Hash_20Hash_20Hash
mov ecx, esi
call fcn.00402b8f
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x50]
call fcn.004017a7
mov ecx, dword [ebp + 8]
push esi
call fcn.00401650
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret