Function at 0x407a40
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp 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.0045ed00
mov eax, dword [0x476018]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 6
push 1
push 2
mov esi, ecx
mov edi, edx
call dword [sym.imp.WS2_32.dll_socket]
xor ebx, ebx
mov dword [ebp - 0x10024], eax
cmp eax, ebx
je 0x407c4b
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x407c4b
mov ecx, 2
mov word [ebp - 0x1001c], cx
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov edx, dword [ebp + 8]
mov ecx, dword [eax]
push edx
mov dword [ebp - 0x10018], ecx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x10024]
mov word [ebp - 0x1001a], ax
push 0x10
lea eax, [ebp - 0x1001c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x407c4b
push esi
push edi
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
lea edx, [ebp - 0x1000c]
call fcn.00407cd0
lea eax, [ebp - 0x1000c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407af0
mov esi, dword [ebp - 0x10024]
push ebx
sub eax, edx
push eax
lea edx, [ebp - 0x1000c]
push edx
push esi
call dword [sym.imp.WS2_32.dll_send]
push esi
lea edi, [ebp - 0x1000c]
mov byte [ebp - 0x1001d], bl
call fcn.00407c80
add esp, 4
cmp eax, ebx
jle 0x407c44
dec eax
cmp eax, ebx
jl 0x407b45
cmp byte [ebp + eax - 0x1000c], 0x20
jge 0x407b45
dec eax
mov byte [ebp + eax - 0x1000b], bl
jns 0x407b31
lea eax, [ebp - 0x1000c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407b50
sub eax, edx
je 0x407c36
mov edi, dword [sym.imp.MSVCR100.dll_strtok_s]
lea eax, [ebp - 0x10028]
push eax
lea ecx, [ebp - 0x1000c]
push 0x46e8a8
push ecx
mov dword [ebp - 0x10028], ebx
call edi
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x407c36
mov edx, str.HTTP_1.0
mov ecx, esi
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x407bb4
cmp al, bl
je 0x407bb0
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x407bb4
add ecx, 2
add edx, 2
cmp al, bl
jne 0x407b94
xor eax, eax
jmp 0x407bb9
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x407bed
mov ecx, str.HTTP_1.1
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x407be4
cmp dl, bl
je 0x407be0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x407be4
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x407bc4
xor eax, eax
jmp 0x407be9
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x407c19
lea edx, [ebp - 0x10028]
push edx
push 0x46e8a8
push ebx
call edi
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 0x10
mov dword [0x47ac48], eax
cmp eax, 0xc8
jne 0x407c19
mov byte [ebp - 0x1001d], 1
mov eax, dword [ebp - 0x10024]
push eax
lea edi, [ebp - 0x1000c]
call fcn.00407c80
add esp, 4
cmp eax, ebx
jg 0x407b2c
cmp byte [ebp - 0x1001d], bl
jne 0x407c5e
mov esi, dword [ebp - 0x10024]
push esi
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.004183ef
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10024]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004183ef
mov esp, ebp
pop ebp
ret