Function at 0x471f00
Capabilities:
Copy file
Delete file
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c98be
mov eax, dword fs:[0]
push eax
sub esp, 0x1ec
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 + 0x10]
mov edx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x28]
mov esi, dword [ebp + 0x2c]
mov dword [ebp - 0x190], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x160], ecx
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x17c], edx
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x184], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x178], ecx
mov ecx, dword [ebp + 0x3c]
mov dword [ebp - 0x180], edx
mov edx, dword [0x513fec]
mov dword [ebp - 0x170], eax
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x168], ecx
xor ebx, ebx
mov ecx, 0x513fec
mov dword [ebp - 0x1a0], edi
mov dword [ebp - 0x19c], esi
mov byte [ebp - 0x14d], bl
call eax
add eax, 0x10
mov dword [ebp - 0x18c], eax
mov dword [ebp - 4], ebx
cmp edi, ebx
jne 0x471fb4
xor eax, eax
jmp 0x471fcf
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x471fc0
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x18c]
call fcn.00402380
push esi
lea ecx, [ebp - 0x148]
call fcn.00401e50
push 0x4dc0b8
push 0x4dc0b4
lea ecx, [ebp - 0x148]
mov byte [ebp - 4], 1
call fcn.00465ae0
mov esi, dword [ebp - 0x18c]
mov dword [ebp - 0x164], ebx
cmp dword [esi - 0xc], ebx
jl 0x472055
push str..xml
push esi
call fcn.0049200f
add esp, 8
cmp eax, ebx
je 0x472031
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x472206
cmp dword [esi - 0xc], ebx
jl 0x472055
push str..json
push esi
call fcn.0049200f
add esp, 8
cmp eax, ebx
je 0x472055
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x472206
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x160]
push ecx
push edx
push str.InternetGetDownloader_:_DesktopCentral_Server__Port_____S_:__d__n
call fcn.00423db0
mov eax, dword [0x513fec]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, 0x513fec
mov dword [ebp - 0x15c], ebx
call edx
add eax, 0x10
mov dword [ebp - 0x14c], eax
mov edx, dword [str.SoftwareAdventNetDesktopCentralDCAgent]
mov byte [ebp - 4], 2
cmp edx, ebx
jne 0x47209d
xor eax, eax
jmp 0x4720ab
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4720a2
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x14c]
call fcn.00401700
push 9
push str.Settings
lea ecx, [ebp - 0x14c]
call fcn.00411c00
mov esi, dword [ebp - 0x14c]
cmp dword [esi - 4], 1
jle 0x4720eb
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp - 0x14c]
call fcn.004014b0
mov esi, dword [ebp - 0x14c]
lea ecx, [ebp - 0x15c]
push ecx
push str.DownloadMode
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00478d80
add esp, 0x10
test eax, eax
jne 0x4721e6
cmp dword [ebp - 0x15c], 1
jne 0x4721e6
cmp dword [ebp + 0x34], 0x2afb
jne 0x4721e6
lea ecx, [ebp - 0xc0]
call fcn.00468c00
mov eax, dword [ebp - 0x148]
cmp dword [eax - 4], 1
mov byte [ebp - 4], 3
jle 0x472157
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x168]
mov edx, dword [ebp + 0x38]
push ecx
mov ecx, dword [ebp - 0x170]
push edx
mov edx, dword [ebp - 0x180]
push 0x2afb
push ecx
mov ecx, dword [ebp - 0x184]
push eax
mov eax, dword [ebp - 0x178]
push edi
push edx
mov edx, dword [ebp - 0x17c]
push eax
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp - 0x160]
push edx
mov edx, dword [ebp - 0x190]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
lea ecx, [ebp - 0xc0]
call fcn.0046ff50
lea ecx, [ebp - 0xc0]
mov esi, eax
mov byte [ebp - 4], 2
call fcn.00468d60
lea ecx, [ebp - 0x14c]
call fcn.00401ed0
lea ecx, [ebp - 0x148]
call fcn.00401ed0
lea ecx, [ebp - 0x18c]
call fcn.00401ed0
mov eax, esi
jmp 0x473222
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x472206
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str._________Inside_InternetGetRequestByBitrate_Method___________n
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x1dc], ebx
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x1d0], ebx
mov dword [ebp - 0x1d4], ebx
mov dword [ebp - 0x174], ebx
mov dword [ebp - 0x1ac], ebx
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x1a4], ebx
mov dword [ebp - 0x1b0], ebx
mov dword [ebp - 0x194], ebx
mov dword [ebp - 0x1cc], ebx
call fcn.00423960
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x160]
push ecx
push edx
push str.InternetGetRequestByBitrate_:_DesktopCentral_Server__Port_____S_:__d__n
call fcn.00423db0
add esp, 0x10
push edi
lea ecx, [ebp - 0x158]
call fcn.00401e50
mov eax, dword [ebp - 0x158]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x188], esp
mov esi, esp
push eax
mov byte [ebp - 4], 4
call fcn.00404fb0
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x188]
add esp, 4
push eax
call fcn.00466100
add esp, 8
push eax
lea ecx, [ebp - 0x158]
mov byte [ebp - 4], 5
call fcn.00404900
mov eax, dword [ebp - 0x188]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4722e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x158]
mov esi, 1
cmp dword [eax - 4], esi
jle 0x47230a
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x158]
call fcn.00402490
mov eax, dword [ebp - 0x158]
push eax
push str.InternetGetRequestByBitrate_:_URL_to_Get_____S__n
call fcn.00423960
mov edx, dword [ebp - 0x168]
or eax, 0xffffffff
add esp, 8
mov dword [ebp - 0x1c8], eax
mov dword [ebp - 0x1c4], eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x1b4], ebx
cmp dword [edx + 0x18], esi
jne 0x472350
push str.sending_get_request_n
call fcn.00423db0
mov dword [ebp - 0x1bc], ebx
jmp 0x472364
push str.sending_head_request_n
call fcn.00423db0
mov dword [ebp - 0x1bc], 2
mov eax, dword [ebp - 0x148]
add esp, 4
mov dword [ebp - 0x1b8], ebx
cmp dword [eax - 4], esi
jle 0x47238d
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp - 0x168]
push ecx
push edx
mov edx, dword [ebp + 0x34]
lea ecx, [ebp - 0x1c8]
push ecx
mov ecx, dword [ebp - 0x170]
push 1
push edx
mov edx, dword [ebp - 0x180]
push ecx
mov ecx, dword [ebp - 0x184]
push eax
mov eax, dword [ebp - 0x178]
push edi
push edx
mov edx, dword [ebp - 0x17c]
push eax
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp - 0x160]
push edx
mov edx, dword [ebp - 0x190]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call fcn.00469e40
mov ecx, dword [ebp - 0x1c8]
mov edx, dword [ebp - 0x1c4]
mov esi, dword [ebp - 0x1c0]
add esp, 0x40
cmp byte [ebp + 0x40], 0
mov edi, eax
mov dword [ebp - 0x188], ecx
mov dword [ebp - 0x1e4], edx
mov dword [ebp - 0x1d8], esi
je 0x472519
push ebx
lea eax, [ebp - 0x15c]
push eax
push ebx
push str.Content_Encoding
push 0xffff
push esi
mov dword [ebp - 0x15c], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ecx, dword [ebp - 0x15c]
lea edx, [ecx*4 + 8]
push edx
push 1
call fcn.00491e51
add esp, 8
push ebx
lea ecx, [ebp - 0x15c]
push ecx
push eax
push str.Content_Encoding
push 0xffff
push esi
mov dword [ebp - 0x1a8], eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x4724b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1e0], eax
cmp eax, 0x2f76
jne 0x472497
push str.InternetGetRequestByBitrate_:_Response_Header_doesnt_contain_content_Encoding.__n
call fcn.00423ad0
jmp 0x4724ff
mov edx, dword [ebp - 0x1e0]
push edx
push str.InternetGetRequestByBitrate_:__Error_in_WinHttpQueryHeaders______d__n
call fcn.00423ad0
mov eax, dword [ebp - 0x1e0]
push eax
call fcn.00464180
add esp, 0xc
jmp 0x472502
mov ecx, dword [ebp - 0x1a8]
push ecx
push str.InternetGetRequestByBitrate_:__Response_Header_Informations_:__S__n
call fcn.00423960
mov edx, dword [ebp - 0x1a8]
push str.gzip
push edx
call fcn.00495a60
add esp, 0x10
test eax, eax
jne 0x4724f5
push str.InternetGetRequestByBitrate_:_Response_Header_contains_content_Encoding_as_gzip__n
call fcn.00423db0
mov byte [ebp - 0x14d], 1
jmp 0x4724ff
push str.InternetGetRequestByBitrate_:_Response_Header_doesnt_contain_content_Encoding_as_gzip__n
call fcn.00423db0
add esp, 4
cmp dword [ebp - 0x1a8], ebx
je 0x472519
mov eax, dword [ebp - 0x1a8]
push eax
call fcn.0048efd8
add esp, 4
cmp edi, ebx
jne 0x472d59
mov edi, dword [ebp - 0x1b4]
cmp edi, 0xc8
jne 0x472648
mov ebx, dword [ebp - 0x168]
cmp dword [ebx + 0x14], 0
je 0x4725a2
lea ecx, [ebp - 0x1b0]
push ecx
push esi
call fcn.00464de0
mov edi, dword [ebp - 0x1b0]
lea edx, [ebp - 0x164]
push edi
push edx
call fcn.00463bf0
add esp, 0x10
lea ecx, [ebx + 0x28]
push eax
mov byte [ebp - 4], 6
call fcn.0040fa30
mov eax, dword [ebp - 0x164]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x472595
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x4725a2
push edi
call fcn.0048efd8
add esp, 4
push 0
lea ecx, [ebp - 0x1e8]
push ecx
lea edx, [ebp - 0x16c]
push edx
push 0
push 0x20000005
push esi
mov dword [ebp - 0x1e8], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call edi
cmp ebx, 1
je 0x47260f
cmp eax, 0x7a
je 0x47260f
call edi
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:__Error_in_Content_Length_Header_____d__n
call fcn.00423ad0
push ebx
call fcn.00464180
add esp, 0xc
cmp edi, 0x216
jne 0x472d59
mov ebx, 1
mov dword [ebp - 0x194], ebx
jmp 0x472628
mov eax, dword [ebp - 0x16c]
push eax
push str.InternetGetRequestByBitrate_:_Content_Length_of_the_request_file:__u_Bytes_n
call fcn.00423db0
add esp, 8
xor edi, edi
lea ebx, [edi + 1]
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
mov ecx, dword [ebp - 0x1c4]
push ecx
call esi
mov edx, dword [ebp - 0x1c8]
push edx
call esi
jmp 0x472724
cmp edi, 0x130
jne 0x47266d
mov eax, dword [0x515dc0]
push eax
push str.InternetGetRequestByBitrate_:_File_not_modified_since_the_time:__S_n
call fcn.00423db0
add esp, 8
mov edi, 0x15f91
jmp 0x472d59
cmp edi, 0x12e
je 0x472690
cmp edi, 0x12d
je 0x472690
push edi
push str.InternetGetRequestByBitrate_:_Failed_with_the_http_status_code:__d__n
call fcn.00423ad0
add esp, 8
jmp 0x472d59
lea ecx, [ebp - 0x164]
push ecx
push esi
call fcn.00464f10
mov ebx, dword [ebp - 0x164]
lea edx, [ebp - 0x164]
push ebx
push edx
call fcn.00463bf0
add esp, 0x10
mov esi, dword [ebp - 0x168]
push eax
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 7
call fcn.0040fa30
mov eax, dword [ebp - 0x164]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4726ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0x24]
cmp dword [eax - 4], 1
jle 0x472701
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [esi + 0x24]
call fcn.004014b0
mov esi, dword [esi + 0x24]
push esi
push str.Redirection_url_is__s_n
call fcn.00423db0
add esp, 8
test ebx, ebx
je 0x47271f
push ebx
call fcn.0048efd8
add esp, 4
mov ebx, 1
mov eax, dword [ebp + 0x34]
cmp eax, 0x2afb
jne 0x4727fe
mov eax, dword [ebp - 0x148]
cmp dword [eax - 4], ebx
jle 0x472752
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
push ebx
push eax
call fcn.0045c500
add esp, 8
test eax, eax
je 0x47278e
mov eax, dword [ebp - 0x148]
cmp dword [eax - 4], ebx
jle 0x472780
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
push eax
push str.InternetGetRequestByBitrate_:_Failed_to_create_the_destination_directory_for_the_destination_file__S__n
call fcn.00423ad0
add esp, 8
mov eax, dword [ebp - 0x19c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x472797
sub eax, edx
sar eax, 1
lea ecx, [eax*4 + 0x1e]
push ecx
push ebx
call fcn.00491e51
add esp, 8
mov dword [ebp - 0x154], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
mov eax, dword [ebp - 0x148]
cmp dword [eax - 4], ebx
jle 0x4727e5
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
push esi
push eax
mov eax, dword [ebp - 0x154]
push str._s_d.tmp
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
jmp 0x472829
cmp eax, 0x2af9
jne 0x472829
call fcn.004651c0
lea ecx, [ebp - 0x154]
mov esi, eax
push ecx
push esi
call fcn.004627d0
add esp, 8
test esi, esi
je 0x472829
push esi
call fcn.0048efd8
add esp, 4
mov eax, dword [ebp - 0x154]
xor esi, esi
push esi
push 0x80
push 2
lea edx, [ebp - 0x1f4]
push edx
push 1
push 2
push eax
mov dword [ebp - 0x1f4], 0xc
mov dword [ebp - 0x1f0], esi
mov dword [ebp - 0x1ec], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x164], ebx
cmp ebx, esi
jne 0x47288e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.InternetGetRequestByBitrate:_Error_occured_while_creating_the_file______d__n
call fcn.00423ad0
push edi
call fcn.00464180
add esp, 0xc
jmp 0x472d59
mov esi, dword [0x513cd0]
imul esi, esi, 0x1f4
push esi
push str.InternetGetRequestByBitrate:_Block_of_bytes_to_read:__u_n
mov dword [ebp - 0x1b0], esi
call fcn.00423960
add esp, 8
cmp dword [ebp - 0x194], 1
jne 0x472925
mov ecx, dword [ebp - 0x168]
mov eax, dword [ebp + 0x38]
push ecx
mov ecx, dword [ebp + 0x34]
lea edx, [ebp - 0x1c8]
push edx
mov edx, dword [ebp - 0x170]
push eax
mov eax, dword [ebp - 0x19c]
push ecx
mov ecx, dword [ebp - 0x1a0]
push edx
mov edx, dword [ebp - 0x180]
push eax
mov eax, dword [ebp - 0x178]
push ecx
mov ecx, dword [ebp - 0x184]
push edx
mov edx, dword [ebp - 0x17c]
push eax
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp - 0x160]
push edx
mov edx, dword [ebp - 0x190]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
push ebx
push esi
call fcn.0046d810
add esp, 0x44
mov edi, eax
jmp 0x472d45
cmp dword [ebp - 0x16c], 0
jbe 0x472d31
lea ecx, [ebp - 0x20]
push ecx
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 - 0x198], dx
movzx edx, word [ebp - 0x12]
mov word [ebp - 0x196], ax
mov eax, dword [ebp - 0x1d0]
mov word [ebp - 0x194], cx
mov word [ebp - 0x192], dx
test eax, eax
je 0x472978
mov dword [ebp - 0x1d4], eax
mov ecx, dword [ebp - 0x1b0]
lea edi, [ecx + eax - 1]
mov eax, dword [ebp - 0x16c]
cmp edi, eax
jbe 0x47298f
lea edi, [eax - 1]
push 0x190
mov ebx, 1
push ebx
call fcn.00491e51
mov edx, dword [ebp - 0x1d4]
push edi
push edx
mov esi, eax
push str.Range:_bytes_lu__lu
push esi
call fcn.00463e60
push esi
push str.InternetGetRequestByBitrate:_Content_Range_Header_message:__S_n
call fcn.00423960
or eax, 0xffffffff
mov dword [ebp - 0x1c8], eax
mov dword [ebp - 0x1c4], eax
mov dword [ebp - 0x1c0], eax
mov eax, dword [ebp - 0x148]
add esp, 0x20
mov dword [ebp - 0x1b4], 0
mov dword [ebp - 0x1bc], ebx
mov dword [ebp - 0x1b8], esi
cmp dword [eax - 4], ebx
jle 0x472a0d
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp - 0x168]
push ecx
push edx
mov edx, dword [ebp + 0x34]
lea ecx, [ebp - 0x1c8]
push ecx
mov ecx, dword [ebp - 0x170]
push 1
push edx
mov edx, dword [ebp - 0x1a0]
push ecx
mov ecx, dword [ebp - 0x178]
push eax
mov eax, dword [ebp - 0x180]
push edx
mov edx, dword [ebp - 0x184]
push eax
mov eax, dword [ebp - 0x17c]
push ecx
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp - 0x160]
push eax
mov eax, dword [ebp - 0x190]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call fcn.00469e40
mov edi, eax
push edi
push str.InternetGetRequestByBitrate:_GetInternetRequestHandle_function_return_code:__lu_n
call fcn.00423960
mov edx, dword [ebp - 0x1c8]
mov eax, dword [ebp - 0x1c4]
mov ebx, dword [ebp - 0x1c0]
add esp, 0x48
mov dword [ebp - 0x188], edx
mov dword [ebp - 0x1e4], eax
mov dword [ebp - 0x1d8], ebx
test esi, esi
je 0x472aac
push esi
call fcn.0048efd8
add esp, 4
cmp edi, 0x2ee2
je 0x472d59
mov esi, dword [ebp - 0x1b4]
cmp esi, 0xc8
je 0x472ad2
cmp esi, 0xce
jne 0x472ea8
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x174]
push ecx
push ebx
mov dword [ebp - 0x174], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x472b46
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:_Error_occured_in_WinHttpQueryDataAvailable______ld__n
call fcn.00423ad0
push edi
call fcn.00464180
add esp, 0xc
cmp edi, 0x2ee2
jne 0x472b50
push ebx
call esi
mov edx, dword [ebp - 0x1c4]
push edx
call esi
mov eax, dword [ebp - 0x1c8]
push eax
call esi
cmp dword [ebp - 0x1a4], 0
jne 0x472d45
mov dword [ebp - 0x1a4], 1
jmp 0x472b50
mov dword [ebp - 0x1a4], 0
mov ecx, dword [ebp - 0x174]
push ecx
push str.InternetGetRequestByBitrate:_Bytes_Available_to_read_now:__lu_n
call fcn.00423960
add esp, 8
cmp dword [ebp - 0x174], 0
je 0x472c3b
mov edx, dword [ebp - 0x174]
inc edx
push edx
push 1
call fcn.00491e51
mov edx, dword [ebp - 0x174]
add esp, 8
lea ecx, [ebp - 0x1ac]
push ecx
push edx
push eax
push ebx
mov dword [ebp - 0x15c], eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x472eba
mov eax, dword [ebp - 0x1ac]
add dword [ebp - 0x14c], eax
test eax, eax
je 0x472be3
mov edx, dword [ebp - 0x15c]
push 0
lea ecx, [ebp - 0x1f8]
push ecx
push eax
mov eax, dword [ebp - 0x164]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x472edb
mov eax, dword [ebp - 0x1ac]
cmp dword [ebp - 0x15c], 0
je 0x472c01
mov ecx, dword [ebp - 0x15c]
push ecx
call fcn.0048efd8
mov eax, dword [ebp - 0x1ac]
add esp, 4
mov ecx, dword [ebp - 0x16c]
mov edx, dword [ebp - 0x14c]
cmp edx, ecx
je 0x472c1d
ja 0x472c29
test eax, eax
jne 0x472ad8
jmp 0x472c3b
push str.ResumeGetRequestEx_:_Bytes_read_reached_the_contenlength_n
call fcn.00423db0
jmp 0x472c38
push str.InternetGetRequestEx_:_File_downloading_more_than_the_content_length._File_download_deleted_and_download_failed.__n
call fcn.00423ad0
mov edi, 0xd
add esp, 4
mov eax, dword [ebp - 0x14c]
push eax
push str.InternetGetRequestByBitrate:_Bytes_Read:__lu_n
mov dword [ebp - 0x1d0], eax
call fcn.00423960
add esp, 8
cmp dword [ebp - 0x1a4], 1
jne 0x472c71
push edi
push str.InternetGetRequestByBitrate_:_second_attempt_of_the_previous_request_n
call fcn.00423db0
add esp, 8
jmp 0x472d1f
push ebx
xor edi, edi
call esi
mov edx, dword [ebp - 0x1c4]
push edx
call esi
mov eax, dword [ebp - 0x1c8]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea ecx, [ebp - 0x20]
push ecx
call esi
mov eax, dword [ebp - 0x198]
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [ebp - 0x196]
lea ecx, [eax + edx*4]
movzx eax, cx
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [ebp - 0x194]
lea ecx, [eax + edx*4]
movzx edx, word [ebp - 0x192]
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 0x472d11
mov ecx, 0x258
sub ecx, eax
push ecx
jmp 0x472d13
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
call esi
mov ecx, dword [ebp - 0x14c]
cmp ecx, dword [ebp - 0x16c]
jb 0x472932
mov edx, dword [ebp - 0x14c]
push edx
push str.InternetGetRequestByBitrate:_Total_bytes_read___lu_n
call fcn.00423db0
add esp, 8
mov esi, dword [ebp - 0x164]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1d8]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x472d6c
push eax
call esi
mov eax, dword [ebp - 0x1e4]
test eax, eax
je 0x472d79
push eax
call esi
mov eax, dword [ebp - 0x188]
test eax, eax
je 0x472d86
push eax
call esi
test edi, edi
jne 0x4730dd
cmp byte [ebp + 0x40], 1
jne 0x472e6e
cmp byte [ebp - 0x14d], 1
jne 0x472e6e
mov esi, dword [ebp - 0x160]
push esi
push str.InternetGetRequestByBitrate_:_Successfully_downloaded_the_Gzip_compressed_file_from_the_server__S__n
call fcn.00423db0
push str.InternetGetRequestByBitrate_:_Need_to_decompress_the_file_n
call fcn.00423960
mov ecx, dword [ebp - 0x154]
add esp, 0xc
push 3
lea eax, [ebp - 0xa0]
push ecx
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0xa4], eax
call fcn.004622b0
mov eax, dword [ebp - 0x154]
push 3
lea edx, [ebp - 0x140]
push eax
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 8
mov dword [ebp - 0x144], edx
call fcn.004622b0
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x144]
push ecx
push edx
mov byte [ebp - 4], 9
call fcn.00466660
mov bl, al
mov eax, dword [ebp - 0x144]
lea ecx, [ebp - 0x140]
add esp, 8
cmp eax, ecx
je 0x472e3c
push eax
call fcn.0048efd8
add esp, 4
mov eax, dword [ebp - 0xa4]
lea edx, [ebp - 0xa0]
mov byte [ebp - 4], 4
cmp eax, edx
je 0x472e59
push eax
call fcn.0048efd8
add esp, 4
test bl, bl
je 0x472efc
push str.InternetGetRequestByBitrate_:_File_Decompressed_successfully._n
call fcn.00423db0
add esp, 4
cmp dword [ebp + 0x34], 0x2af9
jne 0x473034
mov esi, dword [ebp - 0x170]
push esi
call fcn.004655c0
add esp, 4
cmp eax, 1
jne 0x47301d
mov eax, dword [esi]
push eax
push str.Data_in_memory_:__s_n
call fcn.00423960
add esp, 8
jmp 0x4730dd
push esi
push str.InternetGetRequestByBitrate_:_Failed_with_the_http_status_code__lu__n
call fcn.00423ad0
mov edi, esi
jmp 0x472d42
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:__Error_in_WinHttpReadData______ld__n
call fcn.00423ad0
push edi
call fcn.00464180
add esp, 0xc
jmp 0x472d45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:__Error_in_WriteFile______ld__n
call fcn.00423ad0
push edi
call fcn.00464180
add esp, 0xc
jmp 0x472d45
mov ebx, 1
push str.InternetGetRequestByBitrate_:_File_Decompression_failure._So_need_to_download_the_original_file._n
mov dword [ebp - 0x1cc], ebx
call fcn.00423ad0
mov eax, dword [0x515dc0]
add esp, 4
test eax, eax
je 0x472f30
push eax
call fcn.0048efd8
add esp, 4
mov dword [0x515dc0], 0
mov eax, dword [ebp - 0x148]
cmp dword [eax - 4], ebx
jle 0x472f50
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x168]
mov edx, dword [ebp + 0x38]
push 0
push ecx
mov ecx, dword [ebp + 0x34]
push edx
mov edx, dword [ebp - 0x170]
push ecx
mov ecx, dword [ebp - 0x180]
push edx
mov edx, dword [ebp - 0x178]
push eax
mov eax, dword [ebp - 0x1a0]
push eax
mov eax, dword [ebp - 0x184]
push ecx
mov ecx, dword [ebp - 0x17c]
push edx
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp - 0x190]
push ecx
mov ecx, dword [ebp + 8]
push edx
push esi
push eax
push ecx
call fcn.00471f00
mov dword [ebp - 0x1dc], eax
mov eax, dword [ebp - 0x19c]
add esp, 0x3c
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x472fb3
sub eax, ecx
sar eax, 1
add eax, 0x41
push eax
push ebx
call fcn.00491e51
mov esi, eax
mov eax, dword [ebp - 0x148]
add esp, 8
cmp dword [eax - 4], ebx
jle 0x472ff1
mov edx, dword [eax - 0xc]
push edx
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
push eax
push str._tGzip_file_Decompression_failed_for_the_file__S_n
push esi
call fcn.00492848
push esi
call fcn.0045ddc0
add esp, 0x10
test esi, esi
je 0x473013
push esi
call fcn.0048efd8
add esp, 4
call fcn.00467fc0
jmp 0x4730dd
push str.InternetGetRequestByBitrate:_could_nt_read_the_data_from_.tmp_file__n
call fcn.00423ad0
add esp, 4
mov edi, 6
jmp 0x4730dd
mov eax, dword [ebp - 0x148]
mov ebx, 1
cmp dword [eax - 4], ebx
jle 0x473059
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
mov edx, dword [ebp - 0x154]
push 0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, ebx
je 0x473085
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.InternetGetRequestByBitrate_:_could_nt_copy_from_.tmp_file__errorcode______d__n
call fcn.00423ad0
add esp, 8
jmp 0x4730dd
mov eax, dword [ebp - 0x148]
cmp dword [eax - 4], ebx
jle 0x4730a5
mov eax, dword [eax - 0xc]
push eax
lea ecx, [ebp - 0x148]
call fcn.00402490
mov eax, dword [ebp - 0x148]
mov esi, eax
mov eax, dword [ebp - 0x158]
cmp dword [eax - 4], ebx
jle 0x4730c7
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x158]
call fcn.00402490
mov eax, dword [ebp - 0x158]
mov edx, dword [ebp - 0x160]
push esi
push edx
push eax
push str.InternetGetRequestByBitrate_:_Successfully_downloaded_the_file__S_from_the_server__S_n
call fcn.00423db0
add esp, 0x10
mov eax, dword [ebp - 0x16c]
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ebp - 0x1a0]
push edi
push eax
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp - 0x160]
push edx
push eax
push ecx
call fcn.00468750
mov edx, dword [ebp - 0x154]
add esp, 0x18
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x154]
test eax, eax
je 0x473130
push eax
call fcn.0048efd8
add esp, 4
mov dword [ebp - 0x154], 0
push str._________End_Of_InternetGetRequestByBitrate_Method___________n
call fcn.00423960
mov eax, dword [ebp - 0x158]
add eax, 0xfffffff0
add esp, 4
mov byte [ebp - 4], 1
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
cmp dword [ebp - 0x1cc], 0
je 0x4731c3
test edx, edx
jg 0x47316c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x148]
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 0x473192
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4731bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1dc]
jmp 0x473222
test edx, edx
jg 0x4731d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x148]
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 0x4731f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x473220
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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