Function at 0x100076678
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2d0
mov rax, qword [0x100151198]
xor rax, rsp
mov qword [rsp + 0x2c0], rax
mov r15, r8
mov rbx, rdx
mov rcx, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp rcx, rax
je 0x1000766e6
test byte [rcx + 0x1c], 1
je 0x1000766e6
cmp byte [rcx + 0x19], 5
jb 0x1000766e6
mov rcx, qword [rcx + 0x10]
lea r8, [0x10001e430]
mov edx, pe_nt_image_headers64
mov r9d, 0x3e800
mov qword [rsp + 0x20], rbx
call fcn.10003b984
and dword [rsp + 0x40], 0
and dword [rsp + 0x44], 0
xor r13d, r13d
xor r14d, r14d
xor ebp, ebp
xor r12d, r12d
xor esi, esi
test rbx, rbx
je 0x10007698b
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x10007698b
cmp r15, 0xffffffffffffffff
je 0x10007698b
test r15, r15
je 0x10007698b
lea edi, [rbp + 0x68]
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8, rdi
call sub.msvcrt.dll_memset
lea rax, [rsp + 0xc0]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x68], rax
or eax, 0xffffffff
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov dword [rsp + 0x50], edi
mov dword [rsp + 0xa0], eax
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x70], 0x100
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
xor edi, edi
cmp eax, edi
je 0x100076973
lea edx, [rbp + 1]
lea rcx, [0x1000219b0]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rbp, rax
cmp rax, rdi
je 0x100076973
mov r8d, 0x3a98
mov edx, 0x2710
mov rcx, rax
mov r9d, r8d
mov dword [rsp + 0x20], r8d
call qword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp eax, edi
je 0x100076973
lea rdx, [0x100074500]
xor r9d, r9d
mov r8d, 0x4000
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp rax, 0xffffffffffffffff
je 0x100076973
movzx r8d, word [rsp + 0x74]
lea rdx, [rsp + 0xc0]
xor r9d, r9d
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
cmp rax, rdi
je 0x100076973
cmp dword [rsp + 0x64], 2
mov r8, qword [rsp + 0x98]
mov eax, edi
mov ecx, 0x800000
lea rdx, [0x100021a08]
cmove eax, ecx
xor r9d, r9d
mov rcx, r12
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
cmp rax, rdi
je 0x100076973
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, edi
je 0x100076973
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
cmp eax, edi
je 0x100076973
mov ebx, edi
lea rdx, [rsp + 0x40]
mov rcx, rsi
mov dword [rsp + 0x40], edi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
cmp eax, edi
je 0x100076973
mov eax, dword [rsp + 0x40]
cmp eax, edi
je 0x100076990
add ebx, eax
cmp ebx, 0x3e800
ja 0x100076984
inc eax
cmp r14d, eax
jae 0x1000768f8
mov rcx, r13
call sub.msvcrt.dll_free
mov ecx, dword [rsp + 0x40]
inc ecx
call fcn.10011b8d4
mov r13, rax
cmp rax, rdi
je 0x10007696c
mov r14d, dword [rsp + 0x40]
inc r14d
mov r8d, r14d
xor edx, edx
mov rcx, r13
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x44]
mov rdx, r13
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
cmp eax, edi
je 0x100076973
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x40]
cmp eax, ecx
ja 0x10007697d
test eax, eax
je 0x100076961
and qword [rsp + 0x20], 0
sub eax, edi
mov edx, edi
lea r9, [rsp + 0x48]
mov rcx, r15
add rdx, r13
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100076973
add edi, dword [rsp + 0x48]
mov eax, dword [rsp + 0x44]
cmp edi, eax
jb 0x10007692f
mov ecx, dword [rsp + 0x40]
xor edi, edi
cmp ecx, edi
jbe 0x100076990
jmp 0x10007689a
mov edi, 0xe
jmp 0x100076990
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x100076990
mov edi, 0x570
jmp 0x100076990
mov edi, 0x2070
jmp 0x100076990
mov edi, 0x57
mov rcx, r13
call sub.msvcrt.dll_free
test rsi, rsi
je 0x1000769a6
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test r12, r12
je 0x1000769b4
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test rbp, rbp
je 0x1000769c2
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r10, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp r10, rax
je 0x100076a09
test byte [r10 + 0x1c], 1
je 0x100076a09
movzx ecx, byte [r10 + 0x19]
mov eax, edi
neg eax
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp ecx, edx
jl 0x100076a09
mov rcx, qword [r10 + 0x10]
lea r8, [0x10001e430]
mov edx, 0xf9
mov r9d, edi
call fcn.100036328
mov eax, edi
mov rcx, qword [rsp + 0x2c0]
xor rcx, rsp
call fcn.10011b980
mov rbx, qword [rsp + 0x310]
add rsp, 0x2d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret