Function at 0x401f67
Capabilities:
Connect socket
Initialize winsock library
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
sub esp, 0xce0
mov eax, dword [0x441414]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov dword [ebp - 0xcc4], ecx
mov ecx, dword [ebp + 0x10]
push edi
mov dword [ebp - 0xcd4], ecx
lea ecx, [ebp - 0xcc0]
push ecx
lea ecx, [ebp - 0xb1c]
push ecx
lea ecx, [ebp - 0x51c]
push ecx
mov esi, edx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0xcdc], esi
call fcn.00401e63
lea eax, [ebp - 0x1c]
push str.HTTP
push eax
call fcn.0041e680
test eax, eax
pop ecx
pop ecx
je 0x401fd4
xor eax, eax
inc eax
jmp 0x4023e2
lea eax, [ebp - 0xcbc]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x401fcc
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xcd8], edi
je 0x401fcc
push dword [ebp - 0xcc0]
mov word [ebp - 0xb2c], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xb2a], ax
lea eax, [ebp - 0x51c]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402036
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0xb28], eax
push 0x10
lea eax, [ebp - 0xb2c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x401fcc
cmp byte [ebp - 0xb1c], al
jne 0x402073
push 0x400
push 0x438944
lea eax, [ebp - 0xb1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test esi, esi
mov esi, str.GET
je 0x402081
mov esi, str.POST
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e710
pop ecx
pop ecx
lea eax, [ebp - 0xb1c]
push eax
push edi
call fcn.00401e45
lea eax, [ebp - 0xb1c]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, str._HTTP_1.0_r_n
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, str.Accept:_image_gif__image_x_xbitmap__image_jpeg__image_pjpeg__application_vnd.ms_excel__application_msword__application_vnd.ms_powerpoint____r_n
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, str.Accept_Language:_en_us_r_n
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, str.Accept_Encoding:_gzip__deflate_r_n
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, str.User_Agent:_Mozilla_4.0_r_n
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
test ebx, ebx
pop ecx
pop ecx
je 0x40217c
push ebx
lea eax, [ebp - 0x71c]
push str.Content_Length:__ld_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x71c]
push eax
push edi
call fcn.00401e45
lea eax, [ebp - 0x71c]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, str.Host:
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
pop ecx
pop ecx
lea eax, [ebp - 0x51c]
push eax
push edi
call fcn.00401e45
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x41c]
push eax
call fcn.0041e720
pop ecx
pop ecx
mov esi, 0x438a74
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
mov eax, dword [ebp - 0xcc4]
test eax, eax
pop ecx
pop ecx
je 0x4021fe
cmp byte [eax], 0
je 0x4021fe
push eax
push edi
call fcn.00401e45
push dword [ebp - 0xcc4]
lea eax, [ebp - 0x41c]
push eax
call fcn.0041e720
pop ecx
pop ecx
push esi
push edi
call fcn.00401e45
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.0041e720
mov esi, dword [ebp - 0xcdc]
test esi, esi
pop ecx
pop ecx
je 0x402240
test ebx, ebx
je 0x402240
push 0
push ebx
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
lea eax, [ebp - 0x41c]
push esi
push eax
mov byte [ebx + esi], 0
call fcn.0041e720
pop ecx
pop ecx
lea eax, [ebp - 0x41c]
push eax
call fcn.0041db30
shl eax, 2
push eax
call fcn.0041df62
mov ecx, dword [ebp - 0xcd4]
mov dword [ecx], eax
lea ecx, [ebp - 0x41c]
push ecx
push eax
call fcn.0041e710
push 0xa
pop eax
push eax
mov dword [ebp - 0xcc8], eax
call fcn.0041df62
and dword [ebp - 0xcc0], 0
add esp, 0x14
and dword [ebp - 0xcc4], 0
mov dword [ebp - 0xcd0], eax
mov dword [ebp - 0xccc], eax
push 0
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x71c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x4022b4
mov dword [ebp - 0xcc4], esi
mov bl, byte [ebp - 0x71c]
cmp bl, 0xa
je 0x4022cc
cmp bl, 0xd
je 0x4022e2
inc dword [ebp - 0xcc0]
jmp 0x4022e2
cmp dword [ebp - 0xcc0], 0
jne 0x4022db
mov dword [ebp - 0xcc4], esi
and dword [ebp - 0xcc0], 0
mov eax, dword [ebp - 0xccc]
sub eax, dword [ebp - 0xcd0]
cmp eax, dword [ebp - 0xcc8]
jb 0x402301
lea esi, [ebp - 0xcd0]
call fcn.00401e23
mov eax, dword [ebp - 0xccc]
inc dword [ebp - 0xccc]
cmp dword [ebp - 0xcc4], 0
mov byte [eax], bl
je 0x402296
mov eax, dword [ebp - 0xcd4]
mov ecx, dword [ebp - 0xcd0]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0xccc]
push 0xa
mov byte [eax], 0
pop eax
push eax
mov dword [ebp - 0xcc8], eax
call fcn.0041df62
mov ebx, eax
mov esi, ebx
pop ecx
mov dword [ebp - 0xcd0], ebx
mov dword [ebp - 0xccc], esi
jmp 0x40235c
mov edi, dword [ebp - 0xcd8]
push 0
push 0x1ff
lea eax, [ebp - 0x71c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jl 0x4023c3
mov byte [ebp + edi - 0x71c], 0
jmp 0x402398
lea esi, [ebp - 0xcd0]
call fcn.00401e23
mov esi, dword [ebp - 0xccc]
mov ebx, dword [ebp - 0xcd0]
mov eax, esi
sub eax, ebx
add eax, edi
cmp eax, dword [ebp - 0xcc8]
jae 0x402381
push edi
lea eax, [ebp - 0x71c]
push eax
push esi
call fcn.0041d7c0
add esi, edi
add esp, 0xc
test edi, edi
mov dword [ebp - 0xccc], esi
jg 0x402356
mov eax, dword [ebp - 0xcd4]
push dword [ebp - 0xcd8]
mov byte [esi], 0
sub esi, ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d5e0
leave
ret 0xc