Function at 0x140058df8
Capabilities:
Check if file exists
Get common file path
Get disk information
Get file attributes
Get file size

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x800
mov qword [rsp + 0xd8], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14010bfc0]
xor rax, rsp
mov qword [rsp + 0x7f0], rax
mov r12, rcx
xor ebp, ebp
cmp rcx, rbp
jne 0x140058e46
xor eax, eax
jmp 0x1400598dd
mov eax, dword [0x140120180]
lea rbx, [0x140120140]
mov r14d, 1
test r14b, al
jne 0x140058e7c
or eax, r14d
mov dword [0x140120180], eax
mov rcx, rbx
call fcn.140058d90
lea rcx, [0x1400c178c]
call fcn.140099c54
nop
mov qword [0x1401200f8], rbx
mov qword [rsp + 0x60], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rsp + 0x58], rbp
mov byte [rsp + 0x48], bpl
mov rcx, r12
call fcn.1400980d0
mov r8, rax
mov rdx, r12
lea rcx, [rsp + 0x40]
call fcn.14000352c
nop
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x70]
mov rcx, rbx
call fcn.140055724
nop
cmp qword [rsp + 0x60], 0x10
jb 0x140058ed4
mov rcx, qword [rsp + 0x48]
call fcn.14006127c
mov rdi, qword [0x140120170]
mov rbx, qword [rsp + 0x70]
cmp rbx, rbp
je 0x140058eee
cmp rbx, qword [0x140120140]
je 0x140058ef3
call fcn.14009861c
mov rsi, qword [rsp + 0x78]
cmp rsi, rdi
je 0x140058f72
cmp rbx, rbp
jne 0x140058f0c
call fcn.14009861c
mov r11, rbp
jmp 0x140058f0f
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x140058f1a
call fcn.14009861c
cmp dword [rsi + 0xd0], 0xffffffff
je 0x140058f72
cmp rbx, rbp
jne 0x140058f32
call fcn.14009861c
mov r11, rbp
jmp 0x140058f35
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x140058f40
call fcn.14009861c
test byte [rsi + 0xd0], r14b
je 0x140058f72
cmp rbx, rbp
jne 0x140058f55
call fcn.14009861c
jmp 0x140058f58
mov rbp, qword [rbx]
cmp rsi, qword [rbp + 0x30]
jne 0x140058f63
call fcn.14009861c
add dword [rsi + 0x9c], r14d
mov eax, r14d
jmp 0x1400598dd
mov rdi, qword [0x140120170]
cmp rbx, rbp
je 0x140058f87
cmp rbx, qword [0x140120140]
je 0x140058f8c
call fcn.14009861c
mov r15d, 3
cmp rsi, rdi
je 0x1400590b9
cmp rbx, rbp
jne 0x140058faa
call fcn.14009861c
mov r11, rbp
jmp 0x140058fad
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x140058fb8
call fcn.14009861c
cmp qword [rsi + 0x90], rbp
je 0x140058fec
cmp rbx, rbp
jne 0x140058fd0
call fcn.14009861c
mov r11, rbp
jmp 0x140058fd3
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x140058fde
call fcn.14009861c
cmp qword [rsi + 0x90], 0xffffffffffffffff
jne 0x1400590b9
call fcn.14004c7b0
cmp eax, ebp
je 0x14005901c
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r13, rax
jmp 0x140059042
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r13, rax
cmp r13, 0xffffffffffffffff
jne 0x14005906f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, r12
lea rdx, str.CreateFile__s__fails_with__d_n
lea rcx, [0x14010f570]
call fcn.14004b7ec
mov eax, r14d
jmp 0x1400598dd
cmp rbx, rbp
jne 0x14005907e
call fcn.14009861c
mov r11, rbp
jmp 0x140059081
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x14005908c
call fcn.14009861c
mov qword [rsi + 0x90], r13
cmp rbx, rbp
jne 0x1400590a2
call fcn.14009861c
mov r11, rbp
jmp 0x1400590a5
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x1400590b0
call fcn.14009861c
lea rdi, [rsi + 0x40]
jmp 0x140059276
mov rdi, qword [0x140120170]
cmp rbx, rbp
je 0x1400590ce
cmp rbx, qword [0x140120140]
je 0x1400590d3
call fcn.14009861c
cmp rsi, rdi
je 0x14005914f
cmp rbx, rbp
jne 0x1400590e7
call fcn.14009861c
mov r11, rbp
jmp 0x1400590ea
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x1400590f5
call fcn.14009861c
cmp qword [rsi + 0x90], rbp
je 0x14005914f
cmp rbx, rbp
jne 0x14005910d
call fcn.14009861c
mov r11, rbp
jmp 0x140059110
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x14005911b
call fcn.14009861c
cmp qword [rsi + 0x90], 0xffffffffffffffff
je 0x14005914f
cmp rbx, rbp
jne 0x140059134
call fcn.14009861c
mov r11, rbp
jmp 0x140059137
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x140059142
call fcn.14009861c
lea rdi, [rsi + 0x40]
mov r13, qword [rdi + 0x50]
jmp 0x140059276
call fcn.14004c7b0
cmp eax, ebp
je 0x14005917f
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8d, r15d
mov edx, 0x80000000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r13, rax
jmp 0x1400591a5
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r13, rax
cmp r13, 0xffffffffffffffff
jne 0x1400591d2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, r12
lea rdx, str.CreateFile__s__fails_with__d_n
lea rcx, [0x14010f570]
call fcn.14004b7ec
mov eax, r14d
jmp 0x1400598dd
mov qword [rsp + 0xd0], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rsp + 0xc8], rbp
mov byte [rsp + 0xb8], bpl
mov rcx, r12
call fcn.1400980d0
mov r8, rax
mov rdx, r12
lea rcx, [rsp + 0xb0]
call fcn.14000352c
nop
lea rdx, [rsp + 0xb0]
lea rcx, [0x140120140]
call fcn.140058bf4
mov rdi, rax
cmp qword [rsp + 0xd0], 0x10
jb 0x140059239
mov rcx, qword [rsp + 0xb8]
call fcn.14006127c
mov qword [rsp + 0xd0], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rsp + 0xc8], rbp
mov byte [rsp + 0xb8], bpl
mov dword [rdi + 0x90], ebp
mov qword [rdi + 0x50], r13
mov rcx, r12
call fcn.1400980d0
lea rcx, [rdi + 0x68]
mov r8, rax
mov rdx, r12
call fcn.14000352c
mov eax, dword [rdi + 0x90]
cmp eax, ebp
jne 0x140059310
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rdi + 0x90], eax
cmp eax, 0xffffffff
je 0x140059326
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, str._s_has_fa_x
mov edx, 0x20
lea rcx, [0x14010f570]
call fcn.140001000
test byte [rdi + 0x90], r14b
jne 0x140059326
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8d, r15d
mov edx, 0x40000000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x1400592f5
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x140059307
cmp eax, 0x1779
jne 0x140059326
or dword [rdi + 0x90], r14d
jmp 0x140059326
cmp eax, 0xffffffff
je 0x140059326
test r14b, al
je 0x140059326
add dword [rdi + 0x5c], r14d
mov eax, r14d
jmp 0x1400598dd
cmp dword [rdi + 0x58], 5
jne 0x140059338
add dword [rdi + 0x5c], r14d
mov eax, r14d
jmp 0x1400598dd
mov r15d, 0x104
cmp dword [rdi + 0x58], ebp
jne 0x14005936f
mov r8, r12
mov rdx, r15
lea rcx, [rsp + 0x2f0]
call fcn.1400986e0
mov byte [rsp + 0x2f3], bpl
lea rcx, [rsp + 0x2f0]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [rdi + 0x58], eax
cmp byte [0x14011fff0], bpl
jne 0x140059388
mov edx, r15d
lea rcx, [0x14011fff0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov byte [rsp + 0x1e0], bpl
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x1e1]
call fcn.1400988d0
mov edx, r15d
lea rcx, [rsp + 0x1e0]
call fcn.140054f70
cmp dword [rdi + 8], ebp
je 0x140059426
cmp qword [rdi + 0x50], 0xffffffffffffffff
je 0x140059426
cmp byte [0x14011fff0], bpl
je 0x140059426
cmp byte [rsp + 0x1e0], bpl
je 0x140059426
lea rcx, [0x14011fff0]
call fcn.1400980d0
mov r8, rax
mov rdx, r12
lea rcx, [0x14011fff0]
call fcn.140098c54
cmp eax, ebp
je 0x140059426
lea rcx, [rsp + 0x1e0]
call fcn.1400980d0
mov r8, rax
mov rdx, r12
lea rcx, [rsp + 0x1e0]
call fcn.140098c54
cmp eax, ebp
je 0x140059426
add dword [rdi + 0x5c], r14d
mov eax, r14d
jmp 0x1400598dd
lea r9, [rsp + 0x80]
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileTime]
mov r15d, eax
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
cmp r13, rbp
je 0x140059469
cmp r13, 0xffffffffffffffff
je 0x140059469
or qword [rdi + 0x50], 0xffffffffffffffff
mov dword [rdi + 0x5c], ebp
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp r15d, ebp
je 0x1400598db
cmp r14d, 0xffffffff
je 0x1400598db
mov r13, qword [0x140120170]
cmp rbx, rbp
je 0x140059491
cmp rbx, qword [0x140120140]
je 0x140059496
call fcn.14009861c
cmp rsi, r13
je 0x1400594ff
cmp rbx, rbp
jne 0x1400594aa
call fcn.14009861c
mov r11, rbp
jmp 0x1400594ad
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x1400594b8
call fcn.14009861c
lea rcx, [rsi + 0x40]
lea rdx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 0xffffffff
je 0x1400594ff
cmp rbx, rbp
jne 0x1400594de
call fcn.14009861c
mov r11, rbp
jmp 0x1400594e1
mov r11, qword [rbx]
cmp rsi, qword [r11 + 0x30]
jne 0x1400594ec
call fcn.14009861c
cmp r14d, dword [rsi + 0x48]
jne 0x1400594ff
inc dword [rdi + 0x5c]
mov eax, 1
jmp 0x1400598dd
inc dword [rdi + 0x60]
lea r8, [0x1400d55f8]
mov rdx, r12
lea rcx, [rsp + 0x68]
call fcn.14009d2d8
cmp qword [rsp + 0x68], rbp
jne 0x14005954c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, str.Cannot__tfopen__s___last_error_d
mov edx, 0x20
lea rcx, [0x14010f570]
call fcn.140001000
mov eax, 1
jmp 0x1400598dd
mov byte [rsp + 0x400], bpl
xor edx, edx
mov r8d, 0x3e7
lea rcx, [rsp + 0x401]
call fcn.1400988d0
mov byte [rsp + 0xe0], bpl
mov r13d, 0xf9
mov r8, r13
xor edx, edx
lea rcx, [rsp + 0xe1]
call fcn.1400988d0
mov dword [rdi + 8], r14d
mov rax, qword [rsp + 0x80]
mov qword [rdi], rax
lea r12, [rdi + 0x10]
mov rcx, r12
call fcn.140056d5c
mov byte [rsp + 0x400], bpl
mov r8, qword [rsp + 0x68]
mov edx, 0x3e8
lea rcx, [rsp + 0x400]
call fcn.14009cd2c
lea r8, [rsp + 0x70]
lea rdx, [0x1400d55f4]
lea rcx, [rsp + 0x400]
call fcn.140099e98
cmp rax, rbp
je 0x1400598b8
mov rcx, rax
call fcn.140054c40
mov rdi, rax
cmp byte [rax], 0x5b
jne 0x140059648
lea rdx, [0x1400d55f0]
mov rcx, rax
call fcn.140099250
cmp rax, rdi
jbe 0x140059648
lea rdx, [0x1400d55f0]
mov rcx, rdi
call fcn.140099250
mov byte [rax], bpl
mov rcx, rdi
call fcn.1400994b0
mov rcx, rax
call fcn.140054c40
mov r9, r13
mov r8, rax
mov edx, 0xfa
lea rcx, [rsp + 0xe0]
call fcn.140097ed0
jmp 0x1400598b8
cmp byte [rsp + 0xe0], bpl
je 0x1400598b8
lea rdx, [0x1400d55fc]
mov rcx, rdi
call fcn.140099250
cmp rax, rbp
je 0x1400598b8
cmp byte [rdi], 0x3b
je 0x1400598b8
lea r8, [rsp + 0x70]
lea rdx, [0x1400d55fc]
mov rcx, rdi
call fcn.140099e98
lea r8, [rsp + 0x70]
lea rdx, [0x1400c6110]
xor ecx, ecx
call fcn.140099e98
mov rbx, rax
mov rcx, rdi
call fcn.140054c40
mov rsi, rax
cmp rbx, rbp
je 0x1400596e8
mov rcx, rbx
call fcn.140054c40
mov rbx, rax
cmp byte [rax], 0x22
jne 0x1400596e8
mov rcx, rax
call fcn.1400980d0
cmp byte [rax + rbx - 1], 0x22
jne 0x1400596e8
mov rcx, rbx
call fcn.1400994b0
mov rbx, rax
mov rcx, rax
call fcn.1400980d0
mov byte [rax + rbx - 1], bpl
mov r14d, reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rsp + 0xa8], r14
mov qword [rsp + 0xa0], rbp
mov byte [rsp + 0x90], bpl
mov rcx, rsi
call fcn.1400980d0
mov r8, rax
mov rdx, rsi
lea rcx, [rsp + 0x88]
call fcn.14000352c
nop
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], rbp
mov byte [rsp + 0x48], bpl
lea rcx, [rsp + 0xe0]
call fcn.1400980d0
mov r8, rax
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x40]
call fcn.14000352c
nop
lea rdi, [0x1400c49dc]
cmp rbx, rbp
cmovne rdi, rbx
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.1400572a4
lea rdx, [rsp + 0x88]
lea rcx, [rax + 0x38]
call fcn.14001223c
mov rbx, rax
mov rcx, rdi
call fcn.1400980d0
mov r8, rax
mov rdx, rdi
mov rcx, rbx
call fcn.14000352c
nop
cmp qword [rsp + 0x60], 0x10
jb 0x1400597ac
mov rcx, qword [rsp + 0x48]
call fcn.14006127c
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], rbp
mov byte [rsp + 0x48], bpl
cmp qword [rsp + 0xa8], 0x10
jb 0x1400597d3
mov rcx, qword [rsp + 0x90]
call fcn.14006127c
mov qword [rsp + 0xa8], r14
mov qword [rsp + 0xa0], rbp
mov byte [rsp + 0x90], bpl
mov rcx, rsi
call fcn.1400980d0
mov r8, rax
mov rdx, rsi
lea rcx, [rsp + 0x88]
call fcn.14000352c
nop
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], rbp
mov byte [rsp + 0x48], bpl
lea rcx, [rsp + 0xe0]
call fcn.1400980d0
mov r8, rax
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x40]
call fcn.14000352c
nop
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.1400572a4
mov rdi, rax
mov rsi, qword [rax + 0x28]
lea r9, [rsp + 0x88]
mov r8, qword [rsi + 8]
mov rdx, rsi
mov rcx, rax
call fcn.14000739c
mov rbx, rax
mov edx, 1
mov rcx, rdi
call fcn.1400064b0
mov qword [rsi + 8], rbx
mov rcx, qword [rbx + 8]
mov qword [rcx], rbx
cmp qword [rsp + 0x60], 0x10
jb 0x140059891
mov rcx, qword [rsp + 0x48]
call fcn.14006127c
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], rbp
mov byte [rsp + 0x48], bpl
cmp qword [rsp + 0xa8], 0x10
jb 0x1400598b8
mov rcx, qword [rsp + 0x90]
call fcn.14006127c
mov rcx, qword [rsp + 0x68]
call fcn.14009ccbc
cmp eax, ebp
je 0x1400595a4
mov rcx, qword [rsp + 0x68]
call fcn.14009cf98
mov eax, 1
jmp 0x1400598dd
xor eax, eax
mov rcx, qword [rsp + 0x7f0]
xor rcx, rsp
call fcn.140061100
lea r11, [rsp + 0x800]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret