Function at 0x402e3b
Capabilities:
Check http status code
Create http request
Delete file
Download and write a file
Get http content length
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x96c
push ebx
push edi
push 0x3f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x16a]
mov word [ebp - 0x16c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x96a]
mov word [ebp - 0x96c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0xe
xor eax, eax
pop ecx
lea edi, [ebp - 0x68]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x16c]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x96c]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
mov dword [ebp - 0xc], ebx
push dword [ebp + 8]
mov dword [ebp - 0x6c], 0x3c
mov dword [ebp - 0x58], 0x80
mov dword [ebp - 0x3c], 0x400
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x403063
push ebx
push ebx
push ebx
push ebx
push str.Mozilla_4.0__compatible__MSIE_7.0__Windows_NT_6.0__Trident_4.0__.NET_CLR_2.0.50727__Media_Center_PC_5.0__.NET_CLR_3.0.04506__.NET_CLR_3.5.21022_
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40307c
push esi
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [ebp - 0x10]
pop edi
mov dword [ebp - 0x10], 0x3a98
push edi
push ecx
push 2
push eax
call esi
lea eax, [ebp - 0x10]
push edi
push eax
push 7
push dword [ebp - 4]
mov dword [ebp - 0x10], 0x3a98
call esi
lea eax, [ebp - 0x10]
push edi
push eax
push 8
push dword [ebp - 4]
call esi
push ebx
push 0x84000100
push ebx
push ebx
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x403096
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea ecx, [ebp - 0x1c]
push ebx
push ecx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push ecx
push 0x20000013
push eax
mov dword [ebp - 0x1c], edi
call esi
test eax, eax
je 0x4030a1
cmp dword [ebp - 0x18], 0xc8
jne 0x4030ac
lea eax, [ebp - 0x1c]
push ebx
or dword [ebp - 0x30], 0xffffffff
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], edi
push eax
push 0x20000005
push dword [ebp + 8]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402f8f
call esi
push ebx
push 0x80
push edi
push ebx
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x4030c5
push 0x1000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [ebp - 8]
mov esi, 0xfff
push ecx
push esi
push eax
mov dword [ebp - 0xc], eax
push dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x24], ebx
call edi
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x4030d5
cmp dword [ebp - 8], ebx
je 0x403020
lea eax, [ebp - 0x2c]
push ebx
push eax
mov dword [ebp - 0x2c], ebx
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403042
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 8]
jne 0x403042
add dword [ebp - 0x24], eax
lea eax, [ebp - 8]
push eax
push esi
push dword [ebp - 0xc]
push dword [ebp + 8]
jmp 0x402fdb
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
je 0x403055
cmp eax, dword [ebp - 0x24]
je 0x403055
push 1
push 5
call fcn.0040c3cd
mov ecx, eax
call fcn.0040c619
mov dword [ebp - 0x14], ebx
jmp 0x403055
push 1
push 6
mov dword [ebp - 0x14], ebx
call fcn.0040c3cd
mov ecx, eax
call fcn.0040c619
cmp dword [ebp - 0x14], ebx
je 0x4030d5
mov dword [ebp - 0x28], 1
jmp 0x4030d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
call fcn.0040c3cd
mov ecx, eax
call fcn.0040c619
jmp 0x403125
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
call fcn.0040c3cd
mov ecx, eax
call fcn.0040c619
jmp 0x403117
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
jmp 0x4030b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 3
jmp 0x4030b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x18]
push 7
call fcn.0040c3cd
mov ecx, eax
call fcn.0040c619
jmp 0x403108
call esi
push eax
push edi
call fcn.0040c3cd
mov ecx, eax
call fcn.0040c619
cmp dword [ebp - 0x20], 0xffffffff
je 0x4030fa
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], ebx
jne 0x4030fa
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0xc], ebx
je 0x403108
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp + 8], ebx
pop esi
je 0x403117
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 4], ebx
je 0x403125
push dword [ebp - 4]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x28]
pop edi
pop ebx
leave
ret