Function at 0x140042c50
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x3c0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x3f0], rbx
mov rax, qword [0x140092690]
xor rax, rsp
mov qword [rsp + 0x3b0], rax
mov r14, rdx
mov rbx, rcx
mov qword [rsp + 0x48], 0xffffffffffffffff
mov dword [rsp + 0x40], 0
test rcx, rcx
je 0x140042e74
lea rdx, [rsp + 0x90]
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x140042cf4
or r9, 0xffffffffffffffff
mov r8, rbx
mov edx, 0x104
lea rcx, [rsp + 0x90]
call qword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbcpy_s]
mov edx, 0x5c
lea rcx, [rsp + 0x90]
call qword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsrchr]
test rax, rax
je 0x140042cf4
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextA]
mov byte [rax], 0
or r9, 0xffffffffffffffff
lea r8, str.initial.xml
mov edx, 0x104
lea rcx, [rsp + 0x90]
call qword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbcat_s]
lea rcx, str.__xml_version_1.0____ProfileDatabase__Preferences__LastProfile___LastProfile__PreferredProfiles___PreferredProfiles__ExcludeList___ExcludeList__TrustedServerList___TrustedServerList___Preferences__Profiles___Profiles__PACSection___PACSection___ProfileDatabase_
call qword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbslen]
mov rsi, rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
jne 0x140042d69
xor al, al
jmp 0x140042e50
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, esi
lea rdx, str.__xml_version_1.0____ProfileDatabase__Preferences__LastProfile___LastProfile__PreferredProfiles___PreferredProfiles__ExcludeList___ExcludeList__TrustedServerList___TrustedServerList___Preferences__Profiles___Profiles__PACSection___PACSection___ProfileDatabase_
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
test eax, eax
jne 0x140042d9e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140042e50
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x48], 0xffffffffffffffff
xor eax, eax
mov dword [rsp + 0x80], eax
mov byte [rsp + 0x84], al
lea r9d, [rax + 3]
mov r8, rbx
lea edx, [rax + 5]
lea rcx, [rsp + 0x80]
call qword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbcpy_s]
xor edx, edx
mov r8d, 0x200
lea rcx, [rsp + 0x1a0]
call sub.VCRUNTIME140.dll_memset
mov r9, r14
mov r8d, 0x1ff
lea rdx, [rsp + 0x1a0]
lea rcx, [rsp + 0x80]
call fcn.140048e90
lea rdx, [rsp + 0x1a0]
lea rcx, [rsp + 0x68]
call fcn.140008d08
nop
mov r8, rbx
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x68]
call fcn.14000a05c
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
nop
lea rcx, [rsp + 0x68]
call fcn.14000909c
nop
mov al, 1
jmp 0x140042e50
mov rcx, qword [rsp + 0x3b0]
xor rcx, rsp
call fcn.140059ef0
mov rbx, qword [rsp + 0x3f0]
add rsp, 0x3c0
pop r14
pop rdi
pop rsi
ret
lea rcx, [rsp + 0x58]
call fcn.14001e1b0
lea rdx, [0x14008dfb0]
lea rcx, [rsp + 0x58]
call sub.VCRUNTIME140.dll__CxxThrowException
int3