Function at 0x46e540
Capabilities:
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c957b
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x5142b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x44]
mov esi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x94], ecx
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x78], edx
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebp + 0x30]
xor ebx, ebx
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x74], edx
mov edx, dword [ebp + 0x34]
mov dword [ebp - 0x88], ecx
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x28], ebx
call fcn.0046d5a0
lea eax, [ebp - 0xcc]
mov dword [ebp - 4], ebx
cmp eax, edi
je 0x46e609
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0xcc]
call fcn.0046d060
push edi
lea ecx, [ebp - 0xcc]
call fcn.0046d2e0
mov edx, dword [ebp + 8]
push edx
push str.DownloadMoreThan4GBbyBitRate:_bytesToRead__ld
mov byte [ebp - 0x21], 0
call fcn.00423db0
mov eax, dword [esi + 0x62]
mov edi, dword [esi + 0x5e]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
add esp, 8
add eax, 0xffffffff
mov dword [ebp - 0x80], eax
mov eax, 0
adc eax, 0xffffffff
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x7c], eax
jmp 0x46e645
mov edi, dword [ebp - 0x40]
xor ebx, ebx
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [ebp - 0x18]
mov ax, word [ebp - 0x16]
mov cx, word [ebp - 0x14]
mov word [ebp - 0x48], dx
movzx edx, word [ebp - 0x12]
mov word [ebp - 0x44], cx
mov word [ebp - 0x46], ax
mov eax, dword [ebp - 0x3c]
mov ecx, edi
or ecx, eax
mov word [ebp - 0x42], dx
je 0x46e680
mov dword [ebp - 0x50], edi
jmp 0x46e689
mov edx, dword [esi + 0x66]
mov eax, dword [esi + 0x6a]
mov dword [ebp - 0x50], edx
mov ebx, dword [ebp - 0x80]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x7c]
add ebx, edi
adc eax, dword [ebp - 0x3c]
push 0x190
push 1
mov dword [ebp - 0x9c], eax
call fcn.00491e51
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x4c]
push ecx
push ebx
mov ebx, dword [ebp - 0x50]
push edx
push ebx
mov edi, eax
push str.Range:_bytes_llu__llu
push edi
call fcn.00463e60
add esp, 0x20
cmp byte [esi + 0x9f], 0
je 0x46e6eb
cmp byte [ebp - 0x21], 0
je 0x46e6eb
mov eax, dword [ebp - 0x4c]
push eax
push ebx
push str.Range:_bytes_llu_
push edi
call fcn.00463e60
add esp, 0x10
push edi
push str.DownloadMoreThan4GBbyBitRate:_Content_Range_Header_message:__S_n
call fcn.00423960
push 0
or eax, 0xffffffff
lea ecx, [ebp - 0xcc]
push ecx
mov ecx, dword [ebp - 0x98]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x38]
lea edx, [ebp - 0x6c]
push edx
mov edx, dword [ebp - 0x88]
push 1
push eax
mov eax, dword [ebp - 0x90]
push ecx
mov ecx, dword [ebp - 0x74]
push edx
mov edx, dword [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x8c]
push ecx
mov ecx, dword [ebp - 0x78]
push edx
mov edx, dword [ebp + 0x18]
push eax
mov eax, dword [ebp - 0x94]
push ecx
mov ecx, dword [ebp - 0x84]
push edx
mov edx, dword [ebp + 0xc]
push eax
push ecx
push edx
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], edi
call fcn.00469e40
mov ebx, eax
mov eax, dword [ebp - 0x58]
add esp, 0x48
push eax
push ebx
push str.DownloadMoreThan4GBbyBitRate:_GetInternetRequestHandle_function_return_code:__lu___lu_n
call fcn.00423960
add esp, 0xc
test edi, edi
je 0x46e78d
push edi
call fcn.0048efd8
add esp, 4
mov eax, dword [ebp - 0x58]
cmp ebx, 0x2ee2
je 0x46ea96
cmp eax, 0xc8
je 0x46e7b0
cmp eax, 0xce
jne 0x46ea96
mov edi, edi
mov edi, dword [ebp - 0x64]
lea ecx, [ebp - 0x30]
push ecx
push edi
mov dword [ebp - 0x30], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x46e88d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push str.ResumeGetRequestByBitrate_:_Error_occured_in_WinHttpQueryDataAvailable______lu__n
call fcn.00423ad0
push ebx
call fcn.00464180
add esp, 0xc
cmp ebx, 0x2ee2
je 0x46e805
cmp ebx, 0x2efe
je 0x46e805
cmp ebx, 0x2efd
jne 0x46e894
cmp edi, 0xffffffff
je 0x46e82d
push edi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call edi
test eax, eax
jne 0x46e833
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_WinHttpCloseHandle_hRequest______d__n
call fcn.00423960
add esp, 8
jmp 0x46e833
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x68]
cmp eax, 0xffffffff
je 0x46e856
push eax
call edi
test eax, eax
jne 0x46e856
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_WinHttpCloseHandle_hConnect______d__n
call fcn.00423960
add esp, 8
mov eax, dword [ebp - 0x6c]
cmp eax, 0xffffffff
je 0x46e879
push eax
call edi
test eax, eax
jne 0x46e879
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_WinHttpCloseHandle_hSession______d__n
call fcn.00423960
add esp, 8
xor edi, edi
cmp dword [ebp - 0x34], edi
jne 0x46e961
mov dword [ebp - 0x34], 1
jmp 0x46e896
mov dword [ebp - 0x34], 0
xor edi, edi
mov eax, dword [ebp - 0x30]
cmp eax, edi
je 0x46e999
inc dword [ebp - 0x2c]
cmp eax, dword [esi + 0x56]
jbe 0x46e8ea
mov ecx, dword [esi + 0x87]
mov dword [esi + 0x56], eax
cmp ecx, edi
je 0x46e8c8
push ecx
call fcn.0048efd8
mov eax, dword [ebp - 0x30]
add esp, 4
mov dword [esi + 0x87], edi
push eax
push 1
call fcn.00491e51
mov edx, dword [esi + 0x56]
push edx
push str.Reallocating_buffer_to__d_n
mov dword [esi + 0x87], eax
call fcn.00423db0
mov eax, dword [ebp - 0x30]
add esp, 0x10
mov ecx, dword [ebp - 0x28]
lea edx, [ecx + eax]
cmp edx, dword [esi + 0x56]
jbe 0x46e929
mov eax, dword [esi + 0x87]
push 1
push ecx
push eax
lea ecx, [esi + 0x2a]
call fcn.00467b00
mov ecx, dword [esi + 0x56]
mov edx, dword [esi + 0x87]
push ecx
push edi
push edx
mov ebx, eax
mov dword [ebp - 0x28], edi
call fcn.00492ac0
add esp, 0xc
cmp ebx, edi
jne 0x46e966
mov eax, dword [ebp - 0x30]
mov ecx, edi
lea edx, [ebp - 0x54]
push edx
push eax
mov eax, dword [esi + 0x87]
add eax, ecx
mov ecx, dword [ebp - 0x64]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x46e976
mov eax, dword [ebp - 0x54]
add dword [esi + 0x97], eax
adc dword [esi + 0x9b], edi
add dword [ebp - 0x28], eax
cmp eax, edi
jne 0x46e7b0
jmp 0x46e999
mov dword [ebp - 0x34], edi
jmp 0x46e992
push ebx
push str.ResumeGetRequestByBitrate_:__Error_in_WriteFile______d__n
call fcn.00423ad0
add esp, 8
jmp 0x46e992
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push str.ResumeGetRequestByBitrate_:__Error_in_WinHttpReadData______d__n
call fcn.00423ad0
push ebx
call fcn.00464180
add esp, 0xc
mov dword [ebp - 0x38], 1
mov eax, dword [esi + 0x97]
mov ecx, dword [esi + 0x9b]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x38], edi
jne 0x46ead2
push ecx
push eax
push str.ResumeGetRequestByBitrate:_Bytes_Read:__llu_n
call fcn.00423960
mov eax, 1
add esp, 0xc
cmp dword [ebp - 0x34], eax
jne 0x46e9ed
add dword [ebp - 0x2c], eax
push ebx
push str.ResumeGetRequestByBitrate_:_second_attempt_of_the_previous_request_n
call fcn.00423db0
add esp, 8
cmp dword [ebp - 0x2c], 0
jne 0x46e640
jmp 0x46ead2
lea ecx, [ebp - 0x6c]
xor ebx, ebx
call fcn.00464100
mov edi, dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea edx, [ebp - 0x20]
push edx
call edi
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x46]
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea eax, [edx + ecx*4]
mov edx, dword [ebp - 0x44]
movzx eax, ax
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea eax, [edx + ecx*4]
movzx edx, word [ebp - 0x42]
movzx ecx, ax
mov eax, dword [ebp - 0x18]
imul ecx, ecx, 0x3e8
add ecx, edx
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [ebp - 0x16]
lea edx, [eax + edx*4]
movzx eax, dx
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [ebp - 0x14]
lea edx, [eax + edx*4]
movzx eax, dx
movzx edx, word [ebp - 0x12]
imul eax, eax, 0x3e8
add eax, edx
sub eax, ecx
cmp eax, 0x1c2
jae 0x46ea83
mov ecx, 0x258
sub ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
call edi
jmp 0x46e9de
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
call edi
jmp 0x46e9de
cmp eax, 0x1a0
jne 0x46ead2
cmp byte [esi + 0x9f], 0
je 0x46eab5
cmp byte [ebp - 0x21], 0
jne 0x46eab5
mov byte [ebp - 0x21], 1
jmp 0x46e640
mov ecx, dword [esi + 0x9b]
mov edx, dword [esi + 0x97]
push ecx
push edx
push str.DownloadMoreThan4GBbyBitRate:_File_completely_downloaded_and_requested_for_invalid_byte_range._TotalbytesRead____llu__n
call fcn.00423db0
add esp, 0xc
xor ebx, ebx
mov eax, dword [esi + 0x9b]
mov ecx, dword [esi + 0x97]
push eax
push ecx
push str.ResumeGetRequestByBitrate:_Bytes_Read:__llu_n
call fcn.00423db0
add esp, 0xc
cmp ebx, 0x2efe
je 0x46eb09
cmp ebx, 0x2efd
je 0x46eb09
cmp ebx, 0x2ee2
je 0x46eb09
test ebx, ebx
jne 0x46eb1e
mov edx, dword [ebp - 0x28]
mov eax, dword [esi + 0x87]
push 0
push edx
push eax
lea ecx, [esi + 0x2a]
call fcn.00467b00
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], 0xffffffff
call fcn.0046d4c0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0048ed61
mov esp, ebp
pop ebp
ret 0x40