Function at 0x140019840
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Read file via mapping
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x82e0
call fcn.1400fd8d0
sub rsp, rax
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x8330], rbx
mov rax, qword [0x1401423c0]
xor rax, rsp
mov qword [rsp + 0x82d0], rax
mov r14, rdx
mov rdi, rcx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
mov byte [rsp + 0x1c0], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x1c1]
call fcn.1400e1fc0
lea rdx, [rsp + 0x1c0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x1400198d8
mov edx, 0x104
lea rcx, [rsp + 0x1c0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov byte [rsp + 0xb0], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0xb1]
call fcn.1400e1fc0
lea r9, [rsp + 0xb0]
xor r8d, r8d
lea rdx, [0x140112150]
lea rcx, [rsp + 0x1c0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r15 + 1]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r13, rax
test rax, rax
je 0x140019d14
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor edx, edx
lea r8d, [r15 + 2]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r12, rax
test rax, rax
jne 0x140019982
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140019d14
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
jne 0x1400199bd
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140019d14
mov ecx, 8
call fcn.1400cfdb8
test rax, rax
je 0x1400199d6
lea rcx, [rsp + 0x50]
mov qword [rax], rcx
jmp 0x1400199d9
mov rax, r15
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
lea rcx, [rsp + 0x50]
call fcn.14001a050
lea rdx, [rsp + 0x88]
lea rcx, [0x140000000]
mov rax, qword [rcx + 0x112158]
mov qword [rdx], rax
mov eax, dword [rcx + 0x112160]
mov dword [rdx + 8], eax
xor eax, eax
mov dword [rsp + 0x94], eax
mov dword [rsp + 0x98], eax
mov dword [rsp + 0x9c], eax
mov dword [rsp + 0xa0], eax
mov dword [rsp + 0xa4], eax
lea rsi, [rsp + 0x88]
lea ebp, [rax + 9]
nop dword [rax]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x88]
repne scasb al, byte [rdi]
not rcx
lea r9, [rcx - 1]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x88]
mov edx, dword [rsp + 0x40]
mov rcx, rbx
call fcn.140019570
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x88]
repne scasb al, byte [rdi]
not rcx
inc byte [rcx + rsi - 2]
sub rbp, 1
jne 0x140019a50
lea rcx, [rsp + 0x88]
lea rdx, [0x140000000]
mov rax, qword [rdx + 0x112168]
mov qword [rcx], rax
mov eax, dword [rdx + 0x112170]
mov dword [rcx + 8], eax
movzx eax, byte [rdx + 0x112174]
mov byte [rcx + 0xc], al
xor eax, eax
mov qword [rsp + 0x95], rax
mov qword [rsp + 0x9d], rax
mov word [rsp + 0xa5], ax
mov byte [rsp + 0xa7], al
lea rsi, [rsp + 0x88]
lea ebp, [rax + 6]
nop word [rax + rax]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x88]
repne scasb al, byte [rdi]
not rcx
lea r9, [rcx - 1]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x88]
mov edx, dword [rsp + 0x40]
mov rcx, rbx
call fcn.140019570
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x88]
repne scasb al, byte [rdi]
not rcx
inc byte [rcx + rsi - 2]
sub rbp, 1
jne 0x140019b00
lea rcx, [rsp + 0x50]
call fcn.140018bc0
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x40]
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rbp + 1]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
test rax, rax
jne 0x140019bf3
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140019bd5
call fcn.1400cfe04
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov rcx, qword [rsp + 0x50]
call fcn.1400cfe04
jmp 0x140019d14
mov rdi, qword [rsp + 0x70]
sub rdi, qword [rsp + 0x68]
sar rdi, 2
mov rcx, r14
call fcn.140013f00
mov rbx, r15
test edi, edi
je 0x140019ccc
mov edi, edi
nop word [rax + rax]
mov byte [rsp + 0x2d0], 0
xor edx, edx
mov r8d, 0x7fff
lea rcx, [rsp + 0x2d1]
call fcn.1400e1fc0
mov rdx, qword [rsp + 0x70]
mov rax, qword [rsp + 0x68]
sub rdx, rax
sar rdx, 2
cmp rbx, rdx
jb 0x140019c5d
call fcn.1400e4d48
mov rax, qword [rsp + 0x68]
mov eax, dword [rax + rbx*4]
inc eax
shl eax, 0xf
mov dword [rsp + 0x48], eax
mov edx, eax
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x48]
mov r8d, 0x8000
lea rdx, [rsp + 0x2d0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov qword [rsp + 0x20], r14
mov r9d, 8
lea r8, str.http
mov edx, 0x8000
lea rcx, [rsp + 0x2d0]
call fcn.140019210
inc rbx
sub rdi, 1
jne 0x140019c20
mov rcx, r14
call fcn.140018990
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
nop
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140019cfb
call fcn.1400cfe04
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], r15
mov rcx, qword [rsp + 0x50]
call fcn.1400cfe04
mov rcx, qword [rsp + 0x82d0]
xor rcx, rsp
call fcn.1400e2890
mov rbx, qword [rsp + 0x8330]
add rsp, 0x82e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret