Function at 0x14001f576
Capabilities:
Check http status code
Link many functions at runtime
Write file on windows

Disassembly:
push r15
mov eax, 0x29d8
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.140076d90
sub rsp, rax
lea rax, [0x14009337c]
mov qword [rsp + 0x78], rax
mov rbx, rcx
xor eax, eax
mov ecx, 0x19
lea rdi, [rsp + 0xec]
mov rsi, r8
xor r8d, r8d
mov r15, rdx
rep stosd dword [rdi], eax
mov r14, r9
lea rax, [rsp + 0xa8]
cmp qword [0x14010fc88], 0
mov qword [rsp + 0x100], rax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x80], r8
mov dword [rsp + 0xe8], 0x68
mov dword [rsp + 0xf8], 1
mov dword [rsp + 0x108], 0x40
mov dword [rsp + 0x118], 1
mov qword [rsp + 0x120], rax
mov dword [rsp + 0x128], pe_nt_image_headers64
mov dword [rsp + 0x138], 1
jne 0x14001f685
call fcn.14001ee71
lea rdi, str.InternetCrackUrlA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc88], rax
test rax, rax
jne 0x14001f685
call fcn.140038579
lea r8, str.WinInet
mov rdx, rdi
lea rcx, [0x14009324c]
mov r9, rax
call fcn.1400380b9
xor ecx, ecx
xor ebx, ebx
xor r12d, r12d
xor r13d, r13d
mov qword [rsp + 0x48], rcx
jmp 0x14001f9be
cmp qword [0x14010fc80], 0
jne 0x14001f6b3
call fcn.14001ee71
lea rdi, str.InternetConnectA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc80], rax
test rax, rax
je 0x14001f653
cmp qword [0x14010fc78], 0
jne 0x14001f6e5
call fcn.14001ee71
lea rdi, str.InternetReadFile
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc78], rax
test rax, rax
je 0x14001f653
cmp qword [0x14010fc70], 0
jne 0x14001f717
call fcn.14001ee71
lea rdi, str.InternetCloseHandle
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc70], rax
test rax, rax
je 0x14001f653
cmp qword [0x14010fc68], 0
jne 0x14001f749
call fcn.14001ee71
lea rdi, str.HttpOpenRequestA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc68], rax
test rax, rax
je 0x14001f653
cmp qword [0x14010fc60], 0
jne 0x14001f77b
call fcn.14001ee71
lea rdi, str.HttpSendRequestA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc60], rax
test rax, rax
je 0x14001f653
cmp qword [0x14010fc58], 0
jne 0x14001f7ad
call fcn.14001ee71
lea rdi, str.HttpQueryInfoA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010fc58], rax
test rax, rax
je 0x14001f653
mov rax, qword [0x1400b42b0]
xor edx, edx
cmp qword [rsp + 0x2a40], 0
mov dword [0x14010fb30], 0x194
mov dword [rax], edx
je 0x14001f7e8
xor eax, eax
mov r8, qword [rsp + 0x2a40]
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], eax
or ecx, 0xffffffff
call fcn.140044e4a
test rbx, rbx
jne 0x14001f807
mov r8d, 0xd4
lea rdx, str.net.c
lea rcx, str.url___NULL
call qword [sym.imp.msvcrt.dll__wassert]
test r14, r14
je 0x14001f811
xor eax, eax
mov qword [r14], rax
mov rcx, r15
test r15, r15
jne 0x14001f81c
mov rcx, rbx
call fcn.14001ebe0
cmp qword [rsp + 0x2a40], 0
mov qword [rsp + 0x50], rax
je 0x14001f862
mov rax, qword [rsp + 0x50]
xor edx, edx
mov ecx, 1
mov r9d, 0xc0d
mov r8d, 0x1388
mov qword [rsp + 0x20], rax
call fcn.14001e4cb
mov rdx, rbx
lea rcx, str.Downloading__s
call fcn.1400380b9
mov rcx, rbx
call sub.msvcrt.dll_strlen
xor r8d, r8d
lea r9, [rsp + 0xe8]
mov rcx, rbx
mov edx, eax
call qword [0x14010fc88]
test eax, eax
je 0x14001f89a
cmp qword [rsp + 0x100], 0
je 0x14001f89a
cmp qword [rsp + 0x130], 0
jne 0x14001f8ab
call fcn.140038579
lea rcx, str.Unable_to_decode_URL:__s
mov rdx, rax
jmp 0x14001f8d7
mov edx, 1
mov rcx, rsi
mov byte [rsp + 0xe7], 0
call fcn.14001ef6d
mov r13, rax
test rax, rax
jne 0x14001f8e1
call fcn.140038579
lea rcx, str.Could_not_open_Internet_session:__s
mov rdx, rax
call fcn.1400380b9
jmp 0x14001f671
xor eax, eax
xor r12d, r12d
mov dword [rsp + 0x28], 3
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor eax, eax
mov rcx, r13
movzx r8d, word [rsp + 0x10c]
mov qword [rsp + 0x38], r12
mov rdx, qword [rsp + 0x100]
mov qword [rsp + 0x20], rax
call qword [0x14010fc80]
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x14001f94f
call fcn.140038579
mov rdx, qword [rsp + 0x100]
lea rcx, str.Could_not_connect_to_server__s:_d:__s
xor r12d, r12d
movzx r8d, word [rsp + 0x10c]
mov r9, rax
call fcn.1400380b9
jmp 0x14001f9bc
mov edx, 0x488c600
cmp dword [rsp + 0xfc], 4
mov eax, 0x408c600
mov r8, qword [rsp + 0x130]
cmove eax, edx
xor edi, edi
xor ebp, ebp
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x38], rdi
xor r9d, r9d
lea rdx, [0x140093490]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbp
call qword [0x14010fc68]
mov r12, rax
test rax, rax
jne 0x14001f9c7
call fcn.140038579
mov rdx, rbx
lea rcx, str.Could_not_open_URL__s:__s
mov r8, rax
call fcn.1400380b9
xor ebx, ebx
or rbp, 0xffffffffffffffff
jmp 0x14001fd3a
xor esi, esi
xor r9d, r9d
or r8d, 0xffffffff
mov rcx, rax
mov dword [rsp + 0x20], esi
lea rdx, str.Accept_Encoding:_gzip__deflate
call qword [0x14010fc60]
test eax, eax
jne 0x14001f9fc
call fcn.140038579
lea rcx, str.Unable_to_send_request:__s
mov rdx, rax
jmp 0x14001fac1
lea r9, [rsp + 0x6c]
xor r11d, r11d
mov edx, 0x20000013
mov rcx, r12
mov qword [rsp + 0x40], r9
lea r8, [0x14010fb30]
mov dword [rsp + 0x6c], 4
mov qword [rsp + 0x20], r11
call qword [0x14010fc58]
mov r9, qword [rsp + 0x40]
cmp dword [0x14010fb30], 0xc8
je 0x14001fa85
mov dword [0x14010fc98], 0x2efc
mov ecx, 0xc0192efc
call qword [sym.imp.KERNEL32.DLL_SetLastError]
lea rax, str.File_not_found
cmp dword [0x14010fb30], 0x194
lea rdx, str.Unable_to_access_file
cmove rdx, rax
mov r8d, dword [0x14010fb30]
lea rcx, str._s:__d
call fcn.1400380b9
jmp 0x14001f9bc
xor r10d, r10d
lea rsi, [rsp + 0x88]
mov edx, 5
mov rcx, r12
mov dword [rsp + 0x6c], 0x20
mov r8, rsi
mov qword [rsp + 0x20], r10
call qword [0x14010fc58]
test eax, eax
jne 0x14001facb
call fcn.140038579
lea rcx, str.Unable_to_retrieve_file_length:__s
mov rdx, rax
call fcn.1400380b9
jmp 0x14001f9bc
xor edx, edx
mov r8d, 0xa
mov rcx, rsi
call sub.msvcrt.dll__strtoui64
cmp qword [rsp + 0x2a40], 0
mov qword [rsp + 0x40], rax
je 0x14001fba6
xor r8d, r8d
xor edx, edx
lea rbp, [rsp + 0x1d0]
mov rcx, rax
call fcn.1400389a1
lea rcx, str.File_length:__s
mov rdx, rax
call fcn.1400380b9
mov rax, qword [0x1400b4e20]
mov rsi, qword [sym.imp.msvcrt.dll__snprintf]
cmp dword [rax], 0
je 0x14001fb51
mov rcx, rbx
call fcn.14001ec1a
mov rcx, qword [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov rbx, rax
call fcn.1400389a1
mov qword [rsp + 0x20], rbx
lea r8, [0x140093522]
mov r9, rax
jmp 0x14001fb7a
mov rcx, qword [rsp + 0x40]
xor r8d, r8d
xor edx, edx
call fcn.1400389a1
mov rcx, rbx
mov rdi, rax
call fcn.14001ec1a
mov qword [rsp + 0x20], rdi
lea r8, [0x14009352a]
mov r9, rax
mov edx, pe_nt_image_headers64
mov rcx, rbp
call rsi
mov qword [rsp + 0x20], rbp
mov r9d, 0xc0d
xor edx, edx
mov r8d, 0x1388
xor ecx, ecx
mov byte [rsp + 0x24f], 0
call fcn.14001e4cb
test r15, r15
je 0x14001fbe0
mov r8d, pe_nt_image_headers64
mov edx, 0xc0000000
mov rcx, r15
call fcn.14001ee07
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x14001fc1c
call fcn.140038579
mov rdx, qword [rsp + 0x50]
lea rcx, str.Unable_to_create_file__s:__s
mov r8, rax
jmp 0x14001f9b7
lea rcx, str.No_buffer_pointer_provided_for_download
test r14, r14
je 0x14001fc12
mov rax, qword [rsp + 0x40]
mov edx, 1
or rbp, 0xffffffffffffffff
lea rcx, [rax + 1]
call sub.msvcrt.dll_calloc
mov qword [r14], rax
test rax, rax
jne 0x14001fc1c
lea rcx, str.Could_not_allocate_buffer_for_download
call fcn.1400380b9
jmp 0x14001f9bc
lea rax, [rsp + 0x74]
xor ebx, ebx
mov qword [rsp + 0x58], rax
mov rax, qword [0x1400b42b0]
cmp dword [rax], 0
js 0x14001fd3a
lea rsi, [rsp + 0x1d0]
mov r9, qword [rsp + 0x58]
mov r8d, 0x2800
mov rcx, r12
mov rdx, rsi
call qword [0x14010fc78]
test eax, eax
je 0x14001fd11
cmp dword [rsp + 0x74], 0
je 0x14001fd11
cmp qword [rsp + 0x2a40], 0
je 0x14001fc94
xor r8d, r8d
mov r9, qword [rsp + 0x40]
mov edx, 0xca9
mov ecx, 0xfffffffe
mov dword [rsp + 0x20], r8d
mov r8, rbx
call fcn.140044e4a
mov r8d, dword [rsp + 0x74]
test r15, r15
je 0x14001fcf7
xor ecx, ecx
lea r9, [rsp + 0x70]
mov rdx, rsi
mov qword [rsp + 0x20], rcx
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x14001fcd5
call fcn.140038579
mov rdx, qword [rsp + 0x50]
lea rcx, str.Error_writing_file__s:__s
mov r8, rax
call fcn.1400380b9
jmp 0x14001fd3a
mov r9d, dword [rsp + 0x74]
mov r8d, dword [rsp + 0x70]
cmp r9d, r8d
je 0x14001fd05
mov rdx, qword [rsp + 0x50]
lea rcx, str.Error_writing_file__s:_Only__d__d_bytes_written
call fcn.1400380b9
jmp 0x14001fd3a
mov rax, qword [r14]
mov ecx, r8d
add rax, rbx
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x74]
add rbx, rax
jmp 0x14001fc28
mov rax, qword [rsp + 0x40]
cmp rbx, rax
je 0x14001fd3e
mov r8, rax
mov rdx, rbx
lea rcx, str.Could_not_download_complete_file___read:__lld_bytes__expected:__lld_bytes
call fcn.1400380b9
mov rax, qword [0x1400b42b0]
mov dword [rax], 0xc003001d
xor esi, esi
jmp 0x14001fd8b
cmp qword [rsp + 0x2a40], 0
mov dword [0x14010fb30], 0xc8
je 0x14001fd81
xor edx, edx
mov r9, qword [rsp + 0x40]
mov ecx, 0xfffffffe
mov dword [rsp + 0x20], edx
mov edx, 0xca9
mov r8, r9
call fcn.140044e4a
mov rdx, qword [rsp + 0x50]
lea rcx, str.Successfully_downloaded__s
call fcn.1400380b9
mov rbx, qword [rsp + 0x40]
mov esi, 1
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x14010fc98], eax
cmp rbp, 0xffffffffffffffff
je 0x14001fdaf
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
test esi, esi
jne 0x14001fdd2
test r15, r15
je 0x14001fdc0
mov rcx, r15
call fcn.14001f503
test r14, r14
je 0x14001fdd2
mov rcx, qword [r14]
call sub.msvcrt.dll_free
xor eax, eax
mov qword [r14], rax
test r12, r12
je 0x14001fde0
mov rcx, r12
call qword [0x14010fc70]
cmp qword [rsp + 0x48], 0
je 0x14001fdf3
mov rcx, qword [rsp + 0x48]
call qword [0x14010fc70]
test r13, r13
je 0x14001fe01
mov rcx, r13
call qword [0x14010fc70]
mov ecx, dword [0x14010fc98]
call qword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
test esi, esi
cmove rbx, rax
mov rax, rbx
add rsp, 0x29d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret