Function at 0x40c630
Capabilities:
Check http status code
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x19e4
call fcn.0040e340
mov dword [ebp - 0xca4], 0
mov dword [ebp - 0xca0], 0
mov dword [ebp - 0xc98], 0
mov dword [ebp - 0xca8], 0x50
mov dword [ebp - 0x40c], 0
mov dword [ebp - 0xcac], 0
mov dword [ebp - 0x408], 0
mov dword [ebp - 0xc9c], 0
cmp dword [ebp + 0xc], 0
je 0x40c6a3
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
test eax, eax
ja 0x40c6aa
xor eax, eax
jmp 0x40cc75
cmp dword [ebp + 0x18], 0
je 0x40c6c8
cmp dword [ebp + 0x1c], 0
jle 0x40c6c8
mov ecx, dword [ebp + 0x1c]
push ecx
push 0
mov edx, dword [ebp + 0x18]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 0x10], 0
je 0x40c6de
cmp dword [ebp + 0x14], 0
je 0x40c6de
mov dword [ebp - 0xcac], 1
push 0x400
lea eax, [ebp - 0x404]
push eax
push 0x400
lea ecx, [ebp - 0xc94]
push ecx
lea edx, [ebp - 0xca8]
push edx
push 0x80
lea eax, [ebp - 0x490]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040cc80
add esp, 0x20
test eax, eax
jne 0x40c71e
jmp 0x40cc23
mov edx, dword [ebp + 0x2c]
push edx
call fcn.0040d0e0
add esp, 4
lea eax, [ebp - 0x404]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
test eax, eax
jbe 0x40c767
push 0x412f68
lea ecx, [ebp - 0xc94]
push ecx
call sub.MSVCRT.dll_strcat
add esp, 8
lea edx, [ebp - 0x404]
push edx
lea eax, [ebp - 0xc94]
push eax
call sub.MSVCRT.dll_strcat
add esp, 8
push 0
push 0
push 0
push 0
push str.Mozilla_4.0__compatible__MSIE_4.01__Proudhons_Bot__Windows_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0xca4], eax
cmp dword [ebp - 0xca4], 0
je 0x40c7be
push 0
push 0
push 3
push 0
push 0
mov cx, word [ebp - 0xca8]
push ecx
lea edx, [ebp - 0x490]
push edx
mov eax, dword [ebp - 0xca4]
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0xca0], eax
cmp dword [ebp - 0xca0], 0
jne 0x40c7c3
jmp 0x40cc23
cmp dword [ebp - 0xcac], 0
je 0x40c7d8
mov dword [ebp - 0x19d8], str.POST
jmp 0x40c7e2
mov dword [ebp - 0x19d8], 0x412f1c
push 0
mov ecx, dword [ebp + 0x28]
and ecx, 0xf0
and ecx, 0x80
neg ecx
sbb ecx, ecx
and ecx, 0x40000
or ecx, 0x400000
or ecx, 0x200000
or ecx, 0x80000000
push ecx
push 0
push 0
push str.HTTP_1.1
lea edx, [ebp - 0xc94]
push edx
mov eax, dword [ebp - 0x19d8]
push eax
mov ecx, dword [ebp - 0xca0]
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0xc98], eax
cmp dword [ebp - 0xc98], 0
jne 0x40c848
jmp 0x40cc23
lea edx, [ebp - 0x490]
push edx
push str.Host:__s
lea eax, [ebp - 0xd30]
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0xc
push 0xa0000000
lea ecx, [ebp - 0xd30]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea edx, [ebp - 0xd30]
push edx
mov eax, dword [ebp - 0xc98]
push eax
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov ecx, 1
test ecx, ecx
je 0x40cc03
mov edx, dword [ebp - 0xcac]
neg edx
sbb edx, edx
and edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0xcac]
neg eax
sbb eax, eax
and eax, dword [ebp + 0x10]
push eax
push 0
push 0
mov ecx, dword [ebp - 0xc98]
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov dword [ebp - 0xd34], eax
mov dword [ebp - 0xd38], 4
push 0
lea edx, [ebp - 0xd38]
push edx
lea eax, [ebp - 0xc9c]
push eax
push 0x20000013
mov ecx, dword [ebp - 0xc98]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40c901
jmp 0x40cc23
mov edx, dword [ebp - 0xc9c]
mov dword [ebp - 0x19dc], edx
cmp dword [ebp - 0x19dc], 0x12e
je 0x40c93f
cmp dword [ebp - 0x19dc], 0x191
je 0x40c933
cmp dword [ebp - 0x19dc], 0x197
je 0x40c933
jmp 0x40c94b
mov dword [ebp - 0xd38], 1
jmp 0x40c955
mov dword [ebp - 0xd38], 2
jmp 0x40c955
mov dword [ebp - 0xd38], 0
cmp dword [ebp - 0xd38], 1
jne 0x40ca82
mov eax, dword [ebp + 0x28]
and eax, 0xf0
and eax, 0x80
test eax, eax
je 0x40ca14
mov dword [ebp - 0x1140], 0x400
push 0
lea ecx, [ebp - 0x1140]
push ecx
lea edx, [ebp - 0x113c]
push edx
push 0x28
mov eax, dword [ebp - 0xc98]
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40c9a9
jmp 0x40cc23
mov dword [ebp - 0x1140], 0x400
mov ecx, dword [ebp + 0x28]
push ecx
mov edx, dword [ebp + 0x24]
push edx
mov eax, dword [ebp + 0x20]
push eax
lea ecx, [ebp - 0x113c]
push ecx
lea edx, [ebp - 0x1140]
push edx
lea eax, [ebp - 0x1544]
push eax
mov ecx, dword [ebp + 0x2c]
push ecx
call fcn.0040d9a0
add esp, 0x1c
test eax, eax
jne 0x40c9e9
jmp 0x40cc23
push 0xa0000000
lea edx, [ebp - 0x1544]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea eax, [ebp - 0x1544]
push eax
mov ecx, dword [ebp - 0xc98]
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
jmp 0x40ca7d
cmp dword [ebp - 0xd34], 0
je 0x40ca29
mov dword [ebp - 0x19e0], 0
jmp 0x40ca35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x19e0], eax
cmp dword [ebp + 8], 0
je 0x40ca46
mov edx, dword [ebp + 8]
mov dword [ebp - 0x19e4], edx
jmp 0x40ca52
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [ebp - 0x19e4], eax
push 0
push 1
mov eax, dword [ebp - 0x19e0]
push eax
mov ecx, dword [ebp - 0xc98]
push ecx
mov edx, dword [ebp - 0x19e4]
push edx
call dword [sym.imp.WININET.dll_InternetErrorDlg]
cmp eax, 0x2f00
je 0x40ca7d
jmp 0x40cc23
jmp 0x40cbfe
cmp dword [ebp - 0xd38], 2
jne 0x40cbfc
mov dword [ebp - 0x194c], 0x400
push 0
lea eax, [ebp - 0x194c]
push eax
lea ecx, [ebp - 0x1948]
push ecx
push 0x21
mov edx, dword [ebp - 0xc98]
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40cac1
jmp 0x40cc23
mov dword [ebp - 0x19d4], 0x80
lea eax, [ebp - 0x1950]
push eax
mov ecx, dword [ebp - 0x19d4]
push ecx
lea edx, [ebp - 0x19d0]
push edx
mov eax, dword [ebp - 0xc98]
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40cafc
cmp dword [ebp - 0x1950], 0
jbe 0x40cafc
jmp 0x40cacb
push 7
push str.http:__
lea ecx, [ebp - 0x1948]
push ecx
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
je 0x40cb34
push 6
push str.ftp:__
lea edx, [ebp - 0x1948]
push edx
call sub.MSVCRT.dll__strnicmp
add esp, 0xc
test eax, eax
jne 0x40cbbf
cmp dword [ebp - 0xc98], 0
je 0x40cb4a
mov eax, dword [ebp - 0xc98]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0xca0], 0
je 0x40cb60
mov ecx, dword [ebp - 0xca0]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0xca4], 0
je 0x40cb76
mov edx, dword [ebp - 0xca4]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp + 0x2c]
push eax
call fcn.0040dc70
add esp, 4
push 0
push 0
push 0x400
lea ecx, [ebp - 0xc94]
push ecx
lea edx, [ebp - 0xca8]
push edx
push 0x80
lea eax, [ebp - 0x490]
push eax
lea ecx, [ebp - 0x1948]
push ecx
call fcn.0040cc80
add esp, 0x20
test eax, eax
jne 0x40cbba
jmp 0x40cc23
jmp 0x40c72a
cmp dword [ebp - 0xc98], 0
je 0x40cbd5
mov edx, dword [ebp - 0xc98]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp + 0x2c]
push eax
call fcn.0040dc70
add esp, 4
lea ecx, [ebp - 0x1948]
push ecx
lea edx, [ebp - 0xc94]
push edx
call sub.MSVCRT.dll_strcpy
add esp, 8
jmp 0x40c7c3
jmp 0x40cc03
jmp 0x40c88c
mov eax, dword [ebp + 0x1c]
sub eax, 1
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0xc98]
push edx
call fcn.0040cd80
add esp, 0xc
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0xc98], 0
je 0x40cc39
mov eax, dword [ebp - 0xc98]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0xca0], 0
je 0x40cc4f
mov ecx, dword [ebp - 0xca0]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0xca4], 0
je 0x40cc65
mov edx, dword [ebp - 0xca4]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x40c]
neg eax
sbb eax, eax
and eax, dword [ebp - 0xc9c]
mov esp, ebp
pop ebp
ret