Function at 0x140006544
Capabilities:
Check if file exists
Create directory
Get common file path
Get disk information
Get disk size
Get file attributes
Set file attributes

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x160
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x50], rax
lea rcx, [0x140001290]
xor r8d, r8d
xor edx, edx
call fcn.140005198
mov ecx, 0x40
lea edx, [rax + 1]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
xor ebx, ebx
mov rdi, rax
test rax, rax
jne 0x1400065df
xor r9d, r9d
xor r8d, r8d
mov edx, 0x4b5
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], FDICopy
call fcn.140004ed8
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov dword [0x14000ae5c], ecx
xor eax, eax
jmp 0x14000696e
lea rcx, [0x140001290]
mov r8d, esi
mov rdx, rax
call fcn.140005198
test eax, eax
jne 0x140006628
xor r9d, r9d
xor r8d, r8d
mov edx, 0x4b1
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], FDICopy
call fcn.140004ed8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [0x14000ae5c], 0x80070714
jmp 0x1400065d8
lea rdx, [0x140001260]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
mov ecx, dword [0x14000ae40]
mov r14d, 1
test eax, eax
cmove ecx, r14d
mov dword [0x14000ae40], ecx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov al, byte [0x140009cde]
test al, al
je 0x1400066b2
cmp al, 0x5c
jne 0x140006672
cmp byte [0x140009cdf], al
mov r8d, ebx
je 0x140006675
mov r8d, r14d
lea rcx, [0x140009cde]
xor edx, edx
call fcn.140006370
test eax, eax
je 0x14000668f
mov eax, r14d
jmp 0x14000696e
xor r9d, r9d
xor r8d, r8d
mov edx, 0x4be
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], FDICopy
call fcn.140004ed8
jmp 0x1400065d8
cmp dword [0x140009bc4], ebx
jne 0x140006948
cmp dword [0x14000ae40], ebx
jne 0x140006948
lea r15, [0x14000a5f0]
mov r12d, 0x104
mov rdx, r15
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x14000671e
mov r8d, 3
mov edx, r14d
mov rcx, r15
call fcn.140006370
test eax, eax
jne 0x140006687
mov rcx, r15
call fcn.1400026d8
test eax, eax
jne 0x14000671e
mov r8d, r14d
mov edx, r14d
mov rcx, r15
call fcn.140006370
test eax, eax
jne 0x140006687
lea rsi, [0x140001354]
lea rax, [rsp + 0x40]
sub rsi, rax
mov rdx, r12
lea rcx, [rsp + 0x40]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140006752
mov al, byte [rsi + rcx]
test al, al
je 0x140006752
mov byte [rcx], al
add rcx, r14
sub rdx, r14
jne 0x140006735
test rdx, rdx
jne 0x14000675a
sub rcx, r14
mov byte [rcx], bl
cmp byte [rsp + 0x40], 0x5a
jg 0x14000691a
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov edi, eax
cmp eax, 6
je 0x14000677e
cmp eax, 3
jne 0x140006792
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140006813
cmp edi, 2
jne 0x140006803
mov cl, byte [rsp + 0x40]
lea eax, [rcx - 0x41]
cmp al, r14b
jbe 0x140006807
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x34], ebx
mov dword [rsp + 0x3c], ebx
mov dword [rsp + 0x30], ebx
test cl, cl
je 0x140006807
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x3c]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x140006803
mov ecx, dword [rsp + 0x34]
mov edx, dword [rsp + 0x30]
mov r8d, 0x400
imul ecx, dword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_MulDiv]
test eax, eax
je 0x140006803
cmp eax, 0x19000
jae 0x140006813
mov cl, byte [rsp + 0x40]
add cl, r14b
mov byte [rsp + 0x40], cl
jmp 0x140006911
xor r8d, r8d
lea rcx, [rsp + 0x40]
lea edx, [r8 + 3]
call fcn.140006b08
test eax, eax
jne 0x14000684a
lea rcx, [rsp + 0x40]
call fcn.1400026d8
test eax, eax
jne 0x140006803
lea rcx, [rsp + 0x40]
xor r8d, r8d
mov edx, r14d
call fcn.140006b08
test eax, eax
je 0x140006803
lea rcx, [rsp + 0x40]
call fcn.1400026d8
test eax, eax
je 0x140006866
lea rcx, [rsp + 0x40]
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea r8, [0x140001358]
lea rcx, [rsp + 0x40]
mov edx, r12d
call fcn.1400079b8
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140006899
lea rcx, [rsp + 0x40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x14000689c
and eax, 0x10
test eax, eax
jne 0x1400068b1
mov cl, byte [rsp + 0x40]
mov byte [rsp + 0x43], bl
add cl, r14b
mov byte [rsp + 0x40], cl
jmp 0x140006911
lea rcx, [rsp + 0x40]
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea r8, [rsp + 0x40]
mov rdx, r12
sub r8, r15
mov rcx, r15
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400068ed
mov al, byte [r8 + rcx]
test al, al
je 0x1400068ed
mov byte [rcx], al
add rcx, r14
sub rdx, r14
jne 0x1400068cf
test rdx, rdx
jne 0x1400068f5
sub rcx, r14
mov byte [rcx], bl
xor r8d, r8d
mov edx, r14d
mov rcx, r15
call fcn.140006370
test eax, eax
jne 0x140006687
mov cl, byte [rsp + 0x40]
cmp cl, 0x5a
jle 0x140006767
lea rcx, [rsp + 0x40]
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edx, 3
lea rcx, [rsp + 0x40]
lea r8d, [rdx + 1]
call fcn.140006b08
test eax, eax
je 0x1400065d8
jmp 0x14000672d
lea r9, [0x140003880]
xor r8d, r8d
mov edx, 0x7d2
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.140007880
test rax, rax
setne bl
mov eax, ebx
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.140008180
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret