Function at 0x4102c0
Capabilities:
Check http status code
Check internet connectivity via wininet
Create http request
Delete file
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4646be
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2ef4
call fcn.00446dd0
mov eax, dword [0x486350]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x2e48], ebx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2e3c], 0
mov dword [ebp - 0x2e50], eax
mov dword [ebp - 0x2f04], 0x47b750
mov dword [ebp - method.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], 0x47deb8
sub esp, 8
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2f00]
mov dword [ebp - 0x2e3c], 1
lea ecx, [ebp - 0x2f04]
push eax
call fcn.00412500
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x2f04]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x2f04]
mov ecx, dword [eax + 4]
push ecx
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x2f08], eax
lea ecx, [ebp - 0x2f00]
call fcn.00412430
push 0x200
xor edi, edi
mov dword [ebp - 4], 2
lea eax, [ebp - 0x3b8]
mov dword [ebp - 0x2e54], 0
push edi
push eax
call fcn.00449690
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, ebx
call fcn.00410a70
test al, al
jne 0x41043c
mov eax, dword [ebp - 0x2f04]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x2f04]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x2f08], eax
lea ecx, [ebp - 0x2f00]
call fcn.004115b0
mov eax, dword [ebp - 0x2f04]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x2f04]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x2f08], eax
lea eax, [ebp - 0x2e9c]
mov dword [ebp - 4], 4
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004131af
add esp, 4
jmp 0x410933
push 0x104
lea eax, [ebp - 0x1b8]
push 0
push eax
call fcn.00449690
push 0x2f
push ebx
call fcn.00448a60
mov edx, eax
add esp, 0x14
test edx, edx
je 0x410928
mov ecx, edx
lea ebx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410470
sub ecx, ebx
cmp ecx, 0x200
jae 0x410928
lea ecx, [edx + 1]
lea edx, [ebp - 0x1b8]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x410490
test esi, esi
je 0x4104cf
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4104a6
sub ecx, edx
je 0x4104cf
lea eax, [ebp - 0x1b8]
push eax
push esi
lea eax, [ebp - 0x3b8]
push str._s_s
push eax
call fcn.00410010
add esp, 0x10
jmp 0x4104ea
lea eax, [ebp - 0x1b8]
push eax
lea eax, [ebp - 0x3b8]
push 0x47dd90
push eax
call fcn.00410010
add esp, 0xc
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x410928
push eax
push eax
push eax
push 1
push str.downloader
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [ebp - 0x2e3c], ebx
test ebx, ebx
jne 0x410545
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ecx + str.Cant_open_connection]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2c09], al
test al, al
jne 0x410520
push 0x4841e8
lea eax, [ebp - 0x2c08]
push eax
call fcn.00448cc7
lea eax, [ebp - 0x2f04]
push eax
lea ecx, [ebp - 0x3b8]
call fcn.004109f0
add esp, 4
mov esi, eax
lea eax, [ebp - 0x64]
push esi
push str.Range:bytes_d_
push eax
call fcn.00410010
lea ecx, [ebp - 0x64]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410574
push 0
push 0x4000000
sub ecx, edx
lea eax, [ebp - 0x64]
push ecx
push eax
push dword [ebp - 0x2e48]
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, eax
mov dword [ebp - 0x2e54], ebx
test ebx, ebx
jne 0x4105d5
xor ecx, ecx
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ecx + str.Cant_open_url]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2c59], al
test al, al
jne 0x4105b0
push 0x4841e8
lea eax, [ebp - 0x2c58]
push eax
call fcn.00448cc7
push 0
lea eax, [ebp - 0x2e48]
mov dword [ebp - 0x2e48], 0x4f
push eax
lea eax, [ebp - 0xb4]
push eax
push 0x12
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x410892
lea eax, [ebp - 0xb4]
push 0x2f
push eax
call fcn.0044b520
add esp, 8
cmp byte [eax + 1], 0x30
je 0x410892
lea eax, [ebp - 0xb4]
push 0x2e
push eax
call fcn.0044b520
inc eax
push eax
call fcn.0044f4a7
add esp, 0xc
test eax, eax
jle 0x410892
push 0
lea eax, [ebp - 0x2e4c]
mov dword [ebp - 0x2e4c], 4
push eax
lea eax, [ebp - 0x2e40]
push eax
push 0x20000013
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x410695
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ecx + str.Cant_get_status_code]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2ca9], al
test al, al
jne 0x410670
push 0x4841e8
lea eax, [ebp - 0x2ca8]
push eax
call fcn.00448cc7
cmp dword [ebp - 0x2e40], 0x194
jne 0x4106d5
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
mov al, byte [ecx + 0x47de08]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2cf9], al
test al, al
jne 0x4106b0
push 0x4841e8
lea eax, [ebp - 0x2cf8]
push eax
call fcn.00448cc7
push 0
lea eax, [ebp - 0x2e4c]
push eax
lea eax, [ebp - 0x2e40]
push eax
push 0x20000005
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x410725
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ecx + str.File_or_content_length_not_found]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2d49], al
test al, al
jne 0x410700
push 0x4841e8
lea eax, [ebp - 0x2d48]
push eax
call fcn.00448cc7
mov eax, dword [ebp - 0x2e40]
cmp esi, eax
je 0x41081d
test eax, eax
je 0x41081d
nop dword [eax + eax]
lea eax, [ebp - 0x2e44]
push eax
push 0x2800
lea eax, [ebp - 0x2bb8]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x410785
xor ecx, ecx
mov al, byte [ecx + str.Error_occurred_during_download]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2d99], al
test al, al
jne 0x410760
push 0x4841e8
lea eax, [ebp - 0x2d98]
push eax
call fcn.00448cc7
push 0
push dword [ebp - 0x2e44]
lea eax, [ebp - 0x2bb8]
push eax
lea ecx, [ebp - 0x2f04]
call fcn.00411780
mov eax, dword [ebp - 0x2f04]
mov eax, dword [eax + 4]
cmp dword [ebp + eax - 0x2ef8], 0
je 0x4107e5
xor ecx, ecx
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ecx + str.Error_writing_file]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2de9], al
test al, al
jne 0x4107c0
push 0x4841e8
lea eax, [ebp - 0x2de8]
push eax
call fcn.00448cc7
mov eax, dword [ebp - 0x2e44]
add edi, eax
mov ecx, dword [ebp - 0x2e50]
test ecx, ecx
je 0x410813
test eax, eax
je 0x41082e
lea eax, [esi + edi]
push eax
mov eax, dword [ebp - 0x2e40]
add eax, esi
push eax
call ecx
mov eax, dword [ebp - 0x2e44]
add esp, 8
test eax, eax
jne 0x410740
jmp 0x41082e
mov eax, dword [ebp - 0x2e50]
test eax, eax
je 0x41082e
push esi
push esi
call eax
add esp, 8
lea ecx, [ebp - 0x2f00]
mov dword [ebp - 4], 2
call fcn.00412370
test eax, eax
jne 0x41086f
mov eax, dword [ebp - 0x2f04]
lea ecx, [ebp - 0x2f04]
push 0
mov eax, dword [eax + 4]
add ecx, eax
mov edx, dword [ecx + 0xc]
or edx, 2
mov eax, edx
or eax, 4
cmp dword [ecx + 0x38], 0
cmovne eax, edx
push eax
call fcn.00404780
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x2e3c]
call esi
lea ecx, [ebp - 0x2f04]
call fcn.00410960
mov al, 1
jmp 0x410935
xor ecx, ecx
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ecx + str.HTTP_1.1_not_supported]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2e39], al
test al, al
jne 0x4108a0
push 0x4841e8
lea eax, [ebp - 0x2e38]
push eax
call fcn.00448cc7
lea ecx, [ebp - 0x2f00]
call fcn.00412370
test eax, eax
jne 0x4108fc
mov eax, dword [ebp - 0x2f04]
lea ecx, [ebp - 0x2f04]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x4108f4
or eax, 4
push 0
push eax
call fcn.00404780
lea eax, [ebp - 0x3b8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x2e54]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x2e3c]
call esi
push 0
push 0
call fcn.00448cc7
lea ecx, [ebp - 0x2f04]
call fcn.00410960
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004461e5
mov esp, ebp
pop ebp
ret