Function at 0x1400025a0
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x68
mov r15, qword [rcx + 0x18]
xor esi, esi
mov dword [rcx + 0x39c], esi
mov rbx, rcx
mov rcx, r15
mov dword [rbp - 0x20], esi
mov edi, esi
mov qword [rbp - 0x10], rsi
mov r13d, esi
mov qword [rbp - 0x18], rsi
mov r12d, esi
call qword [sym.imp.cmutil.dll_SzToWzWithAlloc]
nop dword [rax + rax]
mov r14, rax
lea r9, [rbp - 0x10]
test rax, rax
lea r8, [rbp - 0x20]
lea rax, [rbp - 0x18]
mov rdx, r14
lea rcx, str.Microsoft_Connection_Manager
mov qword [rsp + 0x20], rax
setne sil
call fcn.140006844
sub esi, 1
je 0x140002622
cmp esi, 1
jne 0x140002631
mov rcx, r15
jmp 0x140002625
mov rcx, r14
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
mov rsi, qword [rbp - 0x18]
lea rcx, str.Microsoft_Connection_Manager
mov r14, qword [rbp - 0x10]
xor r15d, r15d
mov edx, dword [rbp - 0x20]
mov r9, rsi
mov r8, r14
mov dword [rsp + 0x20], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
nop dword [rax + rax]
mov qword [rbx + 0x40], rax
test r14, r14
je 0x140002675
mov rcx, r14
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
test rsi, rsi
je 0x140002689
mov rcx, rsi
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
je 0x1400026a7
mov r8d, 0x62
lea rdx, str.DownloadHttpFile___aborted._Quitting_on_Line____d.
jmp 0x140002b10
mov rcx, qword [rbx + 0x40]
test rcx, rcx
jne 0x1400026c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___InternetOpen___failed__GLE_u.
jmp 0x140002b07
mov rdx, qword [rbx + 0x38]
xor r9d, r9d
movzx r8d, word [rdx + 0x24]
mov rdx, qword [rdx + 0x18]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
nop dword [rax + rax]
mov qword [rbx + 0x48], rax
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
je 0x1400026fc
mov r8d, 0x6e
jmp 0x14000269b
cmp qword [rbx + 0x48], r15
jne 0x140002736
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8, qword [rbx + 0x38]
lea rdx, str.DownloadFileHttp___WinHttpConnect_pszHostName_s__failed__GLE_u.
mov dword [rbx + 0x39c], eax
mov r9d, eax
mov ecx, dword [0x14000e0a0]
mov r8, qword [r8 + 0x18]
call fcn.140007c34
jmp 0x140002b1b
mov ecx, 0x1002
call qword [sym.imp.cmutil.dll_CmMalloc]
nop dword [rax + rax]
mov r12, rax
test rax, rax
jne 0x140002766
mov ecx, dword [0x14000e0a0]
lea rdx, str.DownloadHttpFile___aborted._Could_not_allocate_memory
call fcn.140007c34
jmp 0x140002b1b
mov r8, qword [rbx + 0x38]
mov edx, 0x801
mov rcx, r12
mov r8, qword [r8 + 0x48]
call fcn.140001f2c
mov r8d, eax
test eax, eax
jns 0x140002792
movzx eax, r8w
lea rdx, str.DownloadFileHttp___StringCchCopyEx_failed:_0x_x_n
jmp 0x140002b0a
mov r8, qword [rbx + 0x38]
mov rcx, r12
mov r8, qword [r8 + 0x58]
call fcn.1400021e8
mov r8d, eax
test eax, eax
jns 0x1400027b9
movzx eax, r8w
lea rdx, str.DownloadFileHttp___StringCchCatEx_failed:_0x_x_n
jmp 0x140002b0a
mov rcx, r12
call qword [sym.imp.cmutil.dll_WzToSzWithAlloc]
nop dword [rax + rax]
mov ecx, dword [0x14000e0a0]
lea rdx, str.DownloadFileHttp_____HttpOpenRequest____s
mov r14, rax
neg rax
mov r8, r14
sbb esi, esi
and esi, 2
call fcn.140007c34
sub esi, 1
je 0x1400027f7
cmp esi, 1
jne 0x140002806
mov rcx, r14
jmp 0x1400027fa
mov rcx, r12
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
mov rax, qword [rbx + 0x38]
mov ecx, 0x100
mov edx, 0x800100
mov r8, r12
cmp dword [rax + 0x14], 2
cmove ecx, edx
xor r9d, r9d
mov dword [rsp + 0x30], ecx
xor edx, edx
mov rcx, qword [rbx + 0x48]
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
nop dword [rax + rax]
mov qword [rbx + 0x50], rax
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
je 0x14000285c
mov r8d, 0x94
jmp 0x14000269b
mov rcx, qword [rbx + 0x50]
test rcx, rcx
jne 0x14000287d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___HttpOpenRequest___failed__GLE_u.
jmp 0x140002b07
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], r15d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
nop dword [rax + rax]
mov rcx, qword [rbx + 0x180]
mov edi, eax
cmp dword [rcx], r15d
je 0x1400028b9
mov r8d, 0xa5
jmp 0x14000269b
test eax, eax
jne 0x1400028d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___HttpSendRequest___failed__GLE_u.
jmp 0x140002b07
mov rcx, qword [rbx + 0x50]
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x140002905
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___WinHttpReceiveResponse___failed__GLE_u.
jmp 0x140002b07
mov rcx, qword [rbx + 0x50]
lea rdx, [rbp + 0x48]
mov dword [rbp + 0x58], r15d
mov dword [rbp + 0x60], r15d
mov dword [rbp + 0x48], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
nop dword [rax + rax]
test eax, eax
je 0x140002af4
mov rsi, qword [rbp + 0x50]
mov r14d, 4
mov eax, dword [rbp + 0x48]
test eax, eax
je 0x140002c95
test r13, r13
je 0x140002959
mov rcx, r13
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
mov eax, dword [rbp + 0x48]
mov ecx, eax
call qword [sym.imp.cmutil.dll_CmMalloc]
nop dword [rax + rax]
mov r13, rax
test rax, rax
je 0x140002c65
mov r8d, dword [rbp + 0x48]
lea r9, [rbp + 0x58]
mov rcx, qword [rbx + 0x50]
mov rdx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
nop dword [rax + rax]
mov edi, eax
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
jne 0x140002c5a
test edi, edi
je 0x140002c42
mov r8d, dword [rbp + 0x58]
test r8d, r8d
je 0x140002c95
lea r9, [rbp + 0x60]
mov qword [rsp + 0x20], r15
mov rdx, r13
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
mov edi, eax
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
jne 0x140002c37
test edi, edi
je 0x140002c1f
mov r8d, dword [rbp + 0x58]
mov r9d, dword [rbp + 0x60]
cmp r8d, r9d
jne 0x140002bf7
cmp dword [rbx + 0x170], r15d
jne 0x140002a8e
mov rcx, qword [rbx + 0x50]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea r9, [rbx + 0x174]
lea rax, [rbp - 0x24]
mov dword [rbp - 0x24], r14d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x20000005
mov dword [rbp - 0x28], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
nop dword [rax + rax]
mov edi, eax
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
jne 0x140002be1
test edi, edi
jne 0x140002a8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov dword [rbx + 0x39c], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, dword [0x14000e0a0]
lea rdx, str.DownloadFileHttp___HttpQueryInfo___failed__GLE_u.
mov r8d, eax
call fcn.140007c34
mov r8d, dword [rbp + 0x58]
mov ecx, dword [rbx + 0x170]
mov rax, qword [rbx + 0x160]
add ecx, r8d
mov dword [rbx + 0x170], ecx
test rax, rax
je 0x140002abc
mov r8, qword [rbx + 0x168]
mov edx, dword [rbx + 0x174]
call qword [0x140009690]
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
jne 0x140002bec
mov rcx, qword [rbx + 0x50]
lea rdx, [rbp + 0x48]
mov dword [rbp + 0x58], r15d
mov dword [rbp + 0x60], r15d
mov dword [rbp + 0x48], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
nop dword [rax + rax]
test eax, eax
jne 0x140002937
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___WinHttpQueryDataAvailable_failed__GLE_u.
mov r8d, eax
mov dword [rbx + 0x39c], eax
mov ecx, dword [0x14000e0a0]
call fcn.140007c34
cmp dword [rbx + 0x39c], r15d
jne 0x140002b42
mov rax, qword [rbx + 0x180]
cmp dword [rax], r15d
jne 0x140002b42
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov dword [rbx + 0x39c], eax
test r13, r13
je 0x140002b56
mov rcx, r13
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
mov rcx, qword [rbx + 0x50]
test rcx, rcx
je 0x140002b6f
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop dword [rax + rax]
mov qword [rbx + 0x50], r15
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x140002b88
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop dword [rax + rax]
mov qword [rbx + 0x48], r15
mov rcx, qword [rbx + 0x40]
test rcx, rcx
je 0x140002ba1
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop dword [rax + rax]
mov qword [rbx + 0x40], r15
test edi, edi
je 0x140002bb9
mov eax, dword [rbx + 0x170]
cmp eax, dword [rbx + 0x174]
jbe 0x140002bb9
mov dword [rbx + 0x174], eax
test r12, r12
je 0x140002bcd
mov rcx, r12
call qword [sym.imp.cmutil.dll_CmFree]
nop dword [rax + rax]
mov eax, edi
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r8d, 0xfe
jmp 0x14000269b
mov r8d, 0x10d
jmp 0x14000269b
mov ecx, dword [0x14000e0a0]
lea rdx, str.DownloadFileHttp___dwBytesRead_u__dwBytesWritten_u.
call fcn.140007c34
mov ecx, 0x70
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x140002b1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___WriteFile___failed__GLE_u.
jmp 0x140002b07
mov r8d, 0xe3
jmp 0x14000269b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___WinHttpReadData___failed__GLE_u.
jmp 0x140002b07
mov r8d, 0xd5
jmp 0x14000269b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r8d, dword [rbp + 0x48]
lea rdx, str.DownloadFileHttp___Could_not_allocate_memory_of_size__d__GLE_u.
mov dword [rbx + 0x39c], eax
mov r9d, eax
mov ecx, dword [0x14000e0a0]
call fcn.140007c34
jmp 0x140002b1b
mov rcx, qword [rbx + 0x50]
lea rax, [rbp - 0x28]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x1c]
lea rax, [rbp - 0x24]
mov dword [rbp - 0x24], r14d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x20000013
mov dword [rbp - 0x28], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x140002ce9
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea rdx, str.DownloadFileHttp___HttpQueryInfo___failed__GLE_u.
jmp 0x140002b07
mov r8d, dword [rbp - 0x1c]
cmp r8d, 0xc8
je 0x140002b1b
mov dword [rbx + 0x39c], r8d
lea rdx, str.DownloadFileHttp___HTTP_status_code___u.
mov ecx, dword [0x14000e0a0]
call fcn.140007c34
mov ecx, 2
mov edi, r15d
jmp 0x140002c0e