Function at 0x489a70
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
Resolve function by parsing pe exports
Send data
Send http request
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5d1a78
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6d26f8]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
mov dword [esp + 0x6c], 0
push 0
push 0
push 0
push 0
push 0x692fd0
mov byte [esp + 0x2b], 0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x50], edi
mov byte [esp + 0x6c], 1
test edi, edi
je 0x48a04b
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x7c]
mov eax, dword [eax]
push 0
push 0
push 3
push 0
push 0
push ecx
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x54], ebx
mov byte [esp + 0x6c], 2
test ebx, ebx
je 0x48a03b
mov edx, dword [esp + 0x80]
mov eax, dword [edx]
push 0
push 0x8400f200
push 0
push 0
push 0
push eax
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x58], esi
mov byte [esp + 0x6c], 3
test esi, esi
je 0x48a02b
mov ebp, dword [sym.imp.WININET.dll_HttpSendRequestW]
push 0
push 0
push 0
push 0
push esi
call ebp
test eax, eax
je 0x48a02b
lea eax, [esp + 0x40]
push 0x13
push eax
mov dword [esp + 0x48], esi
call fcn.00489940
add esp, 8
cmp eax, 0x191
jne 0x489bc7
mov ecx, dword [esp + 0x88]
mov eax, dword [ecx]
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 edx, dword [esp + 0x8c]
mov eax, dword [edx]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
push 0x1d
push esi
call edi
push 0
push 0
push 0
push 0
push esi
call ebp
test eax, eax
je 0x48a027
lea eax, [esp + 0x40]
push 0x13
push eax
mov dword [esp + 0x48], esi
call fcn.00489940
mov edi, dword [esp + 0x34]
add esp, 8
cmp eax, 0xc8
jne 0x48a087
lea ecx, [esp + 0x40]
push 5
push ecx
mov dword [esp + 0x48], esi
call fcn.00489940
mov ebp, eax
add esp, 8
mov dword [esp + 0x24], ebp
test ebp, ebp
jle 0x48a02b
mov edx, dword [esp + 0x94]
mov eax, dword [edx - 0xc]
test eax, eax
je 0x489c7e
lea eax, [esp + 0x38]
push ebp
push eax
call fcn.0042dcf0
mov edi, eax
mov byte [esp + 0x74], 4
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0x48]
push edx
mov ebx, 0x6996b0
call fcn.004176f0
mov byte [esp + 0x7c], 5
lea ecx, [esp + 0x50]
push edi
push ecx
mov ebx, eax
call fcn.0041c9d0
add esp, 0x18
mov byte [esp + 0x6c], 6
lea edi, [esp + 0x94]
call fcn.0040daa0
mov byte [esp + 0x6c], 5
lea ecx, [esp + 0x40]
call fcn.0040b950
mov byte [esp + 0x6c], 4
lea ecx, [esp + 0x3c]
call fcn.0040b950
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x38]
call fcn.0040b950
mov ebx, dword [esp + 0x34]
mov edx, dword [esp + 0x84]
mov eax, dword [edx]
xor ecx, ecx
push ecx
push ecx
push 2
push ecx
push 1
push 0x40000000
push eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x54], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x5c], edi
mov byte [esp + 0x6c], 7
cmp edi, 0xffffffff
je 0x489ff5
mov eax, dword [esp + 0x94]
cmp dword [eax - 0xc], 0
je 0x489e39
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00498d80
add esp, 8
mov byte [esp + 0x6c], 8
lea eax, [esp + 0x20]
call fcn.004428e0
test al, al
jne 0x489d96
mov ebx, 1
cmp dword [0x6d138c], ebx
jl 0x489d19
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
push eax
push str.Resume_buffer_found____i
push str.downloadFile
push ebx
call fcn.00552bc2
add esp, 0x10
mov eax, dword [esp + 0x20]
cmp dword [eax + 4], ebp
jbe 0x489d4d
cmp dword [0x6d138c], ebx
jl 0x489d3d
push str.Resume_buffer_too_big
push str.downloadFile
push ebx
call fcn.00552bc2
add esp, 0xc
mov edx, dword [esp + 0x94]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x489d96
mov ecx, dword [eax + 4]
push 0
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x44], ecx
mov eax, dword [eax]
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x489d74
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
jmp 0x489d96
cmp dword [0x6d138c], ebx
jl 0x489d96
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Resume_buffer___unable_to_save____i
push str.downloadFile
push ebx
call fcn.00552bc2
add esp, 0x10
mov byte [esp + 0x6c], 7
lea ebx, [esp + 0x20]
call fcn.004b7990
mov eax, dword [esp + 0x1c]
test eax, eax
jle 0x489e39
push eax
push str.Range:_bytes_i__r_n
lea ecx, [esp + 0x38]
push 0x32
push ecx
call fcn.00499c10
add esp, 0x10
mov byte [esp + 0x6c], 9
mov eax, dword [esp + 0x30]
mov ecx, dword [eax - 0xc]
push 0xa0000000
push ecx
push eax
push esi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x489e2b
cmp dword [0x6d138c], 1
jl 0x489e16
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_set_byte_range____i
push str.downloadFile
push 1
call fcn.00552bc2
add esp, 0x10
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x1c], 0
mov byte [esp + 0x6c], 7
lea ecx, [esp + 0x30]
call fcn.0040b950
mov edx, dword [esp + 0x94]
push 0
push 0
push 4
push 0
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
mov dword [esp + 0x60], ebp
mov byte [esp + 0x6c], 0xa
mov eax, dword [esp + 0x1c]
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, 0x10000
lea ebx, [esp + 0x40]
mov dword [esp + 0x18], 0
call fcn.00438410
mov byte [esp + 0x6c], 0xb
mov ebx, dword [esp + 0x40]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
lea edx, [esp + 0x18]
push edx
push eax
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x489fbf
jmp 0x489eb0
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x489fbf
mov eax, dword [ebx]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
mov eax, dword [esp + 0x38]
push eax
call edi
test eax, eax
je 0x489fbf
cmp ebp, 0xffffffff
je 0x489ef7
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x48]
push ecx
mov dword [esp + 0x4c], eax
mov edx, dword [ebx]
push eax
push edx
push ebp
call edi
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x18]
cmp byte [esp + 0x98], 0
mov dword [esp + 0x38], eax
je 0x489fa4
mov ecx, dword [esp + 0x1c]
fild dword [esp + 0x24]
lea esi, [eax + ecx]
mov edx, esi
fstp dword [esp + 0x48]
mov dword [esp + 0x44], edx
fild dword [esp + 0x44]
test edx, edx
jge 0x489f34
fadd dword [0x6a3eb8]
fstp dword [esp + 0x44]
fld dword [esp + 0x44]
fdiv dword [esp + 0x48]
fmul qword [0x6a3e80]
call fcn.00598df0
push eax
push 0x6eac3c
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea eax, [esp + 0x30]
push eax
call fcn.0040b7e0
mov byte [esp + 0x6c], 0xc
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x74]
push 0xd
push ecx
mov ecx, dword [eax]
push edx
push esi
push ecx
push str.Downloading__s_database____i_bytes_from__i_file__i_from__i_
lea edi, [esp + 0x48]
call fcn.00421d60
mov esi, dword [esp + 0x48]
add esp, 0x18
call fcn.00474550
mov byte [esp + 0x6c], 0xb
mov ecx, edi
call fcn.0040b950
mov esi, dword [esp + 0x4c]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
lea edx, [esp + 0x18]
push edx
push eax
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x489eb0
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [esp + 0x6c], 0xa
lea ebx, [esp + 0x40]
call fcn.004b7990
mov byte [esp + 0x6c], 7
cmp ebp, 0xffffffff
je 0x489fe9
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
add ecx, edx
cmp ecx, ebp
jne 0x48a016
mov eax, dword [esp + 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [esp + 0x17], 1
mov byte [esp + 0x6c], 3
cmp edi, 0xffffffff
je 0x48a027
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x2c]
mov byte [esp + 0x6c], 2
test esi, esi
je 0x48a03b
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [esp + 0x6c], 1
test ebx, ebx
je 0x48a04b
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [esp + 0x6c], 0
test edi, edi
je 0x48a05b
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esp + 0x6c], 0xffffffff
lea ecx, [esp + 0x94]
call fcn.0040b950
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
cmp eax, 0x194
jne 0x48a02b
mov ecx, dword [esp + 0x90]
mov byte [ecx], 1
jmp 0x48a02b