Function at 0x40e290
Capabilities:
Check http status code
Connect to http server
Create http request
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
Resolve function by parsing pe exports
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc74
mov eax, dword [0x477b14]
push ebx
mov dword [esp + 0xc74], eax
push esi
push edi
xor eax, eax
xor esi, esi
mov word [esp + 0x78], si
mov ecx, 0x7f
lea edi, [esp + 0x7a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [esp + 0x278], si
mov ecx, 0x7f
lea edi, [esp + 0x27a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov ecx, 0xf
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x78]
lea edx, [esp + 0x3c]
push edx
mov dword [esp + 0x6c], eax
mov eax, pe_nt_image_headers32
push esi
mov dword [esp + 0x74], eax
mov dword [esp + 0x58], eax
mov eax, dword [ebp + 8]
push esi
lea ecx, [esp + 0x284]
push eax
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x34], esi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x4c], 0x3c
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
push esi
push esi
push esi
push esi
push 0x467468
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
cmp ebx, esi
mov dword [esp + 0x2c], ebx
je 0x40e504
mov ecx, dword [esp + 0x54]
push esi
push esi
push 3
push esi
push esi
push ecx
lea edx, [esp + 0x290]
push edx
push ebx
call dword [sym.imp.WININET.dll_InternetConnectW]
cmp eax, esi
mov dword [esp + 0x18], eax
je 0x40e504
mov edx, dword [esp + 0x18]
push esi
push 0x84400100
lea eax, [esp + 0x38]
push eax
push esi
push str.HTTP_1.1
lea ecx, [esp + 0x8c]
push ecx
push esi
push edx
mov dword [esp + 0x50], 0x46744c
mov dword [esp + 0x54], esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
cmp eax, esi
mov dword [esp + 0xc], eax
je 0x40e504
push esi
push esi
push esi
push esi
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x40e504
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push esi
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
push 0x20000013
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], 4
call edi
test eax, eax
je 0x40e504
cmp dword [esp + 0x20], 0xc8
mov dword [esp + 0x28], esi
jne 0x40e504
mov eax, dword [esp + 0xc]
push esi
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x30]
push edx
push 0x20000005
push eax
mov dword [esp + 0x30], 4
call edi
test eax, eax
je 0x40e504
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp + 0xc]
push esi
push 0x80
push 2
push esi
push esi
push 0x40000000
push ecx
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40e504
mov ebx, 0x400
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push 0x400
lea eax, [esp + 0x480]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40e4ec
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x40e4f8
mov ecx, dword [esp + 0x14]
push esi
lea edx, [esp + 0x3c]
push edx
push eax
lea eax, [esp + 0x484]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp ebx, esi
je 0x40e4ec
mov eax, dword [esp + 0x10]
cmp ebx, eax
mov edi, dword [ebp + 0x10]
lea esi, [esp + 0x478]
jb 0x40e4d6
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
sub ebx, eax
xor esi, esi
jmp 0x40e4f0
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ebx, ebx
xor esi, esi
jmp 0x40e4f0
mov eax, dword [esp + 0x10]
cmp eax, esi
jne 0x40e467
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x24], 1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
push ebx
call esi
mov ecx, dword [esp + 0xc7c]
mov eax, dword [esp + 0x24]
call fcn.00444c27
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret