Function at 0x14000ffa0
Capabilities:
Check if file exists
Create thread
Delete file
Get file attributes
Move file
Read file on windows
Write file on windows

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov qword [rax - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14006a080]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbx, rdx
xor r12d, r12d
mov r13d, r12d
lea rsi, [rdx + 0x898]
cmp dword [rdx + 0x860], 1
jne 0x140010011
xor edx, edx
xor ecx, ecx
call fcn.140003ed0
mov rcx, rax
lea rdx, str.file_is_already_has_used
call fcn.140005c50
xor al, al
jmp 0x140010b84
mov dword [rdx + 0x860], 1
mov rax, qword [rdx + 8]
mov qword [rsp + 0x50], rax
mov rdi, qword [rdx + 0x8b8]
mov qword [rsp + 0x78], rdi
mov ebp, dword [rdx + 0x874]
mov dword [rsp + 0x44], ebp
mov r14d, dword [rdx + 0x85c]
mov dword [rsp + 0x70], r14d
mov qword [rsp + 0x48], r12
cmp qword [rdx + 0x8a8], r12
jne 0x14001005d
cmp qword [rdx + 0x8c8], r12
je 0x140010079
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsp + 0x48], rax
mov qword [rbx + 0x8c0], rax
test r14d, r14d
je 0x140010113
xor ecx, ecx
cmp qword [0x14006ad88], r12
jne 0x1400100aa
xor edx, edx
call fcn.140003ed0
mov rcx, rax
lea rdx, str.no_networkMonitor
call fcn.140005c50
xor al, al
jmp 0x140010b84
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x10], rax
lea r8, [0x14000fe50]
mov rdx, rbx
mov rcx, qword [0x14006ad88]
call fcn.140011bf0
mov rdi, qword [0x14006ad88]
cmp qword [rdi], r12
jne 0x1400100ee
cmp dword [rdi + 0x5c], r12d
jne 0x1400100ee
mov rcx, rdi
call fcn.140012020
cmp dword [rdi + 0x58], 2
jne 0x140010100
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14001010e
mov r8d, 3
mov rdx, rbx
call fcn.14000feb0
mov rdi, qword [rsp + 0x78]
mov r15d, 4
nop dword [rax]
cmp ebp, 1
jle 0x14001036f
mov rax, qword [rsi]
test rax, rax
jne 0x140010364
mov ebp, r12d
nop dword [rax + rax]
cmp dword [rbx + 0x850], 0
jne 0x14001000a
lea r9, [rbx + 0x648]
mov r8, rsi
mov rdx, rbx
call fcn.14000f010
mov esi, eax
cmp qword [rbx + 0x898], 0
ja 0x14001030c
mov rdi, qword [0x14006ad88]
cmp qword [rdi], 0
jne 0x14001018a
cmp dword [rdi + 0x5c], 0
jne 0x14001018a
mov rcx, rdi
call fcn.140012020
mov rax, qword [rbx + 0x8c8]
cmp dword [rdi + 0x58], 2
jne 0x14001023f
mov edi, dword [rbx + 0x8e0]
cmp esi, 0x10
jne 0x1400101d2
mov edi, dword [rbx + 0x8dc]
test rax, rax
je 0x1400101f8
cmp dword [rbx + 0x8d8], 4
je 0x1400101c6
lea edx, [rsi - 0xc]
mov rcx, qword [rbx + 0x8d0]
call rax
mov dword [rbx + 0x8d8], 4
jmp 0x1400101f8
test rax, rax
je 0x1400101f8
cmp dword [rbx + 0x8d8], 1
je 0x1400101ee
mov edx, 1
mov rcx, qword [rbx + 0x8d0]
call rax
mov dword [rbx + 0x8d8], 1
mov eax, dword [rbx + 0x878]
cmp eax, 0xffffffff
je 0x14001020d
cmp ebp, eax
je 0x14001000a
inc ebp
xor edx, edx
xor ecx, ecx
call fcn.140003ed0
mov rcx, rax
mov r8d, ebp
lea rdx, str.retry_network__d
call fcn.140005c50
mov r8d, edi
mov rdx, rbx
call fcn.14000ff00
lea rsi, [rbx + 0x898]
jmp 0x140010140
mov edi, dword [rbx + 0x8e4]
test rax, rax
je 0x14001026b
cmp dword [rbx + 0x8d8], 3
je 0x140010261
mov edx, 3
mov rcx, qword [rbx + 0x8d0]
call rax
mov dword [rbx + 0x8d8], 3
test r14d, r14d
je 0x14001000a
xor edx, edx
xor ecx, ecx
call fcn.140003ed0
mov rcx, rax
lea rdx, str.WaitForSingleObject_file_size
call fcn.140005c50
mov edx, edi
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
xor ecx, ecx
cmp eax, 0x102
je 0x1400106d0
call fcn.140003ed0
mov rcx, rax
lea rdx, str.get_WaitForSingleObject_file_size
call fcn.140005c50
cmp dword [rbx + 0x850], 0
jne 0x14001000a
mov rax, qword [rbx + 0x8c8]
test rax, rax
lea rsi, [rbx + 0x898]
je 0x140010140
cmp dword [rbx + 0x8d8], 2
je 0x1400102f6
mov edx, 2
mov rcx, qword [rbx + 0x8d0]
call rax
mov dword [rbx + 0x8d8], 2
lea rsi, [rbx + 0x898]
jmp 0x140010140
mov rax, qword [rbx + 0x8c8]
test rax, rax
je 0x140010333
cmp dword [rbx + 0x8d8], 0
je 0x14001032c
xor edx, edx
mov rcx, qword [rbx + 0x8d0]
call rax
mov dword [rbx + 0x8d8], r12d
cmp dword [rbx + 0x864], 0
jne 0x140010351
mov dword [rbx + 0x874], 1
mov ebp, 1
mov dword [rsp + 0x44], ebp
jmp 0x140010355
mov ebp, dword [rsp + 0x44]
lea rsi, [rbx + 0x898]
mov rax, qword [rsi]
mov rdi, qword [rsp + 0x78]
xor edx, edx
movsxd rcx, ebp
div rcx
mov r13, rax
mov qword [rsp + 0x58], r15
mov rax, qword gs:[0x58]
mov r14, qword [rax]
mov qword [rsp + 0x60], r14
mov eax, dword [r14 + r15]
cmp dword [0x14006e6c0], eax
jle 0x1400103e0
lea rcx, [0x14006e6c0]
call fcn.140020000
cmp dword [0x14006e6c0], 0xffffffff
jne 0x1400103e0
xor eax, eax
mov qword [0x14006e6a8], rax
mov qword [0x14006e6b0], rax
mov qword [0x14006e6b8], rax
xor r8d, r8d
xor edx, edx
call fcn.140003f70
lea rcx, [0x140046cf0]
call fcn.1400203cc
nop
lea rcx, [0x14006e6c0]
call fcn.14001ffa0
mov r8, r13
lea rdx, str.start_download_getsize_after__lu
lea rcx, [0x14006e6a8]
call fcn.140005c50
mov byte [rsp + 0x40], 1
xor eax, eax
mov r8d, eax
test ebp, ebp
jle 0x1400104ef
mov r14, qword [rsp + 0x50]
add rdi, 8
lea ebp, [r8 + 1]
movsxd rcx, ebp
mov qword [rdi + 0x18], rcx
mov qword [rdi + 0x10], rax
cmp qword [rsi], 0
jbe 0x140010455
movsxd rdx, r8d
imul rdx, r13
mov qword [rdi - 8], rdx
mov eax, dword [rsp + 0x44]
dec eax
cmp r8d, eax
je 0x140010448
imul rcx, r13
dec rcx
mov qword [rdi], rcx
jmp 0x140010451
mov rax, qword [rsi]
dec rax
mov qword [rdi], rax
mov qword [rdi + 8], rdx
mov qword [rdi + 0x228], rbx
mov r9d, r8d
lea r8, [rbx + 0x440]
lea rdx, str._s.dat_d
lea rcx, [rdi + 0x20]
call fcn.140001d30
lea rcx, [rdi + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001049b
test al, 0x10
jne 0x14001049b
lea rcx, [rdi + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1400106eb
lea r9, [rdi - 8]
xor eax, eax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
lea r8, [0x14000f840]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [r14], rax
mov r8d, ebp
add rdi, 0x248
add r14, 8
mov ebp, dword [rsp + 0x44]
cmp r8d, ebp
lea rsi, [rbx + 0x898]
mov eax, 0
jl 0x140010411
mov r14, qword [rsp + 0x60]
mov r15, qword [rsp + 0x58]
mov esi, dword [rbx + 0x8d8]
cmp qword [rbx + 0x8a8], 0
jne 0x14001050d
cmp qword [rbx + 0x8c8], 0
je 0x1400105be
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rbx + 0x854], 0
jne 0x1400105b9
nop word [rax + rax]
mov rax, qword [rbx + 0x8c8]
test rax, rax
je 0x140010555
mov edx, dword [rbx + 0x8d8]
cmp esi, edx
je 0x140010555
mov rcx, qword [rbx + 0x8d0]
call rax
mov esi, dword [rbx + 0x8d8]
cmp dword [rbx + 0x858], 0
jne 0x1400105be
cmp qword [rbx + 0x898], 0
je 0x14001059c
mov rdx, rbx
call fcn.14000f8c0
mov rdi, rax
cmp r12, rax
je 0x140010593
mov rax, qword [rbx + 0x8a8]
test rax, rax
je 0x140010590
mov rdx, rdi
mov rcx, qword [rbx + 0x8b0]
call rax
mov r12, rdi
cmp rdi, qword [rbx + 0x890]
je 0x1400105be
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rbx + 0x854], 0
je 0x140010530
mov byte [rsp + 0x40], 0
mov r9d, 0xffffffff
mov r8d, 1
mov rdx, qword [rsp + 0x50]
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov eax, dword [r14 + r15]
cmp dword [0x14006e6c0], eax
jle 0x140010632
lea rcx, [0x14006e6c0]
call fcn.140020000
cmp dword [0x14006e6c0], 0xffffffff
jne 0x140010632
xor eax, eax
mov qword [0x14006e6a8], rax
mov qword [0x14006e6b0], rax
mov qword [0x14006e6b8], rax
xor r8d, r8d
xor edx, edx
call fcn.140003f70
lea rcx, [0x140046cf0]
call fcn.1400203cc
nop
lea rcx, [0x14006e6c0]
call fcn.14001ffa0
lea rdx, str.leave_all_threads
lea rcx, [0x14006e6a8]
call fcn.140005c50
cmp dword [rbx + 0x854], 0
jne 0x140010657
cmp dword [rbx + 0x858], 0
je 0x140010691
mov r12, qword [rsp + 0x78]
test ebp, ebp
jle 0x140010696
lea rdi, [r12 + 0x28]
mov esi, ebp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140010682
test al, 0x10
jne 0x140010682
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
add rdi, 0x248
sub rsi, 1
jne 0x140010667
jmp 0x140010696
mov r12, qword [rsp + 0x78]
cmp dword [rbx + 0x858], 0
je 0x1400106f2
lea rsi, [rbx + 0x898]
xor r12d, r12d
mov qword [rsi], r12
mov word [rbx + 0x648], r12w
mov dword [rbx + 0x858], r12d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov r14d, dword [rsp + 0x70]
jmp 0x14001010e
call fcn.140003ed0
mov rcx, rax
lea rdx, str.WaitForSingleObject_file_size_Timeout
call fcn.140005c50
xor al, al
jmp 0x140010b84
xor bl, bl
jmp 0x140010b81
cmp dword [rbx + 0x854], 0
jne 0x1400106eb
mov rcx, qword [rbx + 0x8b8]
add rcx, 0x28
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea edx, [r9 + 4]
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
movsxd rcx, ebp
imul rdx, rcx, 0x248
mov rcx, qword [rdx + r12 - 0x230]
mov ebp, 0x4000000
cmp rcx, rbp
cmovb rbp, rcx
mov rcx, rbp
call fcn.14001fdb4
mov rsi, rax
test rax, rax
jne 0x14001077e
shr rbp, 1
cmp rbp, 1
je 0x140010816
mov rcx, rbp
call fcn.14001fdb4
mov rsi, rax
test rax, rax
je 0x140010761
cmp r15, 0xffffffffffffffff
jne 0x140010890
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + rcx]
cmp dword [0x14006e6c0], eax
jle 0x1400107f3
lea rcx, [0x14006e6c0]
call fcn.140020000
cmp dword [0x14006e6c0], r15d
jne 0x1400107f3
xor eax, eax
mov qword [0x14006e6a8], rax
mov qword [0x14006e6b0], rax
mov qword [0x14006e6b8], rax
xor r8d, r8d
xor edx, edx
call fcn.140003f70
lea rcx, [0x140046cf0]
call fcn.1400203cc
nop
lea rcx, [0x14006e6c0]
call fcn.14001ffa0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.open_file_fail__lu
lea rcx, [0x14006e6a8]
call fcn.140005c50
xor bl, bl
jmp 0x140010b74
mov eax, 4
mov ecx, dword [rax + r14]
cmp dword [0x14006e6c0], ecx
jle 0x140010876
lea rcx, [0x14006e6c0]
call fcn.140020000
cmp dword [0x14006e6c0], 0xffffffff
jne 0x140010876
xor eax, eax
mov qword [0x14006e6a8], rax
mov qword [0x14006e6b0], rax
mov qword [0x14006e6b8], rax
xor r8d, r8d
xor edx, edx
call fcn.140003f70
lea rcx, [0x140046cf0]
call fcn.1400203cc
nop
lea rcx, [0x14006e6c0]
call fcn.14001ffa0
lea rdx, str.no_memory
lea rcx, [0x14006e6a8]
call fcn.140005c50
xor bl, bl
jmp 0x140010aac
mov r12d, 1
cmp dword [rsp + 0x44], r12d
jle 0x1400109bc
movsxd rax, r12d
imul r13, rax, 0x248
mov rcx, qword [rbx + 0x8b8]
add rcx, 0x28
add rcx, r13
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140010a1c
mov dil, 1
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov r8d, ebp
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140010962
mov r8d, dword [rsp + 0x70]
test r8d, r8d
je 0x140010988
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x78]
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400109ff
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov r8d, ebp
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140010915
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor edx, edx
xor ecx, ecx
call fcn.140003ed0
lea rdx, str.Error_ReadFile___lx
mov r8d, edi
mov rcx, rax
call fcn.140005b00
xor dil, dil
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x8b8]
lea rcx, [rax + 0x28]
add rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test dil, dil
je 0x140010aa7
inc r12d
cmp r12d, dword [rsp + 0x44]
jl 0x1400108a1
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x440]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140010ac4
test al, 0x10
jne 0x140010ac4
lea rcx, [rbx + 0x440]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140010ac4
xor bl, bl
jmp 0x140010b74
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor edx, edx
xor ecx, ecx
call fcn.140003ed0
lea rdx, str.WriteFile_error___lx
jmp 0x14001097a
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x14006e6c0], eax
jle 0x140010a87
lea rcx, [0x14006e6c0]
call fcn.140020000
cmp dword [0x14006e6c0], 0xffffffff
jne 0x140010a87
xor eax, eax
mov qword [0x14006e6a8], rax
mov qword [0x14006e6b0], rax
mov qword [0x14006e6b8], rax
xor r8d, r8d
xor edx, edx
call fcn.140003f70
lea rcx, [0x140046cf0]
call fcn.1400203cc
nop
lea rcx, [0x14006e6c0]
call fcn.14001ffa0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.open_file_fail__lu
lea rcx, [0x14006e6a8]
call fcn.140005c50
xor bl, bl
jmp 0x140010aac
movzx ebx, byte [rsp + 0x40]
cmp r15, 0xffffffffffffffff
je 0x140010b74
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140010b74
mov rcx, qword [rbx + 0x8b8]
add rcx, 0x28
lea rdx, [rbx + 0x440]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x140010b6f
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x14006e6c0], eax
jle 0x140010b4f
lea rcx, [0x14006e6c0]
call fcn.140020000
cmp dword [0x14006e6c0], 0xffffffff
jne 0x140010b4f
xor eax, eax
mov qword [0x14006e6a8], rax
mov qword [0x14006e6b0], rax
mov qword [0x14006e6b8], rax
xor r8d, r8d
xor edx, edx
call fcn.140003f70
lea rcx, [0x140046cf0]
call fcn.1400203cc
nop
lea rcx, [0x14006e6c0]
call fcn.14001ffa0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.MoveFile_fail__lu
lea rcx, [0x14006e6a8]
call fcn.140005c50
xor bl, bl
jmp 0x140010b74
movzx ebx, byte [rsp + 0x40]
test rsi, rsi
je 0x140010b81
mov rcx, rsi
call fcn.14001fad4
movzx eax, bl
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14001fab0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret