Function at 0x14001ec04
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.1400747a0
sub rsp, rax
lea rax, [0x14008e169]
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 [0x14010bb68], 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 0x14001ed13
call fcn.14001e121
lea rdi, str.InternetCrackUrlA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb68], rax
test rax, rax
jne 0x14001ed13
call fcn.140036bd7
lea r8, str.WinInet
mov rdx, rdi
lea rcx, [0x14008ce6c]
mov r9, rax
call fcn.140036717
xor ecx, ecx
xor ebx, ebx
xor r12d, r12d
xor r13d, r13d
mov qword [rsp + 0x48], rcx
jmp 0x14001f04c
cmp qword [0x14010bb60], 0
jne 0x14001ed41
call fcn.14001e121
lea rdi, str.InternetConnectA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb60], rax
test rax, rax
je 0x14001ece1
cmp qword [0x14010bb58], 0
jne 0x14001ed73
call fcn.14001e121
lea rdi, str.InternetReadFile
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb58], rax
test rax, rax
je 0x14001ece1
cmp qword [0x14010bb50], 0
jne 0x14001eda5
call fcn.14001e121
lea rdi, str.InternetCloseHandle
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb50], rax
test rax, rax
je 0x14001ece1
cmp qword [0x14010bb48], 0
jne 0x14001edd7
call fcn.14001e121
lea rdi, str.HttpOpenRequestA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb48], rax
test rax, rax
je 0x14001ece1
cmp qword [0x14010bb40], 0
jne 0x14001ee09
call fcn.14001e121
lea rdi, str.HttpSendRequestA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb40], rax
test rax, rax
je 0x14001ece1
cmp qword [0x14010bb38], 0
jne 0x14001ee3b
call fcn.14001e121
lea rdi, str.HttpQueryInfoA
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov qword [0x14010bb38], rax
test rax, rax
je 0x14001ece1
mov rax, qword [0x1400b1100]
xor edx, edx
cmp qword [rsp + 0x2a40], 0
mov dword [0x14010ba10], 0x194
mov dword [rax], edx
je 0x14001ee76
xor eax, eax
mov r8, qword [rsp + 0x2a40]
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], eax
or ecx, 0xffffffff
call fcn.140043acc
test rbx, rbx
jne 0x14001ee95
mov r8d, 0x17e
lea rdx, str.net.c
lea rcx, str.url___NULL
call qword [sym.imp.msvcrt.dll__wassert]
test r14, r14
je 0x14001ee9f
xor eax, eax
mov qword [r14], rax
mov rcx, r15
test r15, r15
jne 0x14001eeaa
mov rcx, rbx
call fcn.14001de90
cmp qword [rsp + 0x2a40], 0
mov qword [rsp + 0x50], rax
je 0x14001eef0
mov rax, qword [rsp + 0x50]
xor edx, edx
mov ecx, 1
mov r9d, 0xc0d
mov r8d, 0x1388
mov qword [rsp + 0x20], rax
call fcn.14001d77b
mov rdx, rbx
lea rcx, str.Downloading__s
call fcn.140036717
mov rcx, rbx
call sub.msvcrt.dll_strlen
xor r8d, r8d
lea r9, [rsp + 0xe8]
mov rcx, rbx
mov edx, eax
call qword [0x14010bb68]
test eax, eax
je 0x14001ef28
cmp qword [rsp + 0x100], 0
je 0x14001ef28
cmp qword [rsp + 0x130], 0
jne 0x14001ef39
call fcn.14001e826
lea rcx, str.Unable_to_decode_URL:__s
mov rdx, rax
jmp 0x14001ef65
mov edx, 1
mov rcx, rsi
mov byte [rsp + 0xe7], 0
call fcn.14001e21d
mov r13, rax
test rax, rax
jne 0x14001ef6f
call fcn.14001e826
lea rcx, str.Could_not_open_Internet_session:__s
mov rdx, rax
call fcn.140036717
jmp 0x14001ecff
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 [0x14010bb60]
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x14001efdd
call fcn.14001e826
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.140036717
jmp 0x14001f04a
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, [0x14008e27e]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbp
call qword [0x14010bb48]
mov r12, rax
test rax, rax
jne 0x14001f055
call fcn.14001e826
mov rdx, rbx
lea rcx, str.Could_not_open_URL__s:__s
mov r8, rax
call fcn.140036717
xor ebx, ebx
or rbp, 0xffffffffffffffff
jmp 0x14001f3c8
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 [0x14010bb40]
test eax, eax
jne 0x14001f08a
call fcn.14001e826
lea rcx, str.Unable_to_send_request:__s
mov rdx, rax
jmp 0x14001f14f
lea r9, [rsp + 0x6c]
xor r11d, r11d
mov edx, 0x20000013
mov rcx, r12
mov qword [rsp + 0x40], r9
lea r8, [0x14010ba10]
mov dword [rsp + 0x6c], 4
mov qword [rsp + 0x20], r11
call qword [0x14010bb38]
mov r9, qword [rsp + 0x40]
cmp dword [0x14010ba10], 0xc8
je 0x14001f113
mov dword [0x14010bc90], 0x2efc
mov ecx, 0xc0192efc
call qword [sym.imp.KERNEL32.DLL_SetLastError]
lea rax, str.File_not_found
cmp dword [0x14010ba10], 0x194
lea rdx, str.Unable_to_access_file
cmove rdx, rax
mov r8d, dword [0x14010ba10]
lea rcx, str._s:__d
call fcn.140036717
jmp 0x14001f04a
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 [0x14010bb38]
test eax, eax
jne 0x14001f159
call fcn.14001e826
lea rcx, str.Unable_to_retrieve_file_length:__s
mov rdx, rax
call fcn.140036717
jmp 0x14001f04a
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 0x14001f234
xor r8d, r8d
xor edx, edx
lea rbp, [rsp + 0x1d0]
mov rcx, rax
call fcn.140037ab9
lea rcx, str.File_length:__s
mov rdx, rax
call fcn.140036717
mov rax, qword [0x1400b1c10]
mov rsi, qword [sym.imp.msvcrt.dll__snprintf]
cmp dword [rax], 0
je 0x14001f1df
mov rcx, rbx
call fcn.14001deca
mov rcx, qword [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov rbx, rax
call fcn.140037ab9
mov qword [rsp + 0x20], rbx
lea r8, [0x14008e310]
mov r9, rax
jmp 0x14001f208
mov rcx, qword [rsp + 0x40]
xor r8d, r8d
xor edx, edx
call fcn.140037ab9
mov rcx, rbx
mov rdi, rax
call fcn.14001deca
mov qword [rsp + 0x20], rdi
lea r8, [0x14008e318]
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.14001d77b
test r15, r15
je 0x14001f26e
mov r8d, pe_nt_image_headers64
mov edx, 0xc0000000
mov rcx, r15
call fcn.14001e0b7
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x14001f2aa
call fcn.14001e826
mov rdx, qword [rsp + 0x50]
lea rcx, str.Unable_to_create_file__s:__s
mov r8, rax
jmp 0x14001f045
lea rcx, str.No_buffer_pointer_provided_for_download
test r14, r14
je 0x14001f2a0
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 0x14001f2aa
lea rcx, str.Could_not_allocate_buffer_for_download
call fcn.140036717
jmp 0x14001f04a
lea rax, [rsp + 0x74]
xor ebx, ebx
mov qword [rsp + 0x58], rax
mov rax, qword [0x1400b1100]
cmp dword [rax], 0
js 0x14001f3c8
lea rsi, [rsp + 0x1d0]
mov r9, qword [rsp + 0x58]
mov r8d, 0x2800
mov rcx, r12
mov rdx, rsi
call qword [0x14010bb58]
test eax, eax
je 0x14001f39f
cmp dword [rsp + 0x74], 0
je 0x14001f39f
cmp qword [rsp + 0x2a40], 0
je 0x14001f322
xor r8d, r8d
mov r9, qword [rsp + 0x40]
mov edx, 0xca9
mov ecx, 0xfffffffe
mov dword [rsp + 0x20], r8d
mov r8, rbx
call fcn.140043acc
mov r8d, dword [rsp + 0x74]
test r15, r15
je 0x14001f385
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 0x14001f363
call fcn.14001e826
mov rdx, qword [rsp + 0x50]
lea rcx, str.Error_writing_file__s:__s
mov r8, rax
call fcn.140036717
jmp 0x14001f3c8
mov r9d, dword [rsp + 0x74]
mov r8d, dword [rsp + 0x70]
cmp r9d, r8d
je 0x14001f393
mov rdx, qword [rsp + 0x50]
lea rcx, str.Error_writing_file__s:_Only__d__d_bytes_written
call fcn.140036717
jmp 0x14001f3c8
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 0x14001f2b6
mov rax, qword [rsp + 0x40]
cmp rbx, rax
je 0x14001f3cc
mov r8, rax
mov rdx, rbx
lea rcx, str.Could_not_download_complete_file___read:__lld_bytes__expected:__lld_bytes
call fcn.140036717
mov rax, qword [0x1400b1100]
mov dword [rax], 0xc003001d
xor esi, esi
jmp 0x14001f419
cmp qword [rsp + 0x2a40], 0
mov dword [0x14010ba10], 0xc8
je 0x14001f40f
xor edx, edx
mov r9, qword [rsp + 0x40]
mov ecx, 0xfffffffe
mov dword [rsp + 0x20], edx
mov edx, 0xca9
mov r8, r9
call fcn.140043acc
mov rdx, qword [rsp + 0x50]
lea rcx, str.Successfully_downloaded__s
call fcn.140036717
mov rbx, qword [rsp + 0x40]
mov esi, 1
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x14010bc90], eax
cmp rbp, 0xffffffffffffffff
je 0x14001f43d
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
test esi, esi
jne 0x14001f460
test r15, r15
je 0x14001f44e
mov rcx, r15
call fcn.14001e7b3
test r14, r14
je 0x14001f460
mov rcx, qword [r14]
call sub.msvcrt.dll_free
xor eax, eax
mov qword [r14], rax
test r12, r12
je 0x14001f46e
mov rcx, r12
call qword [0x14010bb50]
cmp qword [rsp + 0x48], 0
je 0x14001f481
mov rcx, qword [rsp + 0x48]
call qword [0x14010bb50]
test r13, r13
je 0x14001f48f
mov rcx, r13
call qword [0x14010bb50]
mov ecx, dword [0x14010bc90]
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