Function at 0x4587e0
Capabilities:
Connect to http server
Create http request
Get http content length
Make an http request with a cookie
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4891d4
mov eax, dword fs:[0]
push eax
mov eax, 0x518c
call fcn.00482150
mov eax, dword [0x4b0014]
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, edx
mov dword [ebp - 0x517c], eax
mov esi, ecx
mov dword [ebp - 0x5170], esi
mov dword [ebp - 0x5074], esi
mov dword [ebp - 0x5198], 0
push dword [eax + 4]
push dword [eax]
push str.Tools::Download
push str._s_url__s___output_file___s_
push 1
push 6
call fcn.004569b0
add esp, 0x18
push 0x4963d4
lea ecx, [ebp - 0x5178]
mov dword [ebp - 4], 0
call fcn.0042c3c0
mov byte [ebp - 0x5174], 0
push 0
push 0
push 0
push 0
push str.WinClient
mov dword [ebp - 4], 1
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x518c], eax
test eax, eax
jne 0x458963
push str.Tools::Download
push str._s_internet_open_failed_
push 2
push 6
call fcn.004569b0
add esp, 0x10
lea ecx, [ebp - 0x5028]
push str.openInternetError
call fcn.0042c3c0
lea ecx, [ebp - 0x516c]
mov byte [ebp - 4], 2
call fcn.0045aa20
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x5028]
call fcn.004431c0
mov byte [ebp - 4], 2
or ebx, 0xffffffff
mov edx, dword [ebp - 0x516c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4588fd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x5028]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x45891e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x5178]
lea ecx, [ecx - 0x10]
call fcn.0042d8d0
add eax, 0x10
mov dword [esi], eax
mov al, byte [ebp - 0x5174]
mov byte [esi + 4], al
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x5178]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x45895c
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
jmp 0x45935f
call fcn.0040f7b0
mov ecx, eax
test ecx, ecx
jne 0x458978
push 0x80004005
call fcn.0041ffd0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x5048], ebx
mov byte [ebp - 4], 4
call fcn.0040f7b0
mov ecx, eax
test ecx, ecx
jne 0x45899f
push 0x80004005
call fcn.0041ffd0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x5044], esi
mov byte [ebp - 4], 5
call fcn.0040f7b0
mov ecx, eax
test ecx, ecx
jne 0x4589c6
push 0x80004005
call fcn.0041ffd0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x5040], edi
push 0x38
lea eax, [ebp - 0x5160]
mov byte [ebp - 4], 6
push 0
push eax
call fcn.00461b50
push 0x1000
mov dword [ebp - 0x5164], 0x3c
call fcn.0045d2c8
push 0x1000
mov dword [ebp - 0x5154], eax
mov dword [ebp - 0x5150], 0x800
call fcn.0045d2c8
add esp, 0x14
push 0
push 0
push 3
push 0
push 0
push 0
push esi
push dword [ebp - 0x518c]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x5188], eax
test eax, eax
jne 0x458b5b
push str.Tools::Download
push str._s_internet_connect_failed_
push 2
push 6
call fcn.004569b0
add esp, 0xc
mov ecx, esp
mov dword [ebp - 0x5168], esp
push 0x4988e4
call fcn.0042c3c0
mov eax, dword [ebp - 0x517c]
lea ecx, [ebp - 0x516c]
push eax
mov edx, str.internet_connect_failed_
mov byte [ebp - 4], 0xa
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0xb
mov ecx, eax
mov byte [ebp - 4], 0xc
call fcn.004433c0
mov byte [ebp - 4], 6
add esp, 4
mov edx, dword [ebp - 0x516c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x458aba
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x5178]
lea ecx, [ecx - 0x10]
call fcn.0042d8d0
mov ecx, dword [ebp - 0x5170]
add eax, 0x10
mov dword [ecx], eax
mov al, byte [ebp - 0x5174]
mov byte [ecx + 4], al
lea edx, [edi - 0x10]
mov byte [ebp - 4], 5
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x458afa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov byte [ebp - 4], 4
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x458b15
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov byte [ebp - 4], 1
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x458b30
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x5178]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x459359
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x459359
mov eax, dword [ebp - 0x517c]
push ecx
mov dword [ebp - 0x516c], esp
mov byte [ebp - 0x5021], 0
mov ecx, dword [eax]
sub ecx, 0x10
mov dword [ebp - 0x5038], 0x50
call fcn.0042d8d0
mov ecx, esp
lea edx, [ebp - 0x5038]
add eax, 0x10
mov dword [ecx], eax
lea ecx, [ebp - 0x5021]
call fcn.0045a4b0
add esp, 4
mov dword [ebp - 0x5034], 0
lea ecx, [ebp - 0x5034]
push 0x49ef00
call fcn.0042c3c0
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x5030]
push 0x49eef8
mov dword [ebp - 0x5030], 0
call fcn.0042c3c0
mov byte [ebp - 4], 0xe
xor ecx, ecx
mov eax, dword [ebp - 0x5030]
mov edx, 0x8040c200
mov dword [ebp - 0x5028], edx
cmp dword [eax - 0xc], ecx
mov dword [ebp - 0x501c], ecx
cmove eax, ecx
mov ecx, dword [ebp - 0x517c]
mov dword [ebp - 0x5020], eax
lea eax, [ecx + 0xc]
mov dword [ebp - 0x5038], eax
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
je 0x458c43
push ecx
mov ecx, dword [ebp - 0x5038]
push str.Cookie:
call fcn.0042bf30
mov ecx, 0x8048c200
cmp eax, 0xffffffff
mov edx, 0x8040c200
cmovne edx, ecx
mov ecx, dword [ebp - 0x517c]
mov dword [ebp - 0x5028], edx
cmp byte [ebp - 0x5021], 0
je 0x458c58
or edx, 0x803000
mov dword [ebp - 0x5028], edx
mov eax, dword [ecx + 0x10]
cmp dword [eax - 0xc], 0
je 0x458c7e
push eax
push str.Tools::Download
push str._s_Opening_HTTP_request_with__referer___s_
push 0
push 6
call fcn.004569b0
mov ecx, dword [ebp - 0x517c]
add esp, 0x14
mov eax, dword [ecx + 0x10]
xor ecx, ecx
push 1
push dword [ebp - 0x5028]
cmp dword [eax - 0xc], ecx
cmove eax, ecx
lea ecx, [ebp - 0x5020]
push ecx
push eax
push 0
push edi
push dword [ebp - 0x5034]
push dword [ebp - 0x5188]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ecx, eax
mov dword [ebp - 0x5180], ecx
test ecx, ecx
jne 0x458dc0
push str.Tools::Download
push str._s_open_request_failed_
push 2
push 6
call fcn.004569b0
add esp, 0x10
push dword [ebp - 0x5188]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x518c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
mov ecx, esp
mov dword [ebp - 0x5168], esp
push 0x4988e4
call fcn.0042c3c0
mov eax, dword [ebp - 0x517c]
lea ecx, [ebp - 0x516c]
push eax
mov edx, str.open_request_failed_
mov byte [ebp - 4], 0xf
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0x10
mov ecx, eax
mov byte [ebp - 4], 0x11
call fcn.004433c0
mov byte [ebp - 4], 0xe
add esp, 4
mov edx, dword [ebp - 0x516c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x458d51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x5178]
lea ecx, [ecx - 0x10]
call fcn.0042d8d0
mov ecx, dword [ebp - 0x5170]
add eax, 0x10
mov dword [ecx], eax
mov al, byte [ebp - 0x5174]
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x5030]
mov byte [ecx + 4], al
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x458d95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
or eax, 0xffffffff
mov edx, dword [ebp - 0x5034]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x458adc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x458adc
mov esi, dword [ebp - 0x5038]
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x458deb
push eax
push str.Tools::Download
push str._s_Additional_headers___s_
push 0
push 6
call fcn.004569b0
mov ecx, dword [ebp - 0x5180]
add esp, 0x14
mov ebx, dword [ebp - 0x517c]
movsd xmm0, qword [0x49fd68]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
movsd qword [ebp - 0x5194], xmm0
cmp dword [ebx + 0x18], 0
mov dword [ebp - 0x516c], 0
jle 0x458ecf
push 4
lea eax, [ebp - 0x5028]
mov dword [ebp - 0x5028], 0x7530
push eax
push 6
push ecx
call edi
test eax, eax
je 0x458e4b
push dword [ebp - 0x5028]
push str.Tools::Download
push str._s_Set_HttpRequest_InternetSetOption_Rec___d_
push 0
jmp 0x458e5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Tools::Download
push str._s_HttpRequest_InternetSetOption_Rec_error___d_
push 2
push 6
call fcn.004569b0
add esp, 0x14
lea eax, [ebp - 0x5028]
push 4
push eax
push 5
push dword [ebp - 0x5180]
call edi
test eax, eax
je 0x458e93
push dword [ebp - 0x5028]
push str.Tools::Download
push str._s_Set_HttpRequest_InternetSetOption_Send___d_
push 0
jmp 0x458ea6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Tools::Download
push str._s_HttpRequest_InternetSetOption_Send_error___d_
push 2
push 6
call fcn.004569b0
mov eax, dword [ebx + 0x14]
add esp, 0x14
test eax, eax
jle 0x458ecf
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm0, qword [0x49fd88]
movsd qword [ebp - 0x5194], xmm0
lea eax, [ebp - 0x5078]
mov dword [ebp - 0x506c], 0
push eax
lea eax, [ebp - 0x506c]
mov dword [ebp - 0x5078], 4
push eax
push 0x1f
push dword [ebp - 0x5180]
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
push 4
lea eax, [ebp - 0x506c]
push eax
push 0x1f
push dword [ebp - 0x5180]
call edi
mov ecx, dword [esi]
cmp dword [ecx - 0xc], 0
jne 0x458f30
push 0
lea ecx, [ebp - 0x5168]
call fcn.0042c3c0
mov edx, eax
mov ecx, 2
jmp 0x458f4c
add ecx, 0xfffffff0
call fcn.0042d8d0
add eax, 0x10
lea edx, [ebp - 0x5038]
mov dword [ebp - 0x5038], eax
mov ecx, 4
mov eax, dword [esi]
mov edi, dword [ebp - 0x5180]
push 0
push 0
push dword [eax - 0xc]
mov dword [ebp - 0x5028], ecx
push dword [edx]
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov esi, eax
mov eax, dword [ebp - 0x5028]
test al, 4
je 0x458f90
and eax, 0xfffffffb
lea ecx, [ebp - 0x5038]
mov dword [ebp - 0x5028], eax
call fcn.0042ba00
mov eax, dword [ebp - 0x5028]
mov dword [ebp - 4], 0xe
test al, 2
je 0x458fa6
lea ecx, [ebp - 0x5168]
call fcn.0042ba00
test esi, esi
jne 0x458ff0
push str.Tools::Download
push str._s_send_request_failed_
push 2
push 6
call fcn.004569b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x10
push edi
call esi
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
mov ecx, dword [ebp - 0x5170]
lea eax, [ebp - 0x5178]
push eax
call fcn.00459a00
jmp 0x459317
cmp byte [ebx + 0x1c], 0
je 0x459002
push str.Tools::Download
push str._s_No_response_is_needed_so_we_can_exit
jmp 0x458fb4
push 0x2801
lea eax, [ebp - 0x2814]
push 0
push eax
call fcn.00461b50
add esp, 0xc
mov dword [ebp - 0x5074], 0x2800
lea eax, [ebp - 0x5074]
push 0
push eax
lea eax, [ebp - 0x2814]
push eax
push 0x13
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4590d5
push str.Tools::Download
push str._s_query_info_status_failed_
push 2
push 6
call fcn.004569b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x10
push edi
call esi
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
push ecx
mov ecx, esp
mov dword [ebp - 0x516c], esp
push 0x4988e4
call fcn.0042c3c0
push ebx
mov edx, str.query_info_status_failed_
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x5168]
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0x14
mov ecx, eax
mov byte [ebp - 4], 0x15
call fcn.004433c0
add esp, 4
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x5168]
call fcn.0042ba00
mov ecx, dword [ebp - 0x5170]
lea eax, [ebp - 0x5178]
push eax
call fcn.00459a00
jmp 0x459317
lea eax, [ebp - 0x2814]
mov dword [ebp - 0x503c], 0
push eax
lea ecx, [ebp - 0x503c]
call fcn.0042c3c0
mov byte [ebp - 4], 0x16
push dword [ebp - 0x503c]
push str.Tools::Download
push str._s_query_status___s_
push 1
push 6
call fcn.004569b0
add esp, 0x14
lea ecx, [ebp - 0x5068]
call fcn.0045a5a0
lea ecx, [ebp - 0x5068]
mov byte [ebp - 4], 0x17
xor ebx, ebx
call fcn.0044d8d0
test eax, eax
jle 0x4592c0
cmp byte [ebp - 0x5060], 0
jne 0x459148
mov esi, 0x4b45d0
jmp 0x4591de
mov ecx, dword [ebp - 0x5068]
lea eax, [ebp - 0x502c]
push eax
lea eax, [ebp - 0x5168]
xorps xmm0, xmm0
movq qword [ebp - 0x502c], xmm0
push eax
mov dword [ebp - 0x502c], 0
mov dword [ebp - 0x5028], ebx
call fcn.0044e090
mov ecx, dword [ebp - 0x5068]
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x4591b3
mov byte [ebp - 4], 0x18
mov esi, dword [ebp - 0x502c]
test esi, esi
je 0x4591ac
cmp dword [ebp - 0x5028], 1
jne 0x4591ac
call fcn.0044cef0
push esi
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, 0x4b45d0
jmp 0x4591da
lea esi, [eax + 0x18]
mov byte [ebp - 4], 0x19
mov edi, dword [ebp - 0x502c]
test edi, edi
je 0x4591da
cmp dword [ebp - 0x5028], 1
jne 0x4591da
call fcn.0044cef0
push edi
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 8]
mov byte [ebp - 4], 0x17
cmp byte [esi + 8], 4
jne 0x4592a6
cmp byte [ebp - 0x5060], 0
jne 0x4591fb
mov esi, 0x4b45d0
jmp 0x459291
mov ecx, dword [ebp - 0x5068]
lea eax, [ebp - 0x502c]
push eax
lea eax, [ebp - 0x5038]
xorps xmm0, xmm0
movq qword [ebp - 0x502c], xmm0
push eax
mov dword [ebp - 0x502c], 0
mov dword [ebp - 0x5028], ebx
call fcn.0044e090
mov ecx, dword [ebp - 0x5068]
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x459266
mov byte [ebp - 4], 0x1a
mov esi, dword [ebp - 0x502c]
test esi, esi
je 0x45925f
cmp dword [ebp - 0x5028], 1
jne 0x45925f
call fcn.0044cef0
push esi
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, 0x4b45d0
jmp 0x45928d
lea esi, [eax + 0x18]
mov byte [ebp - 4], 0x1b
mov edi, dword [ebp - 0x502c]
test edi, edi
je 0x45928d
cmp dword [ebp - 0x5028], 1
jne 0x45928d
call fcn.0044cef0
push edi
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 8]
mov byte [ebp - 4], 0x17
mov edx, dword [esi]
lea ecx, [ebp - 0x503c]
call fcn.0042ba50
test al, al
jne 0x45937b
lea ecx, [ebp - 0x5068]
inc ebx
call fcn.0044d8d0
cmp ebx, eax
jl 0x459135
mov edi, dword [ebp - 0x5180]
push str.Tools::Download
push str._s_query_status_not_good_
push 2
push 6
call fcn.004569b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x10
push edi
call esi
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
mov ecx, dword [ebp - 0x5170]
lea eax, [ebp - 0x5178]
push eax
call fcn.00459a00
lea ecx, [ebp - 0x5068]
call fcn.0044d350
lea ecx, [ebp - 0x503c]
call fcn.0042ba00
lea ecx, [ebp - 0x5030]
call fcn.0042ba00
lea ecx, [ebp - 0x5034]
call fcn.0042ba00
lea ecx, [ebp - 0x5040]
call fcn.0042ba00
lea ecx, [ebp - 0x5044]
call fcn.0042ba00
lea ecx, [ebp - 0x5048]
call fcn.0042ba00
lea ecx, [ebp - 0x5178]
call fcn.0042a060
mov eax, dword [ebp - 0x5170]
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.0045d27f
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov dword [ebp - 0x504c], 0
movq qword [ebp - 0x5054], xmm0
mov dword [ebp - 0x5054], 0
mov dword [ebp - 0x5050], 0
mov dword [ebp - 0x504c], 0
xor ebx, ebx
mov byte [ebp - 4], 0x1c
push 0x2801
lea eax, [ebp - 0x5018]
mov dword [ebp - 0x5058], 0
push ebx
push eax
mov dword [ebp - 0x5038], ebx
call fcn.00461b50
add esp, 0xc
mov dword [ebp - 0x5070], 0x2800
lea eax, [ebp - 0x5070]
push ebx
push eax
lea eax, [ebp - 0x5018]
push eax
push 0x20000005
push dword [ebp - 0x5180]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x459460
mov edx, dword [ebp - 0x5070]
test edx, edx
jle 0x459437
lea ecx, [edx*8 - 8]
lea esi, [ebp - 0x5018]
nop
movzx eax, byte [esi + edx - 1]
dec edx
shl eax, cl
sub ecx, 8
or ebx, eax
test edx, edx
jg 0x459420
mov dword [ebp - 0x5038], ebx
movd xmm0, ebx
mov eax, ebx
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x49fdb0]
mulsd xmm0, qword [ebp - 0x5194]
call fcn.00482561
mov dword [ebp - 0x516c], eax
mov edi, 1
xor esi, esi
mov dword [ebp - 0x5028], edi
nop dword [eax]
mov ebx, dword [ebp - 0x5050]
lea ecx, [ebp - 0x5054]
sub ebx, dword [ebp - 0x5054]
lea eax, [ebx + 0x2800]
push eax
call fcn.0042b080
mov ecx, dword [ebp - 0x5054]
lea eax, [ebp - 0x5058]
push eax
imul eax, edi, 0x2800
add ecx, ebx
mov dword [ebp - 0x5058], 0
push eax
push ecx
push dword [ebp - 0x5180]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4594e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x459623
cmp edi, 0xa
jg 0x459623
inc edi
mov dword [ebp - 0x5058], 0xffffffff
jmp 0x459470
mov eax, dword [ebp - 0x5058]
lea ecx, [ebp - 0x5054]
add eax, ebx
mov edi, 1
push eax
call fcn.0042b080
mov eax, dword [ebp - 0x517c]
cmp dword [eax + 0x18], 0
jle 0x459554
add esi, dword [ebp - 0x5058]
cmp esi, dword [ebp - 0x516c]
jb 0x459554
push esi
push ecx
mov esi, esp
mov dword [ebp - 0x5168], esi
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.0042d8d0
mov ecx, dword [ebp - 0x517c]
add eax, 0x10
mov dword [esi], eax
mov eax, dword [ecx + 0x14]
imul eax, dword [ebp - 0x5028]
push eax
push dword [ecx + 0x18]
mov eax, dword [ecx + 0x20]
call eax
add esp, 0x10
xor esi, esi
inc dword [ebp - 0x5028]
mov eax, dword [ebp - 0x5058]
lea ecx, [ebp - 0x5054]
add eax, ebx
push eax
call fcn.0042b080
mov ebx, dword [ebp - 0x517c]
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
je 0x459587
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4596ca
cmp dword [ebp - 0x5058], 0
jne 0x459470
mov esi, dword [ebp - 0x5050]
mov eax, esi
mov edi, dword [ebp - 0x5054]
sub eax, edi
mov ecx, dword [ebp - 0x5038]
mov dword [ebp - 0x516c], eax
cmp ecx, eax
jbe 0x459736
push ecx
push eax
push str.Tools::Download
push str._s_resp_buffer_size__d__not_correct___d__
push 2
push 6
call fcn.004569b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x18
push dword [ebp - 0x5180]
call esi
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
push ecx
mov ecx, esp
mov dword [ebp - 0x516c], esp
push 0x4988e4
call fcn.0042c3c0
push ebx
mov edx, str.resp_buffer_size_not_correct_
mov byte [ebp - 4], 0x23
lea ecx, [ebp - 0x5168]
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0x24
mov byte [ebp - 4], 0x25
jmp 0x45968f
push dword [ebp - 0x5180]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
push str.Tools::Download
push str._s_internet_read_file_failed_
push 2
push 6
call fcn.004569b0
add esp, 0xc
mov ecx, esp
mov dword [ebp - 0x516c], esp
push 0x4988e4
call fcn.0042c3c0
mov eax, dword [ebp - 0x517c]
lea ecx, [ebp - 0x5168]
push eax
mov edx, str.internet_read_file_failed_
mov byte [ebp - 4], 0x1d
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0x1e
mov byte [ebp - 4], 0x1f
mov ecx, eax
call fcn.004433c0
add esp, 4
mov byte [ebp - 4], 0x1c
lea ecx, [ebp - 0x5168]
call fcn.0042ba00
mov ecx, dword [ebp - 0x5170]
lea eax, [ebp - 0x5178]
push eax
call fcn.00459a00
lea ecx, [ebp - 0x5054]
call fcn.0042c800
jmp 0x459301
push str.Tools::Download
push str._s_thread_need_to_end_by_kill_
push 2
push 6
call fcn.004569b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x10
push dword [ebp - 0x5180]
call esi
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
push ecx
mov ecx, esp
mov dword [ebp - 0x516c], esp
push 0x4988e4
call fcn.0042c3c0
push ebx
mov edx, str.thread_need_to_end_by_kill_
mov byte [ebp - 4], 0x20
lea ecx, [ebp - 0x5168]
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0x21
mov byte [ebp - 4], 0x22
jmp 0x45968f
push dword [ebp - 0x5180]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebx + 4]
cmp dword [eax - 0xc], 0
je 0x45984f
push 0xb0
lea eax, [ebp - 0x5128]
push 0
push eax
call fcn.00461b50
add esp, 8
lea ecx, [ebp - 0x5128]
call fcn.0045af70
sub esp, 8
mov byte [ebp - 4], 0x26
lea ecx, [ebp - 0x5128]
push dword [ebx + 4]
call fcn.0045af10
cmp dword [ebp - 0x50d8], 0
je 0x4597c1
push 0
push dword [ebp - 0x516c]
lea ecx, [ebp - 0x5128]
push edi
call fcn.0045b040
lea ecx, [ebp - 0x5128]
call fcn.0045aea0
lea ecx, [ebp - 0x5128]
mov byte [ebp - 4], 0x1c
call fcn.00459a30
jmp 0x4599c4
push str.Tools::Download
push str._s_write_output_file_failed_
push 2
push 6
call fcn.004569b0
add esp, 0xc
mov ecx, esp
mov dword [ebp - 0x516c], esp
push 0x4988e4
call fcn.0042c3c0
push ebx
mov edx, str.write_output_file_failed_
mov byte [ebp - 4], 0x27
lea ecx, [ebp - 0x5168]
call fcn.0042bb10
add esp, 4
mov byte [ebp - 4], 0x28
mov ecx, eax
mov byte [ebp - 4], 0x29
call fcn.004433c0
add esp, 4
mov byte [ebp - 4], 0x26
lea ecx, [ebp - 0x5168]
call fcn.0042ba00
mov ecx, dword [ebp - 0x5170]
lea eax, [ebp - 0x5178]
push eax
call fcn.00459a00
lea ecx, [ebp - 0x5128]
call fcn.00459a30
lea ecx, [ebp - 0x5054]
call fcn.0042c800
jmp 0x459301
xor al, al
cmp dword [ebp - 0x516c], 0
mov byte [ebp - 0x5021], al
mov byte [ebp - 0x5181], al
jbe 0x4598ee
lea eax, [ebp - 0x516c]
mov dword [ebp - 0x516c], 0
push eax
lea eax, [ebp - 0x5181]
mov ecx, edi
push eax
lea edx, [ebp - 0x5021]
call fcn.00459dd0
mov eax, dword [ebp - 0x516c]
add esp, 8
test eax, eax
jle 0x4598be
add eax, edi
lea ecx, [ebp - 0x5054]
push eax
push edi
lea eax, [ebp - 0x5168]
push eax
call fcn.0045ae30
mov esi, dword [ebp - 0x5050]
mov edi, dword [ebp - 0x5054]
cmp byte [ebp - 0x5181], 0
je 0x4598e8
mov ecx, edi
cmp edi, esi
je 0x4598e8
nop dword [eax]
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov bl, byte [eax]
mov byte [eax], dl
mov byte [ecx], bl
lea ecx, [eax + 1]
cmp ecx, esi
jne 0x4598d0
mov ebx, dword [ebp - 0x517c]
mov al, byte [ebp - 0x5021]
sub esi, edi
je 0x459934
cmp byte [edi + esi - 1], 0
je 0x459934
inc esi
lea ecx, [ebp - 0x5054]
push esi
call fcn.0042b080
cmp byte [ebp - 0x5021], 0
mov edi, dword [ebp - 0x5054]
mov byte [edi + esi - 1], 0
je 0x459980
inc esi
lea ecx, [ebp - 0x5054]
push esi
call fcn.0042b080
mov eax, dword [ebp - 0x5054]
mov byte [eax + esi - 1], 0
jmp 0x459953
test al, al
je 0x459980
lea eax, [esi + 2]
push eax
lea ecx, [ebp - 0x5054]
call fcn.0042b080
mov eax, dword [ebp - 0x5054]
mov word [eax + esi], 0
push eax
lea ecx, [ebp - 0x5168]
call fcn.0042c3c0
push eax
lea ecx, [ebp - 0x5178]
mov byte [ebp - 4], 0x2a
call fcn.0042d240
lea ecx, [ebp - 0x5168]
mov byte [ebp - 4], 0x1c
call fcn.0042ba00
jmp 0x4599c4
mov eax, dword [ebp - 0x5050]
sub eax, edi
je 0x4599c4
push edi
lea ecx, [ebp - 0x5028]
mov dword [ebp - 0x5028], 0
call fcn.00448ac0
lea edx, [ebp - 0x5178]
mov byte [ebp - 4], 0x2b
lea ecx, [ebp - 0x5028]
call fcn.00459ac0
lea ecx, [ebp - 0x5028]
mov byte [ebp - 4], 0x1c
call fcn.0042ba00
push dword [ebx]
mov byte [ebp - 0x5174], 1
push str.Tools::Download
push str._s_finish_url__s_
push 1
push 6
call fcn.004569b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x14
push dword [ebp - 0x5188]
call esi
push dword [ebp - 0x518c]
call esi
jmp 0x4596a8