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

Disassembly:
push rbx
push r12
push r13
push r14
sub rsp, 0x78
mov rax, qword [0x140073080]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor r12d, r12d
lea r14, [rdx + 0x898]
cmp dword [rdx + 0x860], 1
mov rbx, rdx
mov r13d, r12d
jne 0x14000e02e
lea rdx, str.file_is_already_has_used
lea rcx, [0x140077e88]
call fcn.1400042c0
xor al, al
jmp 0x14000e95d
mov qword [rsp + 0xa0], rbp
mov rax, r12
mov rbp, qword [rdx + 8]
mov qword [rsp + 0xb0], rsi
mov esi, dword [rdx + 0x874]
mov qword [rsp + 0xb8], rdi
mov rdi, qword [rdx + 0x8b8]
mov qword [rsp + 0x70], r15
mov r15d, dword [rdx + 0x85c]
mov qword [rsp + 0x60], rdi
mov dword [rsp + 0x58], r15d
mov dword [rdx + 0x860], 1
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x44], esi
mov qword [rsp + 0x48], rax
cmp qword [rdx + 0x8a8], rax
jne 0x14000e09a
cmp qword [rdx + 0x8c8], rax
je 0x14000e0b6
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 r15d, r15d
je 0x14000e150
cmp qword [0x140073c88], r12
jne 0x14000e0e2
lea rdx, str.no_networkMonitor
lea rcx, [0x140077e88]
call fcn.1400042c0
xor al, al
jmp 0x14000e940
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x10], rax
lea r8, [0x14000df40]
mov rcx, qword [0x140073c88]
mov rdx, rbx
call fcn.14000f850
mov rdi, qword [0x140073c88]
cmp qword [rdi], r12
jne 0x14000e128
cmp dword [rdi + 0x5c], r12d
jne 0x14000e128
mov rcx, rdi
call fcn.14000fc50
cmp dword [rdi + 0x58], 2
jne 0x14000e13a
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14000e148
mov r8d, 3
mov rdx, rbx
call fcn.14000df90
mov rdi, qword [rsp + 0x60]
nop dword [rax]
cmp esi, 1
jle 0x14000e3d4
mov rax, qword [r14]
test rax, rax
jne 0x14000e3c9
mov ebp, r12d
nop dword [rax + rax]
cmp dword [rbx + 0x850], 0
jne 0x14000e670
lea r9, [rbx + 0x648]
mov r8, r14
mov rdx, rbx
call fcn.14000d1c0
cmp qword [r14], 0
mov esi, eax
ja 0x14000e373
mov rdi, qword [0x140073c88]
cmp qword [rdi], 0
jne 0x14000e1b6
cmp dword [rdi + 0x5c], 0
jne 0x14000e1b6
mov rcx, rdi
call fcn.14000fc50
cmp dword [rdi + 0x58], 2
mov rax, qword [rbx + 0x8c8]
jne 0x14000e2be
mov edi, dword [rbx + 0x8e0]
cmp esi, 0x10
jne 0x14000e1fe
mov edi, dword [rbx + 0x8dc]
test rax, rax
je 0x14000e224
cmp dword [rbx + 0x8d8], 4
je 0x14000e1f2
mov rcx, qword [rbx + 0x8d0]
lea edx, [rsi - 0xc]
call rax
mov dword [rbx + 0x8d8], 4
jmp 0x14000e224
test rax, rax
je 0x14000e224
cmp dword [rbx + 0x8d8], 1
je 0x14000e21a
mov rcx, qword [rbx + 0x8d0]
mov edx, 1
call rax
mov dword [rbx + 0x8d8], 1
mov eax, dword [rbx + 0x878]
cmp eax, 0xffffffff
je 0x14000e239
cmp ebp, eax
je 0x14000e670
inc ebp
mov r8d, ebp
lea rdx, str.retry_network__d
lea rcx, [0x140077e88]
call fcn.1400042c0
mov rax, qword [rbx + 0x28]
test rax, rax
jne 0x14000e297
xor r9d, r9d
lea edx, [rax + 1]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x28], rax
test rax, rax
jne 0x14000e297
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.NetWorkSleepEvent_create_fail
lea rcx, [0x140077e88]
call fcn.1400042c0
mov rax, qword [rbx + 0x28]
test rax, rax
je 0x14000e2b1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [rbx + 0x28]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x14000e170
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x14000e170
mov edi, dword [rbx + 0x8e4]
test rax, rax
je 0x14000e2ea
cmp dword [rbx + 0x8d8], 3
je 0x14000e2e0
mov rcx, qword [rbx + 0x8d0]
mov edx, 3
call rax
mov dword [rbx + 0x8d8], 3
test r15d, r15d
je 0x14000e670
lea rdx, str.WaitForSingleObject_file_size
lea rcx, [0x140077e88]
call fcn.1400042c0
mov rcx, qword [rbx + 0x10]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, [0x140077e88]
cmp eax, 0x102
je 0x14000e664
lea rdx, str.get_WaitForSingleObject_file_size
call fcn.1400042c0
cmp dword [rbx + 0x850], 0
jne 0x14000e670
mov rax, qword [rbx + 0x8c8]
test rax, rax
je 0x14000e170
cmp dword [rbx + 0x8d8], 2
je 0x14000e364
mov rcx, qword [rbx + 0x8d0]
mov edx, 2
call rax
mov dword [rbx + 0x8d8], 2
jmp 0x14000e170
mov rax, qword [rbx + 0x8c8]
test rax, rax
je 0x14000e39a
cmp dword [rbx + 0x8d8], 0
je 0x14000e393
mov rcx, qword [rbx + 0x8d0]
xor edx, edx
call rax
mov dword [rbx + 0x8d8], r12d
cmp dword [rbx + 0x864], 0
jne 0x14000e3b8
mov esi, 1
mov dword [rbx + 0x874], 1
mov dword [rsp + 0x44], esi
jmp 0x14000e3bc
mov esi, dword [rsp + 0x44]
mov rax, qword [r14]
mov rdi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x50]
xor edx, edx
movsxd rcx, esi
div rcx
mov r13, rax
mov r8, r13
lea rdx, str.start_download_getsize_after__lu
lea rcx, [0x140077e88]
call fcn.1400042c0
xor eax, eax
mov byte [rsp + 0x40], 1
mov edx, eax
test esi, esi
jle 0x14000e4db
mov r14, rbp
add rdi, 0x18
lea ebp, [rdx + 1]
mov qword [rdi], rax
movsxd rcx, ebp
mov qword [rdi + 8], rcx
cmp qword [rbx + 0x898], 0
jbe 0x14000e448
movsxd rax, edx
imul rax, r13
mov qword [rdi - 0x18], rax
lea eax, [rsi - 1]
cmp edx, eax
je 0x14000e431
imul rcx, r13
jmp 0x14000e438
mov rcx, qword [rbx + 0x898]
lea rax, [rcx - 1]
mov qword [rdi - 0x10], rax
mov rax, qword [rdi - 0x18]
mov qword [rdi - 8], rax
mov r9d, edx
mov qword [rdi + 0x218], rbx
lea rdx, str._s.dat_d
lea r8, [rbx + 0x440]
lea rcx, [rdi + 0x10]
call fcn.140001d70
lea rcx, [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000e48e
test al, 0x10
jne 0x14000e48e
lea rcx, [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x14000e677
xor eax, eax
lea r9, [rdi - 0x18]
mov qword [rsp + 0x28], rax
lea r8, [0x14000d930]
xor edx, edx
mov dword [rsp + 0x20], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, dword [rsp + 0x44]
add rdi, 0x248
mov qword [r14], rax
mov edx, ebp
add r14, 8
mov eax, 0
cmp ebp, esi
jl 0x14000e402
mov r15d, dword [rsp + 0x58]
lea r14, [rbx + 0x898]
cmp qword [rbx + 0x8a8], 0
mov esi, dword [rbx + 0x8d8]
jne 0x14000e4f9
cmp qword [rbx + 0x8c8], 0
je 0x14000e5a6
mov rbp, qword [rsp + 0x48]
mov edx, 0xffffffff
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rbx + 0x854], 0
jne 0x14000e59f
nop dword [rax]
mov rax, qword [rbx + 0x8c8]
test rax, rax
je 0x14000e545
mov edx, dword [rbx + 0x8d8]
cmp esi, edx
je 0x14000e545
mov rcx, qword [rbx + 0x8d0]
call rax
mov esi, dword [rbx + 0x8d8]
cmp dword [rbx + 0x858], 0
jne 0x14000e5ab
cmp qword [r14], 0
je 0x14000e588
mov rdx, rbx
call fcn.14000d9b0
mov rdi, rax
cmp r12, rax
je 0x14000e57f
mov rax, qword [rbx + 0x8a8]
test rax, rax
je 0x14000e57c
mov rcx, qword [rbx + 0x8b0]
mov rdx, rdi
call rax
mov r12, rdi
cmp rdi, qword [rbx + 0x890]
je 0x14000e5ab
mov edx, 0xffffffff
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [rbx + 0x854], 0
je 0x14000e520
mov byte [rsp + 0x40], 0
jmp 0x14000e5ab
mov rbp, qword [rsp + 0x48]
mov esi, dword [rsp + 0x44]
mov r9d, 0xffffffff
mov rdx, qword [rsp + 0x50]
mov ecx, esi
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
lea rdx, str.leave_all_threads
lea rcx, [0x140077e88]
call fcn.1400042c0
cmp dword [rbx + 0x854], 0
jne 0x14000e5ed
cmp dword [rbx + 0x858], 0
je 0x14000e62e
mov r12, qword [rsp + 0x60]
test esi, esi
jle 0x14000e633
lea rdi, [r12 + 0x28]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000e61b
test al, 0x10
jne 0x14000e61b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
add rdi, 0x248
sub rsi, 1
jne 0x14000e600
mov esi, dword [rsp + 0x44]
jmp 0x14000e633
mov r12, qword [rsp + 0x60]
cmp dword [rbx + 0x858], 0
je 0x14000e67e
xor r12d, r12d
mov rcx, rbp
mov qword [r14], r12
mov word [rbx + 0x648], r12w
mov dword [rbx + 0x858], r12d
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rbp, qword [rsp + 0x50]
jmp 0x14000e148
lea rdx, str.WaitForSingleObject_file_size_Timeout
call fcn.1400042c0
xor al, al
jmp 0x14000e940
xor bl, bl
jmp 0x14000e93d
cmp dword [rbx + 0x854], 0
jne 0x14000e677
mov rcx, qword [rbx + 0x8b8]
xor r9d, r9d
mov qword [rsp + 0x30], 0
add rcx, 0x28
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea edx, [r9 + 4]
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
movsxd rcx, esi
mov esi, 0x4000000
mov r14, rax
imul rdx, rcx, 0x248
mov rcx, qword [rdx + r12 - 0x230]
cmp rcx, rsi
cmovb rsi, rcx
mov rcx, rsi
call fcn.140024144
mov rdi, rax
test rax, rax
jne 0x14000e709
nop dword [rax]
shr rsi, 1
cmp rsi, 1
je 0x14000e732
mov rcx, rsi
call fcn.140024144
mov rdi, rax
test rax, rax
je 0x14000e6f0
cmp r14, 0xffffffffffffffff
jne 0x14000e74c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.open_file_fail__lu
lea rcx, [0x140077e88]
call fcn.1400042c0
xor bl, bl
jmp 0x14000e930
lea rdx, str.no_memory
lea rcx, [0x140077e88]
call fcn.1400042c0
xor bl, bl
jmp 0x14000e8de
mov r15d, 1
cmp dword [rsp + 0x44], r15d
jle 0x14000e870
nop dword [rax]
mov rcx, qword [rbx + 0x8b8]
xor r9d, r9d
movsxd rax, r15d
add rcx, 0x28
imul r13, rax, 0x248
mov qword [rsp + 0x30], 0
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
lea r8d, [r9 + 1]
add rcx, r13
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14000e8b9
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], 0
mov r8d, esi
mov rdx, rdi
mov rcx, rax
mov r12b, 1
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000e821
mov r8d, dword [rsp + 0x58]
test r8d, r8d
je 0x14000e840
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], 0
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000e8a7
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], 0
mov r8d, esi
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000e7d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error_ReadFile___lx
mov r8d, eax
lea rcx, [0x140077e88]
call fcn.140004170
xor r12b, r12b
mov rcx, rbp
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 r12b, r12b
je 0x14000e8d9
inc r15d
cmp r15d, dword [rsp + 0x44]
jl 0x14000e760
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x440]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000e8ef
test al, 0x10
jne 0x14000e8ef
lea rcx, [rbx + 0x440]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14000e8ef
xor bl, bl
jmp 0x14000e930
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.WriteFile_error___lx
jmp 0x14000e82e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.open_file_fail__lu
lea rcx, [0x140077e88]
call fcn.1400042c0
xor bl, bl
jmp 0x14000e8de
movzx ebx, byte [rsp + 0x40]
cmp r14, 0xffffffffffffffff
je 0x14000e930
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000e930
mov rcx, qword [rbx + 0x8b8]
lea rdx, [rbx + 0x440]
add rcx, 0x28
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x14000e92b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.MoveFile_fail__lu
lea rcx, [0x140077e88]
call fcn.1400042c0
xor bl, bl
jmp 0x14000e930
movzx ebx, byte [rsp + 0x40]
test rdi, rdi
je 0x14000e93d
mov rcx, rdi
call fcn.140023e64
movzx eax, bl
mov rdi, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0xb0]
mov rbp, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140023e40
add rsp, 0x78
pop r14
pop r13
pop r12
pop rbx
ret