Function at 0x140031420
Capabilities:
Check if file exists
Delete file
Get file attributes
Read file on windows

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x2580]
mov eax, 0x2680
call fcn.14006f190
sub rsp, rax
mov rax, qword [0x1400d1608]
xor rax, rsp
mov qword [rbp + 0x2560], rax
cmp dword [rcx + 0x72c], 0
mov rbx, rcx
mov dword [rsp + 0x44], edx
jne 0x1400314af
mov rdi, qword [0x1400d22d8]
test rdi, rdi
je 0x1400314af
cmp rdi, rbx
je 0x1400314a3
lea rdx, [rdi + 0x410]
mov r8d, 0x100
lea rcx, [rbx + 0x410]
call fcn.14006af20
test eax, eax
jne 0x1400314a3
lea rdx, [rdi + 0x10]
mov r8d, 0x400
lea rcx, [rbx + 0x10]
call fcn.14006af20
test eax, eax
je 0x14003152e
mov rdi, qword [rdi + 0x8c0]
test rdi, rdi
jne 0x140031466
movsxd rax, dword [rbx + 0xc]
mov qword [rsp + 0x26b8], r13
mov qword [rsp + 0x2670], r15
test eax, eax
je 0x1400314e2
cmp byte [rbx + rax + 0xf], 0x5c
je 0x1400314e2
mov byte [rax + rbx + 0x10], 0x5c
movsxd rcx, dword [rbx + 0xc]
lea eax, [rcx + 1]
mov dword [rbx + 0xc], eax
mov byte [rcx + rbx + 0x11], 0
lea r13, [rbx + 0x410]
mov edx, 0x400
lea r9, [rbx + 0x10]
mov qword [rsp + 0x20], r13
lea r8, [0x1400c3fa0]
lea rcx, [rbp + 0x560]
call fcn.140044c10
cmp eax, 0x3ff
jl 0x14003154f
lea rdx, [rbp + 0x560]
lea rcx, [0x1400c3fa8]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f50
lea r8, [rdi + 0x410]
lea rdx, [rdi + 0x10]
lea rcx, str._s_s_is_already_targeted_by_a_transaction._r_n
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f60
lea rax, [rbp + 0x1d60]
mov dword [rsp + 0x28], 0x400
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x560]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1400315c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400315a6
lea r8, [rbp + 0x560]
mov edx, 0x400
lea rcx, str.String_too_long:__.s_r_n
call fcn.140020ee0
jmp 0x1400315c7
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c2b70]
call fcn.140020ee0
lea rcx, [rbp + 0x1d60]
mov qword [rsp + 0x26a8], rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400315e8
mov esi, 1
jmp 0x14003163c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
add eax, 0xfffffffe
cmp eax, 1
jbe 0x14003163a
lea rdx, [rbp + 0x1d60]
lea rcx, [0x1400c3fc0]
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c3fd8]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f48
xor esi, esi
mov qword [rsp + 0x26b0], r12
lea r8, str._s.TMP
lea r12, [rbx + 0x510]
mov r9, r13
mov rcx, r12
mov edx, 0x100
call fcn.140044c10
cmp eax, 0xff
jl 0x140031682
mov rdx, r12
lea rcx, [0x1400c3fe8]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f40
lea r9, [rbx + 0x10]
mov qword [rsp + 0x20], r12
lea r8, [0x1400c3ffc]
mov edx, 0x400
lea rcx, [rbp + 0x160]
call fcn.140044c10
cmp eax, 0x3ff
jl 0x1400316c7
lea rdx, [rbp + 0x160]
lea rcx, [0x1400c4008]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f40
lea rax, [rbp + 0x1560]
mov dword [rsp + 0x28], 0x400
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x160]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x14003173f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14003171e
lea r8, [rbp + 0x160]
mov edx, 0x400
lea rcx, str.String_too_long:__.s_r_n
call fcn.140020ee0
jmp 0x14003173f
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c2b70]
call fcn.140020ee0
lea rcx, [rbp + 0x1560]
mov qword [rsp + 0x2678], r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140031761
mov r14d, 1
jmp 0x1400317b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
add eax, 0xfffffffe
cmp eax, 1
jbe 0x1400317b3
lea rdx, [rbp + 0x1560]
lea rcx, [0x1400c4020]
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c4038]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f38
xor r14d, r14d
lea rdi, [rbx + 0x610]
mov r9, r13
mov rcx, rdi
lea r8, str._s.CHK
mov edx, 0x100
call fcn.140044c10
cmp eax, 0xff
jl 0x1400317f4
mov rdx, rdi
lea rcx, [0x1400c4048]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f38
lea r9, [rbx + 0x10]
mov qword [rsp + 0x20], rdi
lea r8, [0x1400c405c]
mov edx, 0x400
lea rcx, [rbp + 0x960]
call fcn.140044c10
cmp eax, 0x3ff
jl 0x140031839
lea rdx, [rbp + 0x960]
lea rcx, [0x1400c4068]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f38
mov r8d, 0x400
lea rdx, [rbp + 0xd60]
lea rcx, [rbp + 0x960]
call fcn.14002d120
lea rcx, [rbp + 0xd60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14003186c
mov r15d, 1
jmp 0x1400318c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
add eax, 0xfffffffe
cmp eax, 1
jbe 0x1400318be
lea rdx, [rbp + 0xd60]
lea rcx, str.Error_accessing__S_r_n
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c4098]
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f38
xor r15d, r15d
test esi, esi
je 0x1400318ce
cmp dword [rbx + 0x72c], 0
je 0x14003191c
test r14d, r14d
je 0x1400318e5
cmp dword [rbx + 0x724], 0
jne 0x1400318e5
cmp dword [rbx + 0x72c], 0
je 0x14003191c
test r15d, r15d
je 0x140031d7b
cmp dword [rbx + 0x728], 0
jne 0x140031d7b
cmp dword [rbx + 0x72c], 0
jne 0x140031d7b
mov rax, qword [rbx + 0x900]
cmp byte [rax + 0x1c0], 0
jne 0x140031d7b
mov edi, dword [rsp + 0x44]
test edi, edi
jne 0x1400319a1
call fcn.14002abc0
test esi, esi
je 0x140031a26
cmp dword [rbx + 0x72c], 0
jne 0x14003194f
cmp dword [0x1400bc464], 0
je 0x1400319ae
lea rcx, str.Limit_Prompts:_selecting__Yes__for__Overwrite_target_file___r_n
call fcn.140020ee0
lea rcx, [rbp + 0x1d60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140031a26
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0x1d60]
mov dword [rsp + 0x40], eax
lea rcx, [0x1400c4170]
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
lea rcx, [0x1400c4184]
jmp 0x140031ddd
cmp edi, 2
jne 0x140031929
lea eax, [rdi - 4]
jmp 0x140031f38
cmp dword [rbx + 0x718], 0
lea rax, str._s_already_exists.__Overwrite_it_
lea r8, [0x1400c40e0]
mov edx, 0x100
cmove r8, rax
lea r9, [rbx + 0x410]
lea rcx, [rbp + 0x60]
call fcn.140044c10
mov r8d, 0x2114
mov dword [rbx + 0x71c], 1
lea rdx, str.Overwrite_target_file_
lea rcx, [rbp + 0x60]
call fcn.14002d1f0
mov dword [rsp + 0x40], eax
mov dword [rbx + 0x71c], 0
cmp eax, 6
je 0x14003194f
lea rdx, [rbp + 0x560]
lea rcx, [0x1400c4148]
jmp 0x140031de0
test r14d, r14d
je 0x140031c6b
test r15d, r15d
jne 0x140031b22
cmp dword [rbx + 0x72c], r15d
jne 0x140031ad0
cmp dword [0x1400bc464], r15d
je 0x140031a5c
lea rcx, str.Limit_Prompts:_selecting__Yes__for__Overwrite_partial_file___r_n
call fcn.140020ee0
jmp 0x140031ad0
cmp dword [rbx + 0x718], 0
lea rax, [0x1400c41f8]
lea r8, str.A_NEW__s_has_appeared.__Overwrite_it_
mov edx, 0x100
cmove r8, rax
lea r9, [rbx + 0x510]
lea rcx, [rbp + 0x60]
call fcn.140044c10
mov r8d, 0x2114
mov dword [rbx + 0x71c], 1
lea rdx, str.Overwrite_partial_file_
lea rcx, [rbp + 0x60]
call fcn.14002d1f0
mov dword [rsp + 0x40], eax
mov dword [rbx + 0x71c], 0
cmp eax, 6
je 0x140031ad0
lea rdx, [rbx + 0x510]
lea rcx, [0x1400c4250]
jmp 0x140031de0
lea rcx, [rbp + 0x1560]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140031c6b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0x1560]
mov dword [rsp + 0x40], eax
lea rcx, [0x1400c4278]
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
lea rcx, [0x1400c428c]
jmp 0x140031ddd
cmp dword [rbx + 0x728], 0
jne 0x140031c6b
cmp dword [rbx + 0x72c], 0
jne 0x140031c6b
mov rax, qword [rbx + 0x900]
cmp byte [rax + 0x1c0], 0
je 0x140031be1
cmp dword [0x1400bc464], 0
je 0x140031b72
lea rcx, str.Limit_Prompts:_selecting__Yes__for__Restart_download___r_n
call fcn.140020ee0
mov dword [rsp + 0x40], 7
jmp 0x140031cd4
mov r9, r12
lea r8, str.Partial_download__s_exists__but_cannot_be_resumed.__Delete_it_
mov edx, 0x100
lea rcx, [rbp + 0x60]
call fcn.140044c10
mov r8d, 0x2014
mov dword [rbx + 0x71c], 1
lea rdx, str.Restart_download_
lea rcx, [rbp + 0x60]
call fcn.14002d1f0
mov dword [rbx + 0x71c], 0
cmp eax, 6
jne 0x140031bc6
mov dword [rsp + 0x40], 7
jmp 0x140031cd4
mov dword [rsp + 0x40], 2
lea rdx, [rbp + 0x160]
lea rcx, str.Canceling_GET_because_of_existing__s_r_n
jmp 0x140031de0
cmp dword [0x1400bc464], 0
je 0x140031c00
lea rcx, str.Limit_Prompts:_selecting__Yes__for__Resume_download___r_n
call fcn.140020ee0
mov dword [rsp + 0x40], 6
jmp 0x140031c61
cmp dword [rbx + 0x718], 0
lea rax, str.Resume_partial_download__s__nYes_to_resume__No_to_overwrite__Cancel_to_abort
lea r8, str.A_NEW__s_has_appeared.__Try_to_resume_it_
mov edx, 0x100
cmove r8, rax
lea r9, [rbx + 0x510]
lea rcx, [rbp + 0x60]
call fcn.140044c10
mov r8d, 0x2013
mov dword [rbx + 0x71c], 1
lea rdx, str.Resume_partial_download_
lea rcx, [rbp + 0x60]
call fcn.14002d1f0
mov dword [rsp + 0x40], eax
mov dword [rbx + 0x71c], 0
cmp eax, 6
jne 0x140031ccb
mov dword [rbx + 0x728], 1
test edi, edi
jne 0x140031c77
lea ecx, [rdi + 1]
call fcn.14002ab30
cmp dword [rbx + 0x72c], 0
jne 0x140031c85
call fcn.14002e620
cmp dword [rbx + 0x728], 0
jle 0x140031f2c
test r15d, r15d
jne 0x140031e00
test r14d, r14d
je 0x140031f2c
lea r9, [rbp + 0x960]
mov rdx, r13
lea r8, [rbp + 0x160]
lea rcx, str.Unable_to_resume__s_because__s_or__s_went_missing_r_n
call fcn.140020ee0
mov eax, 0xffffffff
jmp 0x140031f38
cmp eax, 7
jne 0x140031bce
lea rcx, [rbp + 0x1560]
mov dword [rbx + 0x728], 0
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140031d2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0x1560]
mov dword [rsp + 0x40], eax
lea rcx, [0x1400c4398]
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
lea rcx, [0x1400c441c]
jmp 0x140031ddd
lea rcx, [rbp + 0xd60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140031c6b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0xd60]
mov dword [rsp + 0x40], eax
lea rcx, [0x1400c4428]
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
lea rcx, [0x1400c443c]
jmp 0x140031ddd
test esi, esi
je 0x140031c77
cmp dword [rbx + 0x72c], 0
je 0x140031c80
lea rcx, [rbp + 0x1d60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140031c77
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0x1d60]
mov dword [rsp + 0x40], eax
lea rcx, str.Error_deleting__S_r_n
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
lea rcx, [0x1400c4484]
mov rdx, rax
call fcn.140020ee0
cmp dword [rsp + 0x44], 0
jne 0x140031df6
mov ecx, 1
call fcn.14002ab30
mov eax, 0xffffffff
jmp 0x140031f38
test r14d, r14d
je 0x140031ca4
xor edi, edi
lea rcx, [rbp + 0xd60]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x710], rax
cmp rax, 0xffffffffffffffff
jne 0x140031e8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0xd60]
mov dword [rsp + 0x40], eax
lea rcx, str.Unable_to_open__S_r_n
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c44dc]
call fcn.140020ee0
lea eax, [rdi - 1]
jmp 0x140031f38
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rdi
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x48]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140031f03
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbp + 0xd60]
mov dword [rsp + 0x40], eax
lea rcx, str.Unable_to_read__S_r_n
call fcn.140020ee0
mov ecx, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov r8d, 0x100
call fcn.140044d90
mov rdx, rax
lea rcx, [0x1400c44fc]
call fcn.140020ee0
mov rcx, qword [rbx + 0x710]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x140031f38
xor edx, edx
mov byte [rsp + 0x58], dil
lea rcx, [rsp + 0x48]
lea r8d, [rdx + 0x10]
call fcn.140074c54
mov rcx, qword [rbx + 0x710]
mov qword [rbx + 0x868], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rbx + 0x718], 1
xor eax, eax
mov r14, qword [rsp + 0x2678]
mov r12, qword [rsp + 0x26b0]
mov rsi, qword [rsp + 0x26a8]
mov r13, qword [rsp + 0x26b8]
mov r15, qword [rsp + 0x2670]
mov rcx, qword [rbp + 0x2560]
xor rcx, rsp
call fcn.14006f1f0
add rsp, 0x2680
pop rdi
pop rbx
pop rbp
ret