Function at 0x41046a
Capabilities:
Copy file
Receive http response
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x3c
push ebx
xor eax, eax
mov ebx, ecx
push ebp
push esi
push edi
mov dword [esp + 0x10], eax
mov esi, eax
mov dword [esp + 0x1c], eax
mov edi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], eax
call fcn.004108e3
mov ebp, eax
mov dword [esp + 0x28], ebp
test ebp, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x4104cd
call ebp
mov edi, eax
push edi
push str.InternetGetRequestEx_:_Error_occured_while_creating_the_file______d
call fcn.0041c596
pop ecx
pop ecx
mov ecx, edi
call fcn.0040f535
push esi
push edi
call fcn.00408737
mov ecx, eax
call fcn.0040875f
jmp 0x41072c
cmp dword [ebx + 0x4c], esi
jbe 0x410718
cmp dword [ebx], edi
je 0x410539
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
test esi, esi
je 0x4104f0
lea eax, [esi + 1]
mov dword [esp + 0x1c], eax
push 0x64
pop edx
lea ecx, [esp + 0x10]
call fcn.0040f545
lea eax, [esi + 0x7a120]
push eax
push dword [esp + 0x20]
push str.Range:_bytes_u__u
push dword [esp + 0x1c]
call fcn.0040f51f
push dword [esp + 0x20]
push str.InternetGetRequestByBitrate:_Content_Range_Header_message:__s
call fcn.0041c596
add esp, 0x18
mov ecx, ebx
push dword [esp + 0x10]
call fcn.004107d0
test eax, eax
jne 0x41069b
cmp dword [ebx + 8], 0xc8
je 0x41054f
cmp dword [ebx + 8], 0xce
jne 0x4106a1
cmp dword [ebx + 0x74], edi
jne 0x41055f
push str.download_progress_window_handle_is_null
call fcn.0041c68c
pop ecx
and dword [esp + 0x14], edi
lea eax, [esp + 0x14]
push eax
push dword [ebx + 0x80]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4106f2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x410676
inc eax
push eax
push 2
call fcn.004639a4
pop ecx
pop ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], eax
push ecx
push dword [esp + 0x18]
push eax
push dword [ebx + 0x80]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4106e1
mov eax, dword [esp + 0x18]
add esi, eax
mov dword [esp + 0x30], esi
test eax, eax
je 0x410663
cmp dword [ebx + 0x24], 2
jne 0x4105eb
push dword [esp + 0x20]
lea ecx, [ebx + 0xc]
call fcn.00410bb7
push 0x497a60
lea ecx, [ebx + 0xc]
call fcn.00410bb7
jmp 0x41066c
push 0
lea ecx, [esp + 0x38]
push ecx
push eax
push dword [esp + 0x2c]
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4106c5
mov eax, dword [ebx + 0x74]
mov dword [esp + 0x30], eax
test eax, eax
je 0x41066c
mov dword [esp + 0x20], esi
fild dword [esp + 0x20]
test esi, esi
jns 0x410626
fadd qword [0x4b1ea0]
fstp qword [esp + 0x20]
fld qword [esp + 0x20]
fmul qword [0x4b1e98]
mov eax, dword [ebx + 0x4c]
fild dword [ebx + 0x4c]
test eax, eax
jns 0x410644
fadd qword [0x4b1ea0]
fstp qword [esp + 0x20]
fdiv qword [esp + 0x20]
call fcn.00457880
push eax
push 0
push dword [ebx + 0x78]
push dword [esp + 0x3c]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x41066c
push ecx
lea ecx, [ebx + 0xc]
call fcn.00410ba8
cmp dword [esp + 0x18], edi
jne 0x41055f
cmp dword [ebx], edi
je 0x410690
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x258
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, dword [ebx + 0x4c]
jb 0x4104d6
jmp 0x410718
call ebp
mov edi, eax
jmp 0x410703
push dword [ebx + 8]
push str.InternetGetRequestByBitrate_:_Failed_with_the_http_status_code__d
call fcn.0041c596
pop ecx
pop ecx
push 1
push 0
call fcn.00408737
mov ecx, eax
call fcn.0040875f
push 0xd
pop edi
jmp 0x410718
call ebp
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:_Error_occured_in_WriteFile______d
call fcn.0041c613
pop ecx
pop ecx
mov ecx, edi
call fcn.0040f535
push 0
jmp 0x41070b
call ebp
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:_Error_occured_in_WinHttpReadData______d
call fcn.0041c613
jmp 0x410701
call ebp
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:_Error_occured_in_WinHttpQueryDataAvailable______d
call fcn.0041c596
pop ecx
pop ecx
push edi
call fcn.0040f7b4
push 2
push edi
call fcn.00408737
mov ecx, eax
call fcn.0040875f
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebx + 0x24], 4
jne 0x4107ae
push esi
push dword [ebx + 0x3c]
push dword [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
je 0x410765
call ebp
mov edi, eax
push esi
push edi
call fcn.00408737
mov ecx, eax
call fcn.0040875f
push edi
push str.InternetGetRequestEx_:_could_nt_copy_from_.tmp_file__errorcode______d
call fcn.0041c596
pop ecx
pop ecx
jmp 0x4107c6
push dword [ebx + 0x28]
lea ecx, [esp + 0x30]
call fcn.00402244
push esi
push str.cloudfront
lea ecx, [esp + 0x34]
call fcn.0040580b
test eax, eax
je 0x41079a
push dword [ebx + 0x3c]
push dword [ebx + 0x28]
push dword [ebx + 0x34]
push str.InternetGetRequestEx_:_Successfully_downloaded_the_file__s_from_the_server__s_to_the_destination_file__s
call fcn.0041c596
add esp, 0x10
push dword [ebx + 0x40]
call fcn.0046305b
pop ecx
lea ecx, [esp + 0x2c]
call fcn.0040223f
jmp 0x4107c6
mov ecx, dword [ebx + 0x40]
call fcn.0040f567
mov edi, eax
push esi
push edi
call fcn.00408737
mov ecx, eax
call fcn.0040875f
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret