Function at 0x46607c
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, 0x5b6fb3
call fcn.0058705b
xor ebx, ebx
mov dword [ebp - 4], ebx
push ebx
push ebx
push ebx
push ebx
push 0x67edfc
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 0x466548
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 0x466536
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 0x466527
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x466527
push 0x13
lea edi, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.0041c53b
pop ecx
cmp eax, 0x191
jne 0x466177
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 0x466527
push 0x13
lea edi, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.0041c53b
pop ecx
cmp eax, 0xc8
jne 0x46656e
push 5
lea edi, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.0041c53b
cmp eax, ebx
pop ecx
mov dword [ebp - 0x24], eax
jle 0x466527
mov eax, dword [ebp + 0x28]
mov eax, dword [eax - 0xc]
cmp eax, ebx
je 0x46620b
push dword [ebp - 0x24]
lea eax, [ebp - 0x30]
push eax
call fcn.00474c00
mov edi, eax
mov byte [ebp - 4], 4
lea eax, [ebp - 0x34]
push 0x67ee00
push eax
lea ecx, [ebp + 0x28]
call fcn.0040fcd8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x38]
push edi
push ecx
mov esi, eax
call fcn.00413865
add esp, 0x18
mov byte [ebp - 4], 6
lea edi, [ebp + 0x28]
call fcn.0040857c
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x38]
call fcn.00408559
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x34]
call fcn.00408559
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x30]
call fcn.00408559
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 0x4664f7
mov eax, dword [ebp + 0x28]
cmp dword [eax - 0xc], ebx
je 0x4663a4
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00473b50
pop ecx
pop ecx
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x28]
cmp dword [eax], ebx
je 0x46630a
mov ecx, dword [eax + 4]
cmp ecx, ebx
je 0x46630a
cmp dword [0x6c438c], 1
jl 0x466292
push ecx
push str.Resume_buffer_found____i
push 0x67ee20
push 1
call fcn.00538922
mov eax, dword [ebp - 0x28]
add esp, 0x10
mov ecx, dword [ebp - 0x24]
cmp dword [eax + 4], ecx
jbe 0x4662c2
cmp dword [0x6c438c], 1
jl 0x4662b7
push str.Resume_buffer_too_big
push 0x67ee48
push 1
call fcn.00538922
add esp, 0xc
push dword [ebp + 0x28]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x46630a
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 0x4662e6
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
jmp 0x46630a
cmp dword [0x6c438c], 1
jl 0x46630a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Resume_buffer___unable_to_save____i
push 0x67ee7c
push 1
call fcn.00538922
add esp, 0x10
mov byte [ebp - 4], 7
lea ebx, [ebp - 0x28]
call fcn.00426633
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
jle 0x4663a2
push dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
push str.Range:_bytes_i__r_n
push eax
push 0x32
pop ecx
call fcn.00475470
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 0x466396
cmp dword [0x6c438c], 1
jl 0x466387
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_set_byte_range____i
push str.downloadFile
push 1
call fcn.00538922
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.00408559
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.004265ee
mov byte [ebp - 4], 0xb
mov edi, dword [ebp - 0x38]
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x4664b8
cmp dword [ebp - 0x14], 0
je 0x4664d0
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 0x4664d0
cmp esi, 0xffffffff
je 0x46642a
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 0x4664b8
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 0x466457
fadd dword [0x695f28]
fstp dword [ebp - 0x44]
fld dword [ebp - 0x44]
fdiv dword [ebp - 0x48]
fmul qword [0x695ee0]
call fcn.0057ede0
push eax
push 0x6de654
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea eax, [ebp - 0x2c]
push eax
call fcn.004084c2
mov byte [ebp - 4], 0xc
mov eax, dword [ebp + 8]
push 2
push dword [ebp + 0xc]
push dword [ebp - 0x24]
push dword [ebp - 0x4c]
push dword [eax]
lea eax, [ebp - 0x2c]
push 0x67eee8
call fcn.00417a4d
push dword [ebp - 0x2c]
call fcn.00452db6
add esp, 0x1c
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x2c]
call fcn.00408559
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 0x4663e8
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp - 4], 0xa
lea ebx, [ebp - 0x38]
call fcn.00426633
mov byte [ebp - 4], 7
cmp esi, 0xffffffff
je 0x4664f5
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 0x466511
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 0x466524
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 0x466536
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 1
cmp dword [ebp - 0x3c], ebx
je 0x466548
push dword [ebp - 0x3c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], bl
cmp dword [ebp - 0x40], ebx
je 0x466559
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x28]
call fcn.00408559
mov al, byte [ebp - 0xd]
call fcn.00587133
ret
cmp eax, 0x194
jne 0x466527
mov eax, dword [ebp + 0x24]
mov byte [eax], 1
jmp 0x466527