Function at 0x140012f60
Capabilities:
Get common file path
Query environment variable
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb50]
sub rsp, 0xc50
mov rax, qword [0x140213010]
xor rax, rsp
mov qword [rbp + 0xb40], rax
movzx r13d, dl
mov r12, rcx
call fcn.140010710
mov ebx, 0x400
lea r9, [rsp + 0x30]
xor edi, edi
lea rcx, [0x1401a3070]
mov edx, ebx
mov qword [rsp + 0x30], rdi
xor r8d, r8d
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
mov r14d, 0x80070057
mov word [rsp + 0x40], di
lea rsi, [rdi - 1]
lea r15d, [r14 + 0x23]
test eax, eax
jns 0x1400130b9
mov r8d, ebx
lea rdx, [rsp + 0x40]
lea rcx, str.ProgramW6432
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r8, str.GetEnvironmentVariable_num_characters___d_n_n
mov edx, ebx
mov r9d, eax
lea rcx, [rbp + 0x740]
mov edi, eax
call fcn.1400096e0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor ecx, ecx
mov dword [rsp + 0x38], ecx
cmp rax, rsi
je 0x14001305e
lea rdx, [rbp + 0x740]
mov r8, rsi
inc r8
cmp byte [rdx + r8], cl
jne 0x140013031
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x38]
mov rcx, rax
lea rdx, [rbp + 0x740]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14001305e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x1400130b7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor edi, edi
mov dword [rsp + 0x38], edi
cmp rax, rsi
je 0x14001326b
lea r9, [rsp + 0x38]
mov qword [rsp + 0x20], rdi
mov r8d, 0xbf
lea rdx, str.Looks_like_this_machine_is_running_a_32_bit_OS._Nevertheless_GetEnvironmentVariable__ProgramW6432__returned_zero_characters_so_we_cant_find_3rd_party_plugins_from_the_iTunes_plug_ins_folder.
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14001326b
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14001326b
xor edi, edi
mov r9, qword [rsp + 0x30]
test r9, r9
je 0x140013180
mov rcx, rbx
lea rax, [rsp + 0x40]
nop
cmp word [rax], 0
je 0x1400130e0
add rax, 2
sub rcx, 1
jne 0x1400130d0
test rcx, rcx
mov eax, r14d
cmovne eax, edi
je 0x14001314a
mov rax, rbx
mov rdx, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, rdi
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x140013136
add rax, 0x7ffffbfe
add rax, rdx
sub r9, rcx
test rax, rax
je 0x140013136
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x140013136
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140013115
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], di
mov eax, r15d
cmovne eax, edi
test eax, eax
jns 0x140013180
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [rsp + 0x38], edi
cmp rax, rsi
je 0x140013256
mov r8d, 0x32
lea rdx, str.StringCchCat_pathString__1024__folderPath__failed_n
jmp 0x140013239
mov rcx, rbx
lea rax, [rsp + 0x40]
cmp word [rax], 0
je 0x140013198
add rax, 2
sub rcx, 1
jne 0x140013188
test rcx, rcx
je 0x140013210
mov rax, rbx
mov rdx, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, rdi
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x1400131f1
add rax, 0x7ffffbfe
lea r9, str.iTunesPlug_ins_
add rax, rdx
sub r9, rcx
nop
test rax, rax
je 0x1400131f1
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x1400131f1
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x1400131d0
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], di
je 0x140013210
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.140012b00
jmp 0x140013256
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [rsp + 0x38], edi
cmp rax, rsi
je 0x140013256
mov r8d, 0x14
lea rdx, str.StringCchCat_failed_n
lea r9, [rsp + 0x38]
mov qword [rsp + 0x20], rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140013256
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14001326b
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rsp + 0x30], rdi
mov r8d, ebx
mov word [rsp + 0x40], di
lea rdx, [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14001332e
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x14001332e
mov rcx, rbx
lea rax, [rsp + 0x40]
cmp word [rax], 0
je 0x1400132b3
add rax, 2
sub rcx, 1
jne 0x1400132a3
test rcx, rcx
je 0x14001332e
mov rax, rbx
mov rdx, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, rdi
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x140013311
add rax, 0x7ffffbfe
lea r9, str.Plug_ins_
add rax, rdx
sub r9, rcx
nop dword [rax]
test rax, rax
je 0x140013311
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x140013311
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x1400132f0
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], di
je 0x14001332e
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.140012b00
lea r9, [rsp + 0x30]
xor r8d, r8d
mov edx, ebx
lea rcx, [0x1401a3060]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
lea rdi, str.Apple_ComputeriTunesiTunes_Plug_ins_
test eax, eax
js 0x140013522
mov r9, qword [rsp + 0x30]
xor r10d, r10d
mov word [rsp + 0x40], r10w
test r9, r9
je 0x140013430
mov rcx, rbx
lea rax, [rsp + 0x40]
cmp word [rax], r10w
je 0x140013383
add rax, 2
sub rcx, 1
jne 0x140013373
test rcx, rcx
mov eax, r14d
cmovne eax, r10d
je 0x1400133f5
mov rax, rbx
mov rdx, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, r10
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x1400133df
lea r8, [rax + 0x7ffffbfe]
add r8, rdx
sub r9, rcx
nop word [rax + rax]
test r8, r8
je 0x1400133df
movzx eax, word [r9 + rcx]
test ax, ax
je 0x1400133df
mov word [rcx], ax
dec r8
add rcx, 2
sub rdx, 1
jne 0x1400133c0
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r10w
mov eax, r15d
cmovne eax, r10d
test eax, eax
jns 0x140013430
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor edx, edx
mov dword [rsp + 0x38], edx
cmp rax, rsi
je 0x140013507
mov qword [rsp + 0x20], rdx
lea r8d, [rdx + 0x32]
lea rdx, str.StringCchCat_pathString__1024__folderPath__failed_n
jmp 0x1400134ef
mov rcx, rbx
lea rax, [rsp + 0x40]
cmp word [rax], r10w
je 0x140013448
add rax, 2
sub rcx, 1
jne 0x140013438
test rcx, rcx
je 0x1400134c1
mov rax, rbx
mov rdx, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, r10
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x1400134a1
add rax, 0x7ffffbfe
mov r9, rdi
add rax, rdx
sub r9, rcx
nop word [rax + rax]
test rax, rax
je 0x1400134a1
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x1400134a1
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140013480
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r10w
je 0x1400134c1
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.140012b00
jmp 0x140013507
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor edx, edx
mov dword [rsp + 0x38], edx
cmp rax, rsi
je 0x140013507
mov qword [rsp + 0x20], rdx
lea r8d, [rdx + 0x14]
lea rdx, str.StringCchCat_failed_n
lea r9, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140013507
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140013590
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rsp + 0x30], 0
jmp 0x140013590
mov r9d, eax
lea r8, str.SHGetKnownFolderPath_FOLDERID_RoamingAppData_failed._HRESULT__0x_X_n_n
mov rdx, rbx
lea rcx, [rbp + 0x740]
call fcn.1400096e0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor ecx, ecx
mov dword [rsp + 0x38], ecx
cmp rax, rsi
je 0x140013590
lea rdx, [rbp + 0x740]
mov r8, rsi
inc r8
cmp byte [rdx + r8], cl
jne 0x140013563
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x38]
mov rcx, rax
lea rdx, [rbp + 0x740]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140013590
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov edx, ebx
lea rcx, [0x1401a3050]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x140013766
mov r9, qword [rsp + 0x30]
xor esi, esi
mov word [rsp + 0x40], si
test r9, r9
je 0x140013682
mov rcx, rbx
lea rax, [rsp + 0x40]
nop dword [rax]
cmp word [rax], si
je 0x1400135df
add rax, 2
sub rcx, 1
jne 0x1400135d0
test rcx, rcx
cmovne r14d, esi
je 0x140013647
mov rax, rbx
mov rdx, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, rsi
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x140013633
add rax, 0x7ffffbfe
add rax, rdx
sub r9, rcx
test rax, rax
je 0x140013633
movzx r8d, word [rcx + r9]
test r8w, r8w
je 0x140013633
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140013612
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
cmovne r15d, esi
mov word [rax], si
jmp 0x14001364a
mov r15d, r14d
test r15d, r15d
jns 0x140013682
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [rsp + 0x38], esi
cmp rax, 0xffffffffffffffff
je 0x140013754
mov r8d, 0x32
lea rdx, str.StringCchCat_pathString__1024__folderPath__failed_n
jmp 0x140013737
mov rcx, rbx
lea rax, [rsp + 0x40]
nop word [rax + rax]
cmp word [rax], si
je 0x14001369f
add rax, 2
sub rcx, 1
jne 0x140013690
test rcx, rcx
je 0x14001370d
mov rax, rbx
sub rax, rcx
test rcx, rcx
lea rcx, [rsp + 0x40]
cmove rax, rsi
lea rcx, [rcx + rax*2]
sub rbx, rax
je 0x1400136ee
add rax, 0x7ffffbfe
add rax, rbx
sub rdi, rcx
nop dword [rax + rax]
test rax, rax
je 0x1400136ee
movzx edx, word [rcx + rdi]
test dx, dx
je 0x1400136ee
mov word [rcx], dx
dec rax
add rcx, 2
sub rbx, 1
jne 0x1400136d0
test rbx, rbx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], si
je 0x14001370d
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.140012b00
jmp 0x140013754
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [rsp + 0x38], esi
cmp rax, 0xffffffffffffffff
je 0x140013754
mov r8d, 0x14
lea rdx, str.StringCchCat_failed_n
lea r9, [rsp + 0x38]
mov qword [rsp + 0x20], rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140013754
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400137d3
call qword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x1400137d3
mov r9d, eax
lea r8, str.SHGetKnownFolderPath_FOLDERID_RoamingAppData_failed._HRESULT__0x_X_n_n
mov rdx, rbx
lea rcx, [rbp + 0x740]
call fcn.1400096e0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
xor edx, edx
mov dword [rsp + 0x38], edx
cmp rax, rsi
je 0x1400137d3
lea rcx, [rbp + 0x740]
inc rsi
cmp byte [rcx + rsi], dl
jne 0x1400137a4
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x38]
lea rdx, [rbp + 0x740]
mov r8, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400137d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edx, r13b
mov rcx, r12
call fcn.14000d8a0
mov rcx, qword [rbp + 0xb40]
xor rcx, rsp
call fcn.14019ce50
mov rbx, qword [rsp + 0xca0]
add rsp, 0xc50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret