Function at 0x40e4d0
Capabilities:
Check http status code
Check os version
Connect to http server
Parse url
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4180ec
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x109c
call fcn.00416a30
mov eax, dword [0x42202c]
xor eax, esp
mov dword [esp + 0x1098], eax
push ebx
push esi
push edi
mov eax, dword [0x42202c]
xor eax, esp
push eax
lea eax, [esp + 0x10b0]
mov dword fs:[0], eax
xor eax, eax
mov esi, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x40e59d
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x40e59d
mov eax, dword [esi + 0x28]
mov ebx, 8
cmp dword [eax + 0x38], ebx
jb 0x40e574
mov ecx, dword [eax + 0x24]
jmp 0x40e577
lea ecx, [eax + 0x24]
cmp dword [eax + 0x1c], ebx
jb 0x40e581
mov eax, dword [eax + 8]
jmp 0x40e584
add eax, 8
push ecx
push eax
push esi
push str.DownloadFile_begin__this0x_x__pUrl_s__pFileName_s
push 0xe
push str..MiniDownload.cpp
call fcn.0040a920
add esp, 0x18
jmp 0x40e5a2
mov ebx, 8
mov eax, dword [esi + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
call edi
mov ecx, dword [esi + 0x20]
push ecx
call edi
mov edx, dword [esi + 0x28]
add edx, 4
push edx
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
push 0x38
lea eax, [esp + 0x54]
push 0
push eax
mov dword [esp + 0x10c4], 0
call sub.MSVCR80.dll_memset
mov eax, dword [esp + 0x98]
mov edi, 1
add esp, 0xc
cmp dword [esp + 0xa0], ebx
mov dword [esp + 0x4c], 0x3c
mov dword [esp + 0x60], edi
mov dword [esp + 0x7c], edi
jae 0x40e610
lea eax, [esp + 0x8c]
lea ecx, [esp + 0x4c]
push ecx
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x40e91c
mov ebx, 0x400
cmp dword [esp + 0x60], ebx
jae 0x40e91c
cmp dword [esp + 0x7c], ebx
jae 0x40e91c
cmp dword [esi + 0xc], 0
je 0x40e91c
push 0x7fe
lea edx, [esp + 0xaa]
push 0
push edx
mov word [esp + 0xb0], 0
call sub.MSVCR80.dll_memset
mov eax, dword [esp + 0x68]
add esp, 0xc
push eax
push ebx
mov ebx, dword [sym.imp.MSVCR80.dll_wcscpy_s]
lea ecx, [esp + 0xac]
push ecx
call ebx
mov edx, dword [esp + 0x6c]
add esp, 0xc
xor edi, edi
push 0x7fe
lea eax, [esp + 0x8aa]
push edi
push eax
mov word [esp + edx*2 + 0xb0], di
mov word [esp + 0x8b0], di
call sub.MSVCR80.dll_memset
mov ecx, dword [esp + 0x84]
add esp, 0xc
push ecx
lea edx, [esp + 0x8a8]
push 0x400
push edx
call ebx
mov eax, dword [esp + 0x88]
add esp, 0xc
push edi
mov word [esp + eax*2 + 0x8a8], di
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea ebx, [esi + 0x14]
push ebx
call edi
mov edx, dword [esi + 0xc]
push esi
push 0
push 3
push 0
push 0
push 0
lea ecx, [esp + 0xbc]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectW]
test eax, eax
jne 0x40e72f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40e722
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov ecx, esi
call edx
test eax, eax
je 0x40e733
mov dword [esp + 0x14], 1
jmp 0x40e920
push eax
push ebx
call edi
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [ebx]
push 4
lea ecx, [esp + 0x24]
push ecx
push 0x41
push edx
mov dword [esp + 0x30], 1
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov ecx, dword [ebx]
push esi
push 0x4000000
push 0
push 0
push str.HTTP_1.0
lea eax, [esp + 0x8b8]
push eax
push 0x41c128
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
test eax, eax
jne 0x40e7a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40e722
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
test eax, eax
je 0x40e7ae
mov dword [esp + 0x14], 1
jmp 0x40e920
push eax
lea ecx, [esi + 0x10]
push ecx
call edi
cmp dword [esp + 0x20], 0
je 0x40e7cb
mov edx, dword [esi + 0x10]
push 0xa0000000
push 0xffffffffffffffff
push str.Accept_Encoding:_compress__gzip_r_n
push edx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [esi + 0x10]
push 0
push 0
push 0
push 0
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x40e816
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40e722
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
test eax, eax
je 0x40e816
mov dword [esp + 0x14], 1
jmp 0x40e920
push esi
mov edx, 0x20000013
call fcn.0040df00
cmp eax, 0xc8
je 0x40e835
mov dword [esp + 0x14], 1
jmp 0x40e920
push 0x3f
mov ebx, 0x41c178
call fcn.0040df40
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x28]
add eax, 0x20
mov edi, 8
cmp dword [eax + 0x18], edi
jb 0x40e85a
mov eax, dword [eax + 4]
jmp 0x40e85d
add eax, 4
push 0x41c188
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.MSVCR80.dll__wfopen_s]
add esp, 0xc
mov ebx, eax
call fcn.0040aaa0
test al, al
je 0x40e8a9
mov eax, dword [esi + 0x28]
add eax, 0x20
cmp dword [eax + 0x18], edi
jb 0x40e88c
mov eax, dword [eax + 4]
jmp 0x40e88f
add eax, 4
mov edx, dword [esp + 0x18]
push edx
push eax
push str.open_file__filename_s__pFileSave0x_x
push 0xe
push str..MiniDownload.cpp
call fcn.0040a920
add esp, 0x14
cmp dword [esp + 0x18], 0
je 0x40e8f1
test ebx, ebx
jne 0x40e8f1
push fcn.0040def0
call dword [sym.imp.MSVCR80.dll__set_invalid_parameter_handler]
add esp, 4
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x1c], eax
mov ecx, esi
je 0x40e8dd
mov edi, dword [esp + 0x18]
call fcn.0040e070
mov dword [esp + 0x14], eax
jmp 0x40e920
mov eax, dword [esp + 0x18]
push eax
lea edi, [esp + 0x28]
call fcn.0040e1e0
mov dword [esp + 0x14], eax
jmp 0x40e920
call fcn.0040aaa0
test al, al
je 0x40e912
push ebx
push str.DownloadFile_error6__error_d
mov ecx, 0xe
mov edx, str..MiniDownload.cpp
call fcn.0040a820
add esp, 8
mov dword [esp + 0x14], 3
jmp 0x40e920
mov dword [esp + 0x14], edi
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x40e956
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x40e956
mov ecx, dword [esp + 0x14]
push ecx
push esi
push str.ERROR_EXIT__this0x_x__dwErrCode_d
mov ecx, 0xe
mov edx, str..MiniDownload.cpp
call fcn.0040a820
add esp, 0xc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40e970
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40e982
push eax
call dword [sym.imp.MSVCR80.dll__set_invalid_parameter_handler]
add esp, 4
mov edx, dword [esi + 0x10]
test edx, edx
lea edi, [esi + 0x10]
je 0x40eb07
mov eax, dword [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [edi]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, eax
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x40e9e0
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x40e9e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [edi]
push eax
push ebx
push edx
push str.InternetCloseHandle__m_hFile0x_x__bRet_d__LastError_d
mov ecx, 0xe
mov edx, str..MiniDownload.cpp
call fcn.0040a820
add esp, 0x10
push 0
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [esi + 0x18]
cmp eax, 6
jg 0x40ea00
test eax, eax
jle 0x40ea00
mov eax, dword [esi + 0x20]
push 0xc8
push eax
jmp 0x40ea06
mov ecx, dword [esi + 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esi + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 0x14]
lea ebx, [esi + 0x14]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esp + 0x1c], eax
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x40ea66
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x40ea66
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebx]
push eax
push ecx
push edx
push str.InternetCloseHandle__m_hConnect0x_x__bRet_d__LastError_d
mov ecx, 0xe
mov edx, str..MiniDownload.cpp
call fcn.0040a820
add esp, 0x10
push 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
call ebx
push 0
push edi
call ebx
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x40eab3
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x40eab3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x20]
push eax
push esi
push str.InternetCloseHandle__this0x_x__bRet_d__LastError_d
mov ecx, 0xe
mov edx, str..MiniDownload.cpp
call fcn.0040a820
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, 6
jg 0x40eaca
test eax, eax
jle 0x40eaca
mov ecx, dword [esi + 0x20]
push 0xc8
push ecx
jmp 0x40ead0
mov edx, dword [esi + 0x20]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.0040aad0
cmp byte [eax + 0x39], 0
je 0x40eb07
call fcn.0040aad0
call fcn.0040a090
test al, al
je 0x40eb07
push esi
push str.InternetCloseHandle__wait_return__this0x_x
mov ecx, 0xe
mov edx, str..MiniDownload.cpp
call fcn.0040a820
add esp, 8
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40eb35
cmp dword [eax + 4], 0
je 0x40eb35
mov eax, dword [esi + 0x28]
cmp dword [eax + 0xbc], 0
je 0x40eb35
mov ecx, dword [esi + 0x2c]
mov ecx, dword [ecx + 4]
mov edi, dword [esp + 0x14]
mov edx, dword [ecx]
mov eax, dword [eax]
mov edx, dword [edx + 0x10]
push edi
push eax
call edx
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40eb46
mov ecx, dword [esi + 0x28]
push ecx
push eax
call fcn.0040f480
xor edx, edx
cmp dword [esp + 0x14], edx
lea ecx, [esp + 0x88]
sete dl
mov dword [esp + 0x10b8], 0xffffffff
mov esi, edx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, esi
mov ecx, dword [esp + 0x10b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1098]
xor ecx, esp
call fcn.004158da
mov esp, ebp
pop ebp
ret