Function at 0x463038
Capabilities:
Check http status code
Connect to http server
Create http request
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push 0x58
mov eax, 0x5b055e
call fcn.00580e6b
xor ebx, ebx
mov dword [ebp - 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x670fd0
mov byte [ebp - 0xd], bl
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ecx, eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x50], ecx
mov byte [ebp - 4], 1
cmp ecx, ebx
je 0x463504
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push ebx
push ebx
push 3
push ebx
push ebx
push dword [ebp + 0x30]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ecx, eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x54], ecx
mov byte [ebp - 4], 2
cmp ecx, ebx
je 0x4634f2
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
push ebx
push 0x8400f200
push ebx
push ebx
push ebx
push eax
push ebx
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x58], esi
mov byte [ebp - 4], 3
cmp esi, ebx
je 0x4634e3
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x4634e3
push 0x13
lea edi, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.0041c7ba
pop ecx
cmp eax, 0x191
jne 0x463133
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
inc ecx
push ecx
push eax
push 0x1c
push esi
call edi
mov eax, dword [ebp + 0x20]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
push 0x1d
push esi
call edi
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x4634e3
push 0x13
lea edi, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.0041c7ba
pop ecx
cmp eax, 0xc8
jne 0x46352a
push 5
lea edi, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.0041c7ba
cmp eax, ebx
pop ecx
mov dword [ebp - 0x24], eax
jle 0x4634e3
mov eax, dword [ebp + 0x28]
mov eax, dword [eax - 0xc]
cmp eax, ebx
je 0x4631c7
push dword [ebp - 0x24]
lea eax, [ebp - 0x30]
push eax
call fcn.00470430
mov edi, eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x34]
push 0x6776a8
push eax
lea ecx, [ebp + 0x28]
call fcn.0040fc53
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x38]
push edi
push ecx
mov esi, eax
call fcn.004136d2
add esp, 0x18
mov byte [ebp - 4], 6
lea edi, [ebp + 0x28]
call fcn.004085c5
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x38]
call fcn.004085a2
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x34]
call fcn.004085a2
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x30]
call fcn.004085a2
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push ebx
push 2
push ebx
push 1
mov esi, 0x40000000
push esi
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x30], ebx
call edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x5c], eax
mov byte [ebp - 4], 7
cmp eax, 0xffffffff
je 0x4634b3
mov eax, dword [ebp + 0x28]
cmp dword [eax - 0xc], ebx
je 0x463360
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0046f2d0
pop ecx
pop ecx
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x28]
cmp dword [eax], ebx
je 0x4632c6
mov ecx, dword [eax + 4]
cmp ecx, ebx
je 0x4632c6
cmp dword [0x6af38c], 1
jl 0x46324e
push ecx
push str.Resume_buffer_found____i
push str.downloadFile
push 1
call fcn.00532962
mov eax, dword [ebp - 0x28]
add esp, 0x10
mov ecx, dword [ebp - 0x24]
cmp dword [eax + 4], ecx
jbe 0x46327e
cmp dword [0x6af38c], 1
jl 0x463273
push str.Resume_buffer_too_big
push str.downloadFile
push 1
call fcn.00532962
add esp, 0xc
push dword [ebp + 0x28]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4632c6
mov ecx, dword [eax + 4]
push ebx
lea edx, [ebp - 0x34]
push edx
mov dword [ebp - 0x34], ecx
mov eax, dword [eax]
push ecx
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4632a2
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
jmp 0x4632c6
cmp dword [0x6af38c], 1
jl 0x4632c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Resume_buffer___unable_to_save____i
push str.downloadFile
push 1
call fcn.00532962
add esp, 0x10
mov byte [ebp - 4], 7
lea ebx, [ebp - 0x28]
call fcn.00426993
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
jle 0x46335e
push dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
push str.Range:_bytes_i__r_n
push eax
push 0x32
pop ecx
call fcn.00470c60
add esp, 0xc
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax - 0xc]
push 0xa0000000
push ecx
push eax
push dword [ebp - 0x20]
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x463352
cmp dword [0x6af38c], 1
jl 0x463343
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_set_byte_range____i
push str.downloadFile
push 1
call fcn.00532962
add esp, 0x10
push ebx
push ebx
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c]
call fcn.004085a2
xor ebx, ebx
push ebx
push ebx
push 4
push ebx
push 1
push esi
push dword [ebp + 0x28]
call edi
mov esi, eax
mov dword [ebp - 0x60], esi
mov byte [ebp - 4], 0xa
push ebx
push ebx
push dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x14], ebx
mov edi, 0x10000
lea ebx, [ebp - 0x38]
call fcn.0042694e
mov byte [ebp - 4], 0xb
mov edi, dword [ebp - 0x38]
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x463474
cmp dword [ebp - 0x14], 0
je 0x46348c
mov eax, dword [edi]
push 0
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46348c
cmp esi, 0xffffffff
je 0x4633e6
mov eax, dword [ebp - 0x14]
push 0
lea ecx, [ebp - 0x44]
push ecx
push eax
mov dword [ebp - 0x44], eax
push dword [edi]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x30]
add eax, dword [ebp - 0x14]
cmp byte [ebp + 0x2c], 0
mov dword [ebp - 0x30], eax
je 0x463474
fild dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
add eax, ecx
mov dword [ebp - 0x44], eax
fstp dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x44]
test eax, eax
jge 0x463413
fadd dword [0x681ec0]
fstp dword [ebp - 0x44]
fld dword [ebp - 0x44]
fdiv dword [ebp - 0x48]
fmul qword [0x681e88]
call fcn.00578bf0
push eax
push 0x6c8c3c
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea eax, [ebp - 0x2c]
push eax
call fcn.0040850b
mov byte [ebp - 4], 0xc
mov eax, dword [ebp + 8]
push 0xd
push dword [ebp + 0xc]
push dword [ebp - 0x24]
push dword [ebp - 0x4c]
push dword [eax]
lea eax, [ebp - 0x2c]
push str.Downloading__s_database____i_bytes_from__i_file__i_from__i_
call fcn.00417833
push dword [ebp - 0x2c]
call fcn.004524ed
add esp, 0x1c
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x2c]
call fcn.004085a2
mov eax, dword [edi + 4]
mov ecx, dword [edi]
lea edx, [ebp - 0x14]
push edx
push eax
push ecx
push dword [ebp - 0x20]
call ebx
test eax, eax
jne 0x4633a4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp - 4], 0xa
lea ebx, [ebp - 0x38]
call fcn.00426993
mov byte [ebp - 4], 7
cmp esi, 0xffffffff
je 0x4634b1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x18]
add eax, ecx
cmp eax, dword [ebp - 0x24]
jne 0x4634cd
push dword [ebp + 0x28]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [ebp - 0xd], 1
mov byte [ebp - 4], 3
cmp dword [ebp - 0x1c], 0xffffffff
je 0x4634e0
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x20]
mov byte [ebp - 4], 2
cmp esi, ebx
je 0x4634f2
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x3c], ebx
je 0x463504
push dword [ebp - 0x3c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], bl
cmp dword [ebp - 0x40], ebx
je 0x463515
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x28]
call fcn.004085a2
mov al, byte [ebp - 0xd]
call fcn.00580f43
ret
cmp eax, 0x194
jne 0x4634e3
mov eax, dword [ebp + 0x24]
mov byte [eax], 1
jmp 0x4634e3