Function at 0x4046c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10028
call fcn.0046c6d0
mov eax, dword [0x48b034]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
push 6
push 1
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x10024], eax
test eax, eax
je 0x404926
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x404926
mov ecx, 2
mov word [ebp - 0x1001c], cx
mov eax, dword [eax + 0xc]
push ebx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x10018], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebp - 0x10024]
mov word [ebp - 0x1001a], ax
lea eax, [ebp - 0x1001c]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x404926
push esi
push edi
lea eax, [ebp - 0x1000c]
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
push eax
call fcn.00404960
lea ecx, [ebp - 0x1000c]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404770
push 0
sub ecx, edx
lea eax, [ebp - 0x1000c]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_recv]
xor al, al
mov byte [ebp - 0x1001d], al
nop dword [eax + eax]
push 0xffff
xor esi, esi
lea eax, [ebp - 0x1000c]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
nop word [eax + eax]
push 0
push 1
lea eax, [ebp - 0x1001e]
push eax
push ebx
call edi
test eax, eax
jle 0x4047ec
mov al, byte [ebp - 0x1001e]
mov byte [ebp + esi - 0x1000c], al
cmp al, 0xa
je 0x4047ec
inc esi
cmp esi, 0xfffe
jl 0x4047c0
test esi, esi
jle 0x404916
add esi, 0xffffffff
js 0x404823
nop dword [eax]
cmp byte [ebp + esi - 0x1000c], 0x20
jge 0x404823
cmp esi, 0xffff
jae 0x40494c
mov byte [ebp + esi - 0x1000c], 0
sub esi, 1
jns 0x404800
lea ecx, [ebp - 0x1000c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404830
sub ecx, edx
je 0x404916
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok_s]
lea eax, [ebp - 0x10028]
push eax
lea eax, [ebp - 0x1000c]
mov dword [ebp - 0x10028], 0
push 0x47bd78
push eax
call esi
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x404916
mov edx, str.HTTP_1.0
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x404896
test bl, bl
je 0x404892
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x404896
add eax, 2
add edx, 2
test bl, bl
jne 0x404876
xor eax, eax
jmp 0x40489b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4048d7
mov eax, str.HTTP_1.1
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x4048c4
test dl, dl
je 0x4048c0
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x4048c4
add ecx, 2
add eax, 2
test dl, dl
jne 0x4048a4
xor eax, eax
jmp 0x4048c9
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x10024]
test eax, eax
jne 0x4047a0
lea eax, [ebp - 0x10028]
push eax
push 0x47bd94
push 0
call esi
add esp, 0xc
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, dword [ebp - 0x10024]
add esp, 4
mov dword [0x566f54], eax
cmp eax, 0xc8
jne 0x4047a0
mov byte [ebp - 0x1001d], 1
jmp 0x4047a0
cmp byte [ebp - 0x1001d], 0
jne 0x404939
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0046bb5b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046bb5b
mov esp, ebp
pop ebp
ret
call fcn.0046c0cd
int3