Function at 0x1800319e0
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push rbp
sub rsp, 0x350
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x10], 0xfffffffffffffffe
mov qword [rbp + 0x328], rbx
mov qword [rbp + 0x330], rsi
mov qword [rbp + 0x338], rdi
mov rax, qword [0x1801c3938]
xor rax, rbp
mov qword [rbp + 0x300], rax
mov rbx, rcx
mov qword [rbp + 0x18], rcx
mov byte [rcx], 0
add rcx, 8
mov qword [rbp], rcx
call fcn.180040c90
nop
lea rcx, [rbx + 0x48]
call fcn.180001860
nop
lea rcx, [rbx + 0x78]
call fcn.1800327f0
nop
lea rcx, [rbp]
call fcn.1800c1564
mov rdx, qword [rbp]
mov qword [rbx + 0x180], rdx
cmp byte [rbx], 0
jne 0x180031e75
lea rdx, [0x18014b528]
lea rcx, [rbp + 0x98]
call fcn.1800104c0
nop
mov r8d, 7
lea rdx, [0x18014b530]
lea rcx, [rbp + 0x98]
call fcn.180001b90
lea r8, str.debug.txt
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x20]
call fcn.180028760
nop
lea rcx, [rbp + 0x20]
cmp qword [rbp + 0x38], 0x10
cmovae rcx, qword [rbp + 0x20]
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rsi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x180031d1f
mov qword [rbp + 8], rsi
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
je 0x180031b05
lea rdx, [rbp + 8]
mov ecx, eax
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
cmp qword [rbp + 8], rsi
je 0x180031d1f
lea rcx, [rbp + 0x48]
call fcn.180012630
nop
mov qword [rbp], rsi
lea rax, [rbp]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rbp + 8]
lea edx, [r9 + 5]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderLocation]
test eax, eax
js 0x180031ba6
mov rdi, qword [rbp]
test rdi, rdi
je 0x180031ba6
mov word [rbp + 0xf0], si
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0xf2]
call fcn.1800c7520
lea rdx, [rbp + 0xf0]
mov rcx, rdi
call qword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x180031b9c
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0xf0]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0xf0]
lea rcx, [rbp + 0x48]
call fcn.180018ad0
mov rcx, qword [rbp]
call qword [sym.imp.SHELL32.dll_ILFree]
lea r8, str._fxlog_
lea rdx, [rbp + 0x48]
lea rcx, [rbp + 0x70]
call fcn.18001e0f0
mov rdi, rax
cmp qword [rax + 0x18], 8
jb 0x180031bc7
mov rdi, qword [rax]
test rdi, rdi
jne 0x180031bd1
mov rdx, rsi
jmp 0x180031c29
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x180031be8
mov rdx, rsi
jmp 0x180031c29
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x180031c04
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1800cd460
sub rsp, rcx
lea rcx, [rsp + 0x40]
mov r9d, 3
mov rdx, rdi
call fcn.180032ad0
mov rdx, rax
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rbp + 0x98]
call fcn.180001cd0
nop
lea rcx, [rbp + 0x70]
call fcn.1800126d0
lea r8, str.debug.txt
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x70]
call fcn.180028760
mov rdi, rax
lea rax, [rbp + 0x20]
cmp rax, rdi
je 0x180031cd9
cmp qword [rbp + 0x38], 0x10
jb 0x180031c84
mov rcx, qword [rbp + 0x20]
call fcn.1800bf2b8
mov qword [rbp + 0x38], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rbp + 0x30], rsi
mov byte [rbp + 0x20], 0
cmp qword [rdi + 0x18], 0x10
jae 0x180031cb0
mov r8, qword [rdi + 0x10]
inc r8
mov rdx, rdi
lea rcx, [rbp + 0x20]
call fcn.1800bed30
jmp 0x180031cba
mov rax, qword [rdi]
mov qword [rbp + 0x20], rax
mov qword [rdi], rsi
mov rax, qword [rdi + 0x10]
mov qword [rbp + 0x30], rax
mov rax, qword [rdi + 0x18]
mov qword [rbp + 0x38], rax
mov qword [rdi + 0x18], reloc.OLEAUT32.dll_SafeArrayDestroy
mov qword [rdi + 0x10], rsi
mov byte [rdi], 0
lea rcx, [rbp + 0x70]
call fcn.18008f070
lea rcx, [rbp + 0x20]
cmp qword [rbp + 0x38], 0x10
cmovae rcx, qword [rbp + 0x20]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
lea rcx, [rbp + 0x48]
call fcn.1800126d0
lea rcx, [rbp + 0x70]
call fcn.1800344e0
nop
mov rdx, rax
lea rcx, [rbp + 0xc0]
call fcn.180036430
nop
lea rcx, [rbp + 0x70]
call fcn.1800126d0
cmp rdi, 0xffffffffffffffff
je 0x180031db1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x20]
cmp qword [rbp + 0x38], 0x10
cmovae rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
lea r8, [rbp + 0xc0]
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x70]
call fcn.180032a10
nop
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 3
mov r9d, 3
lea r8d, [r9 + 0x12]
mov rdx, rax
mov rcx, rbx
call fcn.180031f30
nop
lea rcx, [rbp + 0x70]
call fcn.18008f070
jmp 0x180031e4f
lea rdx, [0x18014b558]
lea rcx, [rbp + 0x48]
call fcn.180012650
nop
mov r8d, 6
lea rdx, str._fxlog
lea rcx, [rbp + 0x48]
call fcn.180015430
cmp qword [rbp + 0x58], 0
je 0x180031e45
lea rcx, [rbp + 0x48]
cmp qword [rbp + 0x60], 8
cmovae rcx, qword [rbp + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
test al, al
je 0x180031e45
lea r8, [rbp + 0xc0]
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x70]
call fcn.180032a10
nop
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 3
mov r9d, 3
lea r8d, [r9 + 0x13]
mov rdx, rax
mov rcx, rbx
call fcn.180031f30
nop
lea rcx, [rbp + 0x70]
call fcn.18008f070
nop
lea rcx, [rbp + 0x48]
call fcn.1800126d0
nop
lea rcx, [rbp + 0xc0]
call fcn.18008f070
nop
lea rcx, [rbp + 0x20]
call fcn.18008f070
nop
lea rcx, [rbp + 0x98]
call fcn.18008f070
nop
jmp 0x180031e75
mov rax, rbx
mov rcx, qword [rbp + 0x300]
xor rcx, rbp
call fcn.1800be9b0
mov rbx, qword [rbp + 0x328]
mov rsi, qword [rbp + 0x330]
mov rdi, qword [rbp + 0x338]
lea rsp, [rbp + 0x310]
pop rbp
ret