Function at 0x606630
Capabilities:
Copy file
Receive http response

Disassembly:
push 0x258
mov eax, 0x616f6b
call fcn.0050809c
mov edi, ecx
xor ebx, ebx
push ecx
lea ecx, [ebp - 0xfc]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
call fcn.00455a1d
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00606218
mov esi, eax
test esi, esi
jne 0x606695
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push 0x6bc2c8
call fcn.00609c05
push ebx
push str.printErrorMsgForID:_Errorcode:__d
call fcn.00609c05
add esp, 0x10
push esi
jmp 0x60697b
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
push ecx
push dword [edi + 0x40]
lea ecx, [ebp - 0xfc]
call fcn.004559db
cmp dword [ebp - 0xac], 0
je 0x606831
push str.open_success
call fcn.00609c05
pop ecx
cmp dword [edi + 0x4c], 0
jbe 0x606988
mov esi, dword [ebp - 0x38]
cmp dword [edi], 0
je 0x606737
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
test esi, esi
lea eax, [esi + 1]
push 0x64
cmove eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x28]
pop edx
mov dword [ebp - 0x34], eax
add esi, 0x7a120
call fcn.006083a4
push esi
push dword [ebp - 0x34]
push 0x6bc440
push dword [ebp - 0x28]
call fcn.00458d6e
push dword [ebp - 0x28]
push str.InternetGetRequestByBitrate:_Content_Range_Header_message:__s
call fcn.00609c05
add esp, 0x18
mov ecx, edi
push dword [ebp - 0x28]
call fcn.006063ad
test eax, eax
jne 0x60691b
cmp dword [edi + 8], 0xc8
je 0x60674d
cmp dword [edi + 8], 0xce
jne 0x606925
cmp dword [edi + 0x74], 0
jne 0x60675e
push str.download_progress_window_handle_is_null
call fcn.00609b90
pop ecx
mov esi, dword [ebp - 0x38]
and dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 0x80]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x60695e
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x6068eb
inc eax
push eax
push 2
call fcn.00518b71
pop ecx
pop ecx
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x24], eax
push ecx
push dword [ebp - 0x2c]
push eax
push dword [edi + 0x80]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x606949
add esi, dword [ebp - 0x30]
cmp dword [ebp - 0x30], 0
mov dword [ebp - 0x38], esi
je 0x6068d8
cmp dword [edi + 0x24], 2
push dword [ebp - 0x24]
jne 0x606879
lea ecx, [edi + 0xc]
call fcn.00459264
mov eax, dword [edi + 0xc]
mov edx, 0x6b7f1c
mov ecx, edx
mov dword [ebp - 0x40], edx
sub ecx, eax
push 0
mov eax, dword [eax - 0xc]
push edx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x24], eax
call fcn.00513abe
pop ecx
pop ecx
mov edx, eax
mov ecx, accept
mov eax, dword [ebp - 0x24]
sub ecx, edx
mov dword [ebp - 0x44], edx
cmp ecx, eax
jl 0x606ade
add eax, edx
lea ecx, [edi + 0xc]
push eax
mov dword [ebp - 0x4c], eax
call fcn.0045313f
mov ecx, dword [ebp - 0x3c]
mov edx, eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x48], edx
cmp ecx, eax
ja 0x606858
add ecx, edx
jmp 0x60685b
mov eax, dword [ebp - 0xfc]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0xf0], 6
je 0x6066cb
push str.open_failed
call fcn.00609c05
pop ecx
jmp 0x606988
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
push edx
push ecx
mov ecx, dword [ebp - 0x48]
add ecx, eax
call fcn.005f9c5f
pop ecx
pop ecx
push dword [ebp - 0x4c]
lea ecx, [edi + 0xc]
call fcn.00453119
jmp 0x606884
lea ecx, [ebp - 0xfc]
call fcn.004561e7
cmp dword [edi + 0x74], 0
je 0x6068e1
movd xmm1, esi
mov eax, esi
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x6f3e30]
mov eax, dword [edi + 0x4c]
mulsd xmm1, qword [0x6f3d90]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6f3e30]
divsd xmm1, xmm0
cvttsd2si eax, xmm1
push eax
push 0
push dword [edi + 0x78]
push dword [edi + 0x74]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x6068e1
push ecx
lea ecx, [edi + 0xc]
call fcn.004590a0
cmp dword [ebp - 0x30], 0
jne 0x606761
lea ecx, [ebp - 0xfc]
call fcn.00455972
cmp dword [edi], 0
je 0x606910
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x258
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, dword [edi + 0x4c]
jb 0x6066d8
jmp 0x606988
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x606973
push dword [edi + 8]
push str.InternetGetRequestByBitrate_:_Failed_with_the_http_status_code__d
call fcn.00609c05
pop ecx
pop ecx
push 1
push 0
call fcn.005fa5d9
mov ecx, eax
call fcn.005fa4e2
push 0xd
pop ebx
jmp 0x606988
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push str.InternetGetRequestByBitrate_:_Error_occured_in_WinHttpReadData______d
call fcn.00609aff
jmp 0x606971
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push str.InternetGetRequestByBitrate_:_Error_occured_in_WinHttpQueryDataAvailable______d
call fcn.00609c05
pop ecx
pop ecx
push ebx
call fcn.00607cdc
push 2
push ebx
call fcn.005fa5d9
mov ecx, eax
call fcn.005fa4e2
cmp dword [edi + 0x24], 4
jne 0x606ab2
push 0
push dword [edi + 0x3c]
push dword [edi + 0x40]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
je 0x606a6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push 0
push ebx
call fcn.005fa5d9
mov ecx, eax
call fcn.005fa4e2
push ebx
push str.InternetGetRequestEx_:_could_nt_copy_from_.tmp_file__errorcode______d
call fcn.00609c05
push str.copyfile_failed:_so_trying_std_c_way
call fcn.00609c05
push dword [edi + 0x40]
lea ecx, [ebp - 0x264]
call fcn.00458edf
sub esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x1ac]
push dword [edi + 0x3c]
call fcn.00458de7
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x208]
test eax, eax
je 0x606a41
cmp dword [ebp - 0x15c], 0
je 0x606a32
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x1ac]
call fcn.00458f6d
lea ecx, [ebp - 0x1ac]
call fcn.00455972
mov eax, dword [ebp - 0x208]
test eax, eax
je 0x606a41
lea ecx, [ebp - 0x264]
call fcn.00458e76
cmp dword [ebp - 0x15c], 0
je 0x606a55
lea ecx, [ebp - 0x1ac]
call fcn.00455972
lea ecx, [ebp - 0x1ac]
call fcn.004556f6
lea ecx, [ebp - 0x264]
call fcn.00458d9b
jmp 0x606acb
push dword [edi + 0x28]
lea ecx, [ebp - 0x24]
call fcn.0045290e
push 0
push str.cloudfront
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.004527c8
test eax, eax
je 0x606aa5
push dword [edi + 0x3c]
push dword [edi + 0x28]
push dword [edi + 0x34]
push str.InternetGetRequestEx_:_Successfully_downloaded_the_file__s_from_the_server__s_to_the_destination_file__s
call fcn.00609c05
add esp, 0x10
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00452239
jmp 0x606acb
mov ecx, dword [edi + 0x40]
call fcn.00608326
mov ebx, eax
push 0
push ebx
call fcn.005fa5d9
mov ecx, eax
call fcn.005fa4e2
lea ecx, [ebp - 0xfc]
call fcn.004556f6
mov eax, ebx
call fcn.00508046
ret
push 0x80070057
call fcn.00452132
int3