Function at 0x46d810
Capabilities:
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c94e3
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 + 0xc]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x48]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x94], ecx
mov ecx, dword [ebp + 0x24]
xor ebx, ebx
mov dword [ebp - 0x40], edx
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0xa0], ecx
mov ecx, dword [ebp + 0x30]
mov dword [ebp - 0x80], edx
mov edx, dword [ebp + 0x34]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0x78], ecx
xor esi, esi
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0x38], ebx
call fcn.0046d5a0
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], ebx
cmp ecx, edi
je 0x46d8ee
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax]
push eax
push ecx
lea edx, [ebp - 0x28]
push edx
lea ecx, [ebp - 0xcc]
call fcn.0046d060
push edi
lea ecx, [ebp - 0xcc]
call fcn.0046d2e0
mov edi, dword [ebp + 8]
push edi
push str.DownloadFileMoreThan4GBbyBitrate:_BytesToRead__lu
call fcn.00423db0
add esp, 8
cmp dword [0x515e10], ebx
je 0x46d973
mov eax, dword [0x515e08]
push eax
lea ecx, [ebp - 0x28]
call fcn.00407450
mov edi, eax
mov eax, dword [edi]
cmp dword [eax - 4], 1
mov byte [ebp - 4], 1
jle 0x46d92e
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, edi
call fcn.00402490
mov edx, dword [ebp - 0x40]
mov eax, dword [edi]
push edx
push eax
call fcn.0049200f
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x28]
sete byte [ebp - 0x21]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46d966
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x21], 0
mov edi, dword [ebp + 8]
sete byte [ebp - 0x22]
jmp 0x46d977
mov byte [ebp - 0x22], 0
add edi, 0xffffffff
mov eax, 0
adc eax, 0xffffffff
mov byte [ebp - 0x21], 0
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x88], eax
jmp 0x46d999
mov esi, dword [ebp - 0x48]
xor ebx, ebx
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x28], 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 - 0x50], dx
movzx edx, word [ebp - 0x12]
mov word [ebp - 0x4c], cx
mov word [ebp - 0x4e], ax
mov eax, dword [ebp - 0x44]
mov ecx, esi
or ecx, eax
mov word [ebp - 0x4a], dx
je 0x46d9d5
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x70], eax
mov edi, dword [ebp - 0x8c]
mov ebx, dword [ebp - 0x88]
push 0x190
add edi, esi
adc ebx, dword [ebp - 0x44]
push 1
call fcn.00491e51
push ebx
mov ebx, dword [ebp - 0x70]
push edi
mov edi, dword [ebp - 0x74]
push ebx
push edi
mov esi, eax
push str.Range:_bytes_llu__llu
push esi
call fcn.00463e60
add esp, 0x20
cmp byte [ebp - 0x22], 0
je 0x46da28
cmp byte [ebp - 0x21], 0
je 0x46da28
push ebx
push edi
push str.Range:_bytes_llu_
push esi
call fcn.00463e60
add esp, 0x10
push esi
push str.DownloadFileMoreThan4GBbyBitrate:_Content_Range_Header_message:__S_n
call fcn.00423960
mov ecx, dword [ebp + 0x3c]
push 0
or eax, 0xffffffff
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
lea edx, [ebp - 0xcc]
push edx
mov edx, dword [ebp - 0x90]
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x7c]
push 1
push ecx
mov ecx, dword [ebp - 0x78]
push edx
mov edx, dword [ebp - 0x98]
push eax
mov eax, dword [ebp - 0x80]
push ecx
mov ecx, dword [ebp - 0xa0]
push edx
mov edx, dword [ebp - 0x84]
push eax
mov eax, dword [ebp + 0x1c]
push ecx
mov ecx, dword [ebp - 0x40]
push edx
mov edx, dword [ebp - 0x94]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push edx
push eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], esi
call fcn.00469e40
add esp, 0x48
mov edi, eax
push edi
push str.DownloadFileMoreThan4GBbyBitrate:_GetInternetRequestHandle_function_return_code:__lu_n
call fcn.00423960
add esp, 8
test esi, esi
je 0x46dac3
push esi
call fcn.0048efd8
add esp, 4
cmp edi, 0x2ee2
je 0x46dcf2
mov eax, dword [ebp - 0x58]
cmp eax, 0xc8
je 0x46db08
cmp eax, 0xce
je 0x46db08
cmp eax, 0x1a0
jne 0x46dd7f
cmp byte [ebp - 0x22], 0
je 0x46dd63
cmp byte [ebp - 0x21], 0
jne 0x46dd63
mov byte [ebp - 0x21], 1
jmp 0x46d994
cmp dword [ebp - 0x54], 0
je 0x46dc0f
mov ebx, dword [ebp - 0x64]
lea ecx, [ebp - 0x2c]
push ecx
push ebx
mov dword [ebp - 0x2c], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x46db78
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.DownloadFileMoreThan4GBbyBitrate_:_Error_occured_in_WinHttpQueryDataAvailable______lu__n
call fcn.00423ad0
push esi
call fcn.00464180
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 0xc
push ebx
mov edi, 0x2ee2
call esi
mov edx, dword [ebp - 0x68]
push edx
call esi
mov eax, dword [ebp - 0x6c]
push eax
call esi
cmp dword [ebp - 0x38], 0
jne 0x46dcf8
mov eax, 1
add dword [ebp - 0x28], eax
mov dword [ebp - 0x38], eax
jmp 0x46db85
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x38], 0
mov ecx, dword [ebp - 0x2c]
push ecx
push str.DownloadFileMoreThan4GBbyBitrate:_Bytes_Available_to_read_now:__lu_n
call fcn.00423960
mov eax, dword [ebp - 0x2c]
add esp, 8
test eax, eax
je 0x46dc15
inc dword [ebp - 0x28]
inc eax
push eax
push 1
call fcn.00491e51
mov ecx, dword [ebp - 0x64]
add esp, 8
mov ebx, eax
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x3c]
push edx
push eax
push ebx
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x46dd92
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0x34], eax
adc dword [ebp - 0x30], 0
test eax, eax
je 0x46dbf7
push 0
lea edx, [ebp - 0x9c]
push edx
push eax
mov eax, dword [ebp - 0x54]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46ddc4
mov eax, dword [ebp - 0x3c]
test ebx, ebx
je 0x46dc07
push ebx
call fcn.0048efd8
mov eax, dword [ebp - 0x3c]
add esp, 4
test eax, eax
jne 0x46db12
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
push ecx
push eax
push str.DownloadFileMoreThan4GBbyBitrate:_Bytes_Read:__d_n
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], ecx
call fcn.00423960
add esp, 0xc
cmp dword [ebp - 0x38], 1
jne 0x46dc49
push edi
push str.DownloadFileMoreThan4GBbyBitrate_:_second_attempt_of_the_previous_request_n
call fcn.00423db0
add esp, 8
jmp 0x46dce8
mov ecx, dword [ebp - 0x64]
push ecx
xor edi, edi
call esi
mov edx, dword [ebp - 0x68]
push edx
call esi
mov eax, dword [ebp - 0x6c]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea ecx, [ebp - 0x20]
push ecx
call esi
mov eax, dword [ebp - 0x50]
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [ebp - 0x4e]
lea ecx, [eax + edx*4]
movzx eax, cx
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [ebp - 0x4c]
lea ecx, [eax + edx*4]
movzx edx, word [ebp - 0x4a]
mov eax, dword [ebp - 0x18]
movzx ecx, cx
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 0x46dcda
mov ecx, 0x258
sub ecx, eax
push ecx
jmp 0x46dcdc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
call esi
cmp dword [ebp - 0x28], 0
jne 0x46d994
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x78]
push edi
push eax
mov eax, dword [ebp + 0x1c]
push ecx
mov ecx, dword [ebp - 0x40]
push edx
push eax
push ecx
call fcn.00468750
mov eax, dword [ebp - 0x64]
add esp, 0x18
test eax, eax
je 0x46dd1f
push eax
call esi
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x46dd29
push eax
call esi
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x46dd33
push eax
call esi
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], 0xffffffff
call fcn.0046d4c0
mov eax, edi
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
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
push ecx
push edx
push str.DownloadFileMoreThan4GBbyBitrate_:_File_completely_downloaded_and_requested_for_invalid_byte_range._TotalbytesReaded____llu__n
call fcn.00423ad0
add esp, 0xc
xor edi, edi
jmp 0x46dcf2
push eax
push str.DownloadFileMoreThan4GBbyBitrate_:_Failed_with_the_http_status_code__d__n
call fcn.00423ad0
add esp, 8
jmp 0x46dcf2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.DownloadFileMoreThan4GBbyBitrate_:__Error_in_WinHttpReadData______lu__n
call fcn.00423ad0
push edi
call fcn.00464180
add esp, 0xc
test ebx, ebx
je 0x46dcf8
push ebx
call fcn.0048efd8
add esp, 4
jmp 0x46dcf8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.DownloadFileMoreThan4GBbyBitrate_:__Error_in_WriteFile______lu__n
jmp 0x46dda0