Function at 0x14000e980
Capabilities:
Receive http response
Set http header
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1e0]
sub rsp, 0x2e0
mov rax, qword [0x140073080]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov r14, qword [rdx + 0x230]
lea rax, [rdx + 0x28]
mov qword [rsp + 0x50], rax
lea rcx, [0x140077e88]
mov rsi, rdx
lea rdx, str.onDownloadRange_pDownLoadFilesInfo__port___d
mov rax, qword [r14 + 0x8c0]
mov r8d, dword [r14 + 0x880]
mov qword [rsp + 0x58], rax
call fcn.1400042c0
xor eax, eax
lea rdx, [0x14005f6e0]
lea rcx, [0x140077e88]
mov dword [rbp - 0x50], eax
mov dword [rbp - 0x48], eax
mov edi, eax
call fcn.1400042c0
mov rbx, qword [rsi + 0x10]
lea rcx, [rsp + 0x60]
mov r15, qword [rsi + 8]
xor r8d, r8d
mov rdx, r14
call fcn.14000d120
lea rdx, [r14 + 0x238]
mov r8, rax
lea rcx, [r14 + 0x30]
call fcn.14000c830
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x14000ea52
lea rdx, str.pRequest_is_NULL
lea rcx, [0x140077e88]
call fcn.1400042c0
lea eax, [rdi + 9]
jmp 0x14000ee68
mov qword [rsp + 0x310], r12
mov r12, qword [rax + 0x10]
mov eax, dword [r14 + 0x864]
mov qword [rsp + 0x320], r13
test eax, eax
jne 0x14000ea88
xor eax, eax
mov qword [rsi + 0x18], rax
mov ebx, eax
mov qword [rsi + 0x10], rax
mov eax, dword [r14 + 0x864]
test eax, eax
je 0x14000eafb
cmp qword [r14 + 0x898], rdi
jbe 0x14000eafb
xor edx, edx
lea rcx, [rbp - 0x40]
mov r8d, 0x208
call fcn.140026cc0
mov r9, r15
lea rdx, str.Range:bytes_I64u__I64u
mov r8, rbx
lea rcx, [rbp - 0x40]
call fcn.140001d70
mov r9d, 0x20000000
lea rdx, [rbp - 0x40]
mov r8d, 0xffffffff
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x14000eafb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WinHttpAddRequestHeaders_Fails___err:_0x_x
lea rcx, [0x140077e88]
call fcn.1400042c0
mov ebx, 5
jmp 0x14000ee4c
mov edx, dword [r14 + 0x868]
mov rcx, qword [rsp + 0x40]
call fcn.14000cb80
movzx ebx, al
lea rdx, str.getWinHttpResponse___d
mov r8d, ebx
lea rcx, [0x140077e88]
call fcn.1400042c0
test bl, bl
jne 0x14000eb46
lea rdx, str.NO_CONNECT_SERVER
lea rcx, [0x140077e88]
call fcn.1400042c0
mov ebx, 6
jmp 0x14000ee4c
cmp qword [rsi], rdi
jne 0x14000eb71
cmp qword [r14 + 0x8c8], rdi
je 0x14000eb71
cmp dword [r14 + 0x8d8], edi
je 0x14000eb71
mov rcx, qword [r14 + 0x8c0]
mov dword [r14 + 0x8d8], edi
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp qword [r14 + 0x898], rdi
jne 0x14000ebcc
lea r8, [r14 + 0x648]
mov rcx, r12
lea r9, [r14 + 0x864]
lea rdx, [r14 + 0x898]
call fcn.14000ced0
mov r8d, eax
lea rdx, str.parseDownLoadInfo_file_length_0__result_d
lea rcx, [0x140077e88]
mov ebx, eax
call fcn.1400042c0
test ebx, ebx
jne 0x14000ee4c
mov rcx, qword [r14 + 0x898]
test rcx, rcx
je 0x14000ec3a
dec rcx
mov qword [rsi + 8], rcx
jmp 0x14000ec3a
xor edx, edx
mov qword [rsp + 0x48], rdi
mov r8d, 0x208
lea rcx, [rbp - 0x40]
call fcn.140026cc0
lea r9, [rbp - 0x4c]
mov dword [rbp - 0x4c], edi
lea r8, [rbp - 0x40]
mov rcx, r12
lea rdx, [rsp + 0x48]
call fcn.14000ced0
mov r8, qword [r14 + 0x898]
lea rdx, str.parseDownLoadInfo_fail_length__lu__result_d
mov r9d, eax
lea rcx, [0x140077e88]
mov ebx, eax
call fcn.1400042c0
test ebx, ebx
jne 0x14000ee4c
lea rdx, [r14 + 0x648]
lea rcx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x14000ee47
xor r9d, r9d
mov qword [rsp + 0x30], rdi
lea rcx, [rsi + 0x28]
mov dword [rsp + 0x28], 0x80
cmp dword [r14 + 0x864], edi
je 0x14000ec69
mov dword [rsp + 0x20], 4
lea edx, [r9 + 4]
lea r8d, [r9 + 1]
jmp 0x14000ec79
mov dword [rsp + 0x20], 2
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea rcx, [0x140077e88]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x14000eca9
mov r8, qword [rsp + 0x50]
lea rdx, str.createfile_fail__S
call fcn.1400042c0
lea ebx, [r13 + 0xb]
jmp 0x14000ee4c
mov r8, qword [r14 + 0x898]
lea rdx, str.Start_creating_file__length___lu
call fcn.1400042c0
xor r15d, r15d
nop
cmp dword [r14 + 0x850], 0
jne 0x14000ee14
lea rdx, [rbp - 0x50]
mov dword [rbp - 0x50], 0
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x14000edf1
mov eax, dword [rbp - 0x50]
test eax, eax
je 0x14000ecf6
cmp r15d, eax
je 0x14000ed17
test rdi, rdi
je 0x14000ed06
mov rcx, rdi
call fcn.140023e64
mov eax, dword [rbp - 0x50]
lea ecx, [rax + 1]
call fcn.140024144
mov rdi, rax
mov eax, dword [rbp - 0x50]
mov r15d, eax
test rdi, rdi
je 0x14000edc7
lea r8d, [rax + 1]
xor edx, edx
mov rcx, rdi
call fcn.140026cc0
mov r8d, dword [rbp - 0x50]
lea r9, [rbp - 0x48]
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14000edb8
mov r8d, dword [rbp - 0x50]
lea r9, [rbp - 0x4c]
xor eax, eax
mov rdx, rdi
mov rcx, r13
mov dword [rbp - 0x4c], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000ed95
mov eax, dword [rbp - 0x4c]
add qword [rsi + 0x18], rax
add qword [rsi + 0x10], rax
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x14000ed86
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [rbp - 0x50], 0
ja 0x14000ecc0
jmp 0x14000ee2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.WriteFile_fail_0x_lx
lea rcx, [0x140077e88]
call fcn.1400042c0
mov ebx, listen
jmp 0x14000ee2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error__lu_in_WinHttpReadData._n
jmp 0x14000edfe
lea rdx, str.Out_of_memory_n
lea rcx, [0x140077e88]
call fcn.1400042c0
mov rcx, r13
mov dword [rbp - 0x50], 0
mov ebx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000ee4c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.WinHttpQueryDataAvailable_Fails___err:_0x_x
mov r8d, eax
lea rcx, [0x140077e88]
call fcn.1400042c0
mov ebx, 7
jmp 0x14000ee2f
mov ebx, listen
lea rdx, str.Networks_error__result___d
mov r8d, ebx
lea rcx, [0x140077e88]
call fcn.1400042c0
test rdi, rdi
je 0x14000ee3c
mov rcx, rdi
call fcn.140023e64
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000ee4c
mov ebx, recv
mov rcx, qword [rsp + 0x40]
call fcn.14000cc70
mov r13, qword [rsp + 0x320]
mov eax, ebx
mov r12, qword [rsp + 0x310]
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.140023e40
mov rbx, qword [rsp + 0x328]
add rsp, 0x2e0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret