Function at 0x401a00
Capabilities:
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
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x402a3e
push eax
mov eax, 0x12c0
mov dword fs:[0], esp
call fcn.004027e0
push ebx
push esi
mov esi, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
lea eax, [esp + 0x12d8]
push 0x4040a8
push eax
mov dword [esp + 0x12d8], 1
call esi
add esp, 8
test al, al
jne 0x401f2b
lea ecx, [esp + 0x12e8]
push 0x4040a8
push ecx
call esi
add esp, 8
test al, al
jne 0x401f2b
push ebp
push edi
mov edi, 0x4040a8
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
mov dl, byte [esp + 0x2f]
push 1
not ecx
dec ecx
mov byte [esp + 0x38], dl
mov ebp, ecx
lea ecx, [esp + 0x38]
push ebp
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x401ac4
mov edi, dword [esp + 0x38]
mov ecx, ebp
mov eax, ecx
mov esi, 0x4040a8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x3c], ebp
mov byte [ecx + ebp], bl
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x189]
mov byte [esp + 0x188], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x109]
mov byte [esp + 0x108], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x89]
mov byte [esp + 0x88], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0xaad]
mov byte [esp + 0xaac], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0x289]
mov byte [esp + 0x288], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x50]
lea edx, [esp + 0x188]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x108]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x68], eax
mov eax, 0x80
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x12e4]
xor ebp, ebp
lea ecx, [esp + 0x88]
lea edx, [esp + 0xaac]
cmp eax, ebx
mov byte [esp + 0x12d8], 2
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x44], 4
mov dword [esp + 0x4c], 0x3c
mov dword [esp + 0x60], 0x100
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], 0x824
jne 0x401be6
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x4c]
push ecx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x401bff
cmp dword [esp + 0x58], 3
je 0x401c06
xor esi, esi
jmp 0x401e1a
push ebx
push ebx
push ebx
push ebx
push str.down
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esp + 0x30], eax
jne 0x401c24
xor esi, esi
jmp 0x401e1a
push ebx
push ebx
lea edx, [esp + 0x90]
push 3
lea ecx, [esp + 0x114]
push edx
mov edx, dword [esp + 0x74]
push ecx
lea ecx, [esp + 0x19c]
push edx
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edx, eax
cmp edx, ebx
mov dword [esp + 0x24], edx
jne 0x401c5d
xor esi, esi
jmp 0x401e1a
mov eax, dword [esp + 0x7c]
lea esi, [esp + 0x288]
cmp eax, ebx
je 0x401c89
mov edi, dword [esp + 0x78]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
jmp 0x401ca5
mov edi, 0x40404c
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
push 0x80200000
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.WININET.dll_HttpOpenRequestA]
push ebx
push 0x4040a8
lea ecx, [esp + 0x298]
push str.HTTP_1.1
push ecx
push str.HEAD
push edx
call edi
push 0xa
push eax
mov dword [esp + 0x24], eax
call fcn.00401970
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x401e1a
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x44]
push ebx
lea eax, [esp + 0x2c]
push edx
push eax
push 0x20000005
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x58], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x401d2d
cmp dword [esp + 0x28], 0x3e800000
jbe 0x401d2d
xor esi, esi
jmp 0x401e1a
mov eax, dword [esp + 0x24]
push ebx
push 0x80200000
push ebx
push 0x4040a8
lea edx, [esp + 0x298]
push str.HTTP_1.1
push edx
push 0x404058
push eax
call edi
push 0xa
push eax
mov dword [esp + 0x1c], eax
call fcn.00401970
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x401e1a
mov eax, dword [esp + 0x12f4]
cmp eax, ebx
jne 0x401d7b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x401da2
xor esi, esi
jmp 0x401e32
push 0x2800
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
cmp ebp, ebx
jne 0x401db9
xor esi, esi
jmp 0x401e1a
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x14]
mov ecx, 0xa00
xor eax, eax
mov edi, ebp
mov dword [esp + 0x20], ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
push 0x2800
push ebp
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x401dbd
mov eax, dword [esp + 0x20]
cmp eax, ebx
jbe 0x401e13
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x48]
add edx, eax
push ebx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x1c]
push ecx
push eax
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
cmp esi, ebx
je 0x401e1a
jmp 0x401dbd
jne 0x401dbd
mov esi, 1
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
je 0x401e32
push ebp
call fcn.00402780
add esp, 4
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp eax, ebx
je 0x401e45
mov ecx, eax
push ecx
call edi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x401e50
push eax
call edi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x401e5b
push eax
call edi
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x401e66
push eax
call edi
mov ecx, dword [esp + 0x38]
pop edi
cmp ecx, ebx
pop ebp
je 0x401e8c
mov al, byte [ecx - 1]
cmp al, bl
je 0x401e82
cmp al, 0xff
je 0x401e82
dec al
mov byte [ecx - 1], al
jmp 0x401e8c
dec ecx
push ecx
call fcn.00402780
add esp, 4
mov ecx, dword [esp + 0x12dc]
mov dword [esp + 0x30], ebx
cmp ecx, ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
je 0x401ebf
mov al, byte [ecx - 1]
cmp al, bl
je 0x401eb5
cmp al, 0xff
je 0x401eb5
dec al
mov byte [ecx - 1], al
jmp 0x401ebf
dec ecx
push ecx
call fcn.00402780
add esp, 4
mov ecx, dword [esp + 0x12ec]
mov dword [esp + 0x12dc], ebx
cmp ecx, ebx
mov dword [esp + 0x12e0], ebx
mov dword [esp + 0x12e4], ebx
je 0x401f12
mov al, byte [ecx - 1]
cmp al, bl
je 0x401f08
cmp al, 0xff
je 0x401f08
dec al
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x12c0]
mov dword fs:[0], ecx
add esp, 0x12cc
ret
dec ecx
push ecx
call fcn.00402780
add esp, 4
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x12c0]
mov dword fs:[0], ecx
add esp, 0x12cc
ret
mov ecx, dword [esp + 0x12dc]
xor ebx, ebx
cmp ecx, ebx
je 0x401f54
mov al, byte [ecx - 1]
cmp al, bl
je 0x401f4a
cmp al, 0xff
je 0x401f4a
dec al
mov byte [ecx - 1], al
jmp 0x401f54
dec ecx
push ecx
call fcn.00402780
add esp, 4
mov ecx, dword [esp + 0x12ec]
mov dword [esp + 0x12dc], ebx
cmp ecx, ebx
mov dword [esp + 0x12e0], ebx
mov dword [esp + 0x12e4], ebx
je 0x401f90
mov al, byte [ecx - 1]
cmp al, bl
je 0x401f86
cmp al, 0xff
je 0x401f86
dec al
mov byte [ecx - 1], al
jmp 0x401f90
dec ecx
push ecx
call fcn.00402780
add esp, 4
mov ecx, dword [esp + 0x12c8]
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x12cc
ret