Function at 0x40b720
Capabilities:
Connect to http server
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf8
lea eax, [ebp - 8]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x8c]
mov dword [esp], eax
mov dword [ebp - 0x64], esp
mov dword [ebp - 0x74], 0x41e9c0
mov dword [ebp - 0x70], 0x41f17a
mov dword [ebp - 0x68], 0x40bf92
call fcn.0041a840
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x68]
xor edx, edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
cmp eax, 0x1bb
movzx eax, ax
setne dl
sub edx, 1
and edx, 0x803000
mov dword [ebp - 0x90], edx
mov edx, dword [ecx + 0x6c]
mov dword [esp + 0x14], edx
mov edx, dword [ecx + 0x44]
mov dword [esp + 0x10], edx
mov edx, dword [ecx + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ecx + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ecx]
mov dword [ebp - 0x88], 0xffffffff
mov dword [esp], eax
call sub.WININET.DLL_InternetConnectA
mov dword [ebp - 0x94], eax
sub eax, 1
sub esp, 0x20
cmp eax, 0xfffffffd
ja 0x40b9e7
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x88], 9
add edx, 0x58
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
add edx, 0x50
mov dword [esp + 4], edx
call fcn.004037d0
mov eax, dword [ebp + 8]
sub esp, 4
cmp dword [eax + 0x6c], 3
je 0x40b850
mov byte [ebp - 0x95], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40b81e
mov dword [esp], eax
call fcn.0041dc40
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x88], 0xffffffff
mov dword [esp], edx
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
lea eax, [ebp - 0x8c]
mov dword [esp], eax
call fcn.0041a7e0
movzx eax, byte [ebp - 0x95]
leave
ret
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x90]
mov dword [esp + 0x14], eax
mov ecx, dword [ebp - 0x94]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], 0x424da8
mov dword [ebp - 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x424dac
mov dword [esp], ecx
mov dword [ebp - 0x88], 8
call sub.WININET.DLL_HttpOpenRequestA
mov dword [ebp - 0x9c], eax
sub eax, 1
sub esp, 0x20
cmp eax, 0xfffffffd
ja 0x40b808
mov eax, dword [ebp - 0x9c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x88], 7
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
je 0x40bb00
mov edx, dword [ebp - 0x9c]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x88], 7
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.0040a880
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040a770
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x2c]
mov dword [esp + 8], str.Content_Type:
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040a6a0
mov eax, dword [ebp - 0x28]
sub esp, 4
mov dword [esp + 4], str.html
mov dword [ebp - 0x88], 6
mov dword [esp], eax
call fcn.004026e0
test eax, eax
je 0x40b9f3
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov byte [ebp - 0x95], 0
test eax, eax
mov dword [ecx + 0x20], 0
mov dword [ecx + 0x24], 0
je 0x40b9bc
mov eax, ecx
add eax, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x88], 6
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x95], 0
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call fcn.0041c6b0
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x88], 8
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
jmp 0x40b80f
mov byte [ebp - 0x95], 1
jmp 0x40b839
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], 0x424dc4
mov dword [esp], eax
call fcn.004026e0
test eax, eax
jne 0x40b972
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], str.plain
mov dword [esp], eax
call fcn.004026e0
test eax, eax
jne 0x40b972
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x34]
mov dword [esp + 8], str.Content_Length:
mov dword [esp], eax
mov dword [ebp - 0x88], 6
mov dword [esp + 4], ecx
call fcn.0040a6a0
push eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x88], 5
mov dword [esp], eax
call fcn.004025e0
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0x34]
mov dword [esp], eax
call fcn.0041c6b0
mov ecx, dword [ebp - 0xa4]
test ecx, ecx
jne 0x40ba88
mov dword [ebp - 0xa4], 0x186a0
mov edx, dword [ebp + 8]
mov dword [ebp - 0x88], 6
mov dword [esp], edx
call fcn.0040a650
mov ecx, dword [ebp + 8]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0x44]
mov dword [esp + 8], str.Last_Modified:
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040a6a0
mov eax, dword [ebp - 0x40]
sub esp, 4
mov dword [ebp - 0x88], 4
mov dword [esp], eax
call fcn.0040a9e0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x38], edx
mov dword [esp], eax
call fcn.0041c6b0
cmp dword [ebp - 0xb8], 0xc8
je 0x40bb19
mov byte [ebp - 0x95], 1
jmp 0x40b9bc
call sub.KERNEL32.dll_GetLastError
test eax, eax
je 0x40b906
mov byte [ebp - 0x95], 1
jmp 0x40b9c7
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xa4]
mov dword [eax + 0x24], 0
mov dword [eax + 0x20], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x40bb7f
mov ecx, dword [ebp + 0x14]
add eax, 0x10
mov dword [ebp - 0xc8], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ecx
mov dword [ebp - 0x88], 6
call dword [ebp + 0x10]
cmp al, 1
je 0x40bb7f
mov eax, dword [ebp - 0xc8]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
jmp 0x40baf2
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x40000000
mov dword [esp], ecx
mov dword [ebp - 0x88], 6
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
test eax, eax
mov dword [ebp - 0xc4], eax
je 0x40baf2
mov eax, dword [ebp - 0xa4]
mov edx, 0x51eb851f
imul edx
mov eax, dword [ebp - 0xa4]
sar edx, 5
sar eax, 0x1f
sub edx, eax
mov dword [ebp - 0xb0], edx
je 0x40bc04
cmp dword [ebp - 0xb0], 0x1400000
jle 0x40bc0e
mov dword [ebp - 0xb0], 0x1400000
mov edx, dword [ebp - 0xb0]
lea eax, [ebp - 0x4c]
mov dword [esp], eax
mov dword [ebp - 0x88], 6
mov dword [esp + 4], edx
call fcn.0041c680
lea eax, [ebp - 9]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x88], 3
call fcn.00403f20
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xa0], 0
add eax, 0x10
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xc0], eax
jmp 0x40bdff
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x40bc98
mov edx, dword [ebp - 0xa0]
mov dword [ebp - 0xa4], edx
lea ecx, [ebp - 0x54]
add dword [ebp - 0xa0], eax
mov dword [esp + 4], 0
mov dword [esp], ecx
mov dword [ebp - 0x88], 2
call fcn.0041c680
mov eax, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0xb0]
mov dword [esp + 4], str.code:__d__requested__d_bytes__read__d_bytes__total:__d_of__d
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x54]
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x88], 1
mov dword [esp + 8], eax
call fcn.00402bf0
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0xac], ecx
call fcn.00403c20
mov edx, dword [ebp - 0xac]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00403e40
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40bd73
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x48]
lea ecx, [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc4]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x40be58
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
jne 0x40bf86
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xb4]
mov dword [ebp - 0x88], 1
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.00402d50
mov edx, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp + 8]
cmp edx, ecx
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], ecx
je 0x40be62
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40bf52
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x40bdee
mov edx, dword [ebp - 0xc0]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 1
mov dword [ebp - 0x88], 1
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
cmp al, 1
jne 0x40bf32
lea ecx, [ebp - 0x54]
mov dword [esp], ecx
call fcn.0041c6b0
mov ecx, dword [ebp - 0xbc]
mov eax, dword [ebp - 0x48]
lea edx, [ebp - 0x10]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [ebp - 0x88], 2
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
mov dword [ebp - 0xa8], 0
jne 0x40bc85
mov dword [ebp - 0x88], 2
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0xa8], eax
jmp 0x40bc85
call sub.KERNEL32.dll_GetLastError
jmp 0x40bd67
cmp dword [ebp + 0x10], 0
je 0x40be83
mov eax, dword [ebp - 0xb4]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
mov byte [ebp - 0x95], 0
lea eax, [ebp - 0x54]
mov dword [esp], eax
call fcn.0041c6b0
lea eax, [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xc4]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x88], 2
mov dword [esp], eax
call sub.KERNEL32.dll_SetFileTime
mov edx, dword [ebp - 0xc4]
sub esp, 0x10
mov dword [ebp - 0x88], 2
mov dword [esp], edx
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp + 0xc]
sub esp, 4
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], eax
call sub.KERNEL32.dll_SetFileAttributesA
sub esp, 8
cmp byte [ebp - 0x95], 0
je 0x40bf0d
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call sub.KERNEL32.dll_DeleteFileA
push eax
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x88], 3
call fcn.00403df0
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0041c6b0
jmp 0x40b9bc
mov eax, dword [ebp - 0xb4]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
jmp 0x40be83
cmp dword [ebp + 0x10], 0
je 0x40be83
mov ecx, dword [ebp - 0xb4]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 4
mov dword [ebp - 0x88], 1
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
jmp 0x40be83
mov byte [ebp - 0x95], 1
jmp 0x40be8a