Function at 0x408240
Capabilities:
Connect to http server
Create http request
Reference http user-agent string
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4a85f8
push 0x47eeb0
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x4aab30]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 0x148], edx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x140], eax
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x144], ecx
xor esi, esi
mov dword [ebp - 0x12c], esi
mov dword [ebp - 0x130], esi
xor ebx, ebx
mov dword [ebp - 0x138], ebx
xor edi, edi
mov dword [ebp - 0x134], edi
mov dword [ebp - 0x14c], esi
mov byte [ebp - 0x124], bl
push 0xff
push esi
lea edx, [ebp - 0x123]
push edx
call fcn.0047d730
add esp, 0xc
mov dword [ebp - 4], ebx
push edi
push edi
push edi
push edi
push str.Mozilla_5.0__Windows__U__Windows_NT_6.1__sl__rv:1.9.2.11__Gecko_20101012_Firefox_3.6.11
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x130], eax
test eax, eax
jne 0x40831b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x12c], esi
push esi
push str.Unable_to_open_internet_connection._Error_code__lu.
mov ecx, esi
call fcn.00405e70
add esp, 8
jmp 0x40848a
push 0
push 0
push 3
push 0
push 0
push 0x50
mov ecx, dword [ebp - 0x128]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebx, eax
mov dword [ebp - 0x138], ebx
test ebx, ebx
jne 0x408361
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x12c], esi
push esi
mov edx, dword [ebp - 0x128]
push edx
push str.Unable_to_connect_to__S._Error_code__lu.
jmp 0x408480
mov dword [ebp - 0x14c], 0x4000
push 0
push 0x84404000
push 0
push 0
push 0
mov eax, dword [ebp - 0x13c]
push eax
push 0x4a05ac
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
mov dword [ebp - 0x134], edi
test edi, edi
jne 0x4083b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x12c], esi
push esi
mov ecx, dword [ebp - 0x128]
push ecx
push str.Open_request_to_server__S_failed._Error_code__lu.
jmp 0x408480
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str.Range:_bytes_I64u_
lea edx, [ebp - 0x124]
call fcn.004087e0
add esp, 0xc
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
jmp 0x4083e0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083e0
sub eax, edx
push 0x10000000
push eax
lea ecx, [ebp - 0x124]
push ecx
push edi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
test eax, eax
jne 0x40842f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x12c], esi
cmp esi, 0x2f0d
jne 0x408420
mov edx, dword [ebp - 0x128]
push edx
jmp 0x40845f
push esi
mov eax, dword [ebp - 0x128]
push eax
push str.Unable_to_send_request_header_to_the_server___S_._Error_code:__lu.
jmp 0x408480
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40848a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x12c], esi
cmp esi, 0x2f0d
jne 0x408473
mov ecx, dword [ebp - 0x128]
push ecx
push str.Server_CA_is_not_trusted._Unable_to_establish_secure_connection_to__S.
mov ecx, 0x2f0d
call fcn.00405e70
add esp, 8
jmp 0x40848a
push esi
mov edx, dword [ebp - 0x128]
push edx
push str.Unable_to_send_request_to_the_server___S_._Error_code:__lu.
mov ecx, esi
call fcn.00405e70
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
call fcn.004084c6
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0047a722
mov esp, ebp
pop ebp
ret