Function at 0x140021420
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4a0]
sub rsp, 0x5a0
mov rax, qword [0x140032050]
xor rax, rsp
mov qword [rbp + 0x490], rax
mov rsi, rcx
xor edi, edi
mov r14d, edi
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], 0x400
mov byte [rsp + 0x78], 1
mov qword [rbp - 0x38], rdi
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x20], 0xf
mov byte [rbp - 0x38], dil
lea rdx, [rcx + 0x98]
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 8
jb 0x14002149c
mov rdx, qword [rdx]
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x48], rdi
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], di
lea rcx, [rbp - 0x58]
call fcn.140002170
nop
mov qword [rbp - 0x78], rdi
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], di
mov r8d, 0xb
lea rdx, str.logins.json
lea rcx, [rbp - 0x78]
call fcn.140002170
nop
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x58]
call fcn.140001300
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x140021536
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021531
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140021531
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400227b0
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140021cd2
test al, 0x10
jne 0x140021cd2
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x280]
call sub.VCRUNTIME140.dll_memset
lea rdx, [rbp + 0x280]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140021cd2
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x70]
call sub.VCRUNTIME140.dll_memset
lea r9, [rbp + 0x70]
xor r8d, r8d
lea rdx, str.WTFFI
lea rcx, [rbp + 0x280]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x140021cd2
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
xor r8d, r8d
lea rdx, [rbp + 0x70]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140021cd2
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
lea rcx, [rbp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x140021cd2
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x140021640
lea r14d, [rax + 4]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140021cd8
lea ecx, [rax + 2]
lea rdx, [0x140026c60]
call fcn.1400229b0
mov r13, rax
test rax, rax
jne 0x140021669
lea r14d, [rax + 4]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140021cd8
mov r8d, dword [rsp + 0x40]
add r8d, 2
xor edx, edx
mov rcx, r13
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x60], 0xffffffff
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x60]
mov r8d, dword [rsp + 0x40]
mov rdx, r13
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400216dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [0x1400320b0], 0
jne 0x1400216c0
mov edx, eax
lea rcx, str.ReadFile_failed_err:_d_r_n
call fcn.14001d7c0
mov r14d, 4
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call fcn.1400227b0
jmp 0x140021cd8
mov r8, 0xffffffffffffffff
inc r8
cmp byte [r8 + r13], 0
jne 0x1400216e3
mov rdx, r13
lea rcx, [rbp - 0x38]
call fcn.140010270
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x44], edi
lea rcx, [rbp - 0x38]
cmp qword [rbp - 0x20], 0x10
cmovae rcx, qword [rbp - 0x38]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x48]
call fcn.14001e010
mov rdi, rax
cmp byte [0x1400320b0], 0
jne 0x140021770
mov rcx, qword [rsp + 0x58]
lea r8, [0x1400294ec]
mov r9, r8
test rcx, rcx
cmovne r9, rcx
mov rcx, qword [rsp + 0x48]
test rcx, rcx
cmovne r8, rcx
mov rdx, rax
lea rcx, str.json_parse:_root_p_errorPos_s_errorDesc_s_r_n
call fcn.14001d7c0
test rdi, rdi
jne 0x140021791
lea r14d, [rdi + 4]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov rcx, r13
call fcn.1400227b0
jmp 0x140021cd8
xor r15d, r15d
mov rdx, qword [rdi + 0x10]
test rdx, rdx
je 0x1400217d9
lea r8, str.logins
mov rdi, qword [rdx + 0x20]
test rdi, rdi
je 0x1400217ca
xor ecx, ecx
nop
movzx eax, byte [rdi + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1400217ca
cmp rcx, 7
jne 0x1400217b0
cmp dword [rdx + 0x30], 2
je 0x1400217d5
mov rdx, qword [rdx + 8]
test rdx, rdx
je 0x140021779
jmp 0x1400217a4
mov r15, qword [rdx + 0x10]
test r15, r15
je 0x140021cba
xor edi, edi
lea r9, str.chrome:__FirefoxAccounts
mov qword [rbp - 0x10], rdi
mov rax, rdi
mov qword [rbp], rax
mov ecx, 7
mov qword [rbp + 8], rcx
mov word [rbp - 0x10], di
mov qword [rbp + 0x10], rdi
mov qword [rbp + 0x20], rdi
mov qword [rbp + 0x28], rcx
mov word [rbp + 0x10], di
mov qword [rbp + 0x30], rdi
mov qword [rbp + 0x40], rdi
mov qword [rbp + 0x48], rcx
mov word [rbp + 0x30], di
mov qword [rbp + 0x50], rdi
mov qword [rbp + 0x60], rdi
mov qword [rbp + 0x68], rcx
mov word [rbp + 0x50], di
mov rbx, qword [r15 + 0x10]
test rbx, rbx
je 0x140021ab3
mov rdi, qword [rbx + 0x20]
test rdi, rdi
je 0x140021a97
lea rdx, str.hostname
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x1400218fc
cmp dword [rbx + 0x30], 3
jne 0x1400218fc
mov rdx, qword [rbx + 0x28]
test rdx, rdx
je 0x1400218fc
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], al
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], al
jne 0x140021897
lea rcx, [rbp - 0x78]
call fcn.140010270
nop
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x10]
call fcn.14001ed50
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140021a97
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400218f2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021ca5
call fcn.1400227b0
jmp 0x140021a97
lea rdx, str.encryptedUsername
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x1400219ca
cmp dword [rbx + 0x30], 3
jne 0x1400219ca
mov rdx, qword [rbx + 0x28]
test rdx, rdx
je 0x1400219ca
lea r8, [rsp + 0x50]
mov rcx, rsi
call fcn.140020900
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x140021a97
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], al
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdi + r8], al
jne 0x140021961
mov rdx, rdi
lea rcx, [rbp - 0x78]
call fcn.140010270
nop
lea rdx, [rbp - 0x78]
lea rcx, [rbp + 0x30]
call fcn.14001ed50
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140021a8f
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021a8a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140021a8a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea rdx, str.encryptedPassword
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x140021a97
cmp dword [rbx + 0x30], 3
jne 0x140021a97
mov rdx, qword [rbx + 0x28]
test rdx, rdx
je 0x140021a97
lea r8, [rsp + 0x50]
mov rcx, rsi
call fcn.140020900
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x140021a97
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], al
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rdi + r8], al
jne 0x140021a30
mov rdx, rdi
lea rcx, [rbp - 0x78]
call fcn.140010270
nop
lea rdx, [rbp - 0x78]
lea rcx, [rbp + 0x50]
call fcn.14001ed50
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140021a8f
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021a8a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021cac
call fcn.1400227b0
mov rcx, rdi
call fcn.1400227b0
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140021840
mov rcx, qword [rbp + 8]
mov rax, qword [rbp]
lea r9, str.chrome:__FirefoxAccounts
lea r8, [rbp - 0x10]
cmp rcx, 8
cmovae r8, qword [rbp - 0x10]
cmp rax, 0x18
jne 0x140021b00
mov rdi, rax
mov rax, r9
movzx ecx, word [r8]
mov edx, 0x63
cmp cx, dx
jb 0x140021b00
sub r8, r9
cmp cx, dx
ja 0x140021b00
cmp rdi, 1
je 0x140021bd6
dec rdi
add rax, 2
movzx ecx, word [r8 + rax]
movzx edx, word [rax]
cmp cx, dx
jae 0x140021ae0
xor al, al
test al, al
je 0x140021c18
xor edi, edi
mov qword [rbp - 0x78], rdi
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], dil
lea rdx, [rbp + 0x50]
lea rcx, [rbp - 0x78]
call fcn.14001ee70
cmp qword [rbp - 0x68], rdi
je 0x140021bdd
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x44], edi
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 0x10
cmovae rcx, qword [rbp - 0x78]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x48]
call fcn.14001e010
test rax, rax
je 0x140021bdd
cmp qword [rsp + 0x48], rdi
jne 0x140021bdd
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140021bb8
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021bb3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021cb3
call fcn.1400227b0
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x60], 0xf
mov byte [rbp - 0x78], 0
lea rcx, [rbp - 0x10]
call fcn.14001b7c0
jmp 0x140021c93
mov al, 1
jmp 0x140021b02
mov rdx, qword [rbp - 0x60]
cmp rdx, 0x10
jb 0x140021c18
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021c13
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140021cb3
call fcn.1400227b0
cmp qword [rbp + 0x60], 0
jbe 0x140021c88
mov rdi, qword [rsi + 0xc0]
cmp rdi, qword [rsi + 0xc8]
je 0x140021c74
mov qword [rbp - 0x80], rdi
lea rdx, [rbp - 0x10]
mov rcx, rdi
call fcn.1400020d0
nop
lea rcx, [rdi + 0x20]
lea rdx, [rbp + 0x10]
call fcn.1400020d0
nop
lea rcx, [rdi + 0x40]
lea rdx, [rbp + 0x30]
call fcn.1400020d0
nop
lea rcx, [rdi + 0x60]
lea rdx, [rbp + 0x50]
call fcn.1400020d0
nop
sub qword [rsi + 0xc0], 0xffffffffffffff80
jmp 0x140021c88
lea r8, [rbp - 0x10]
mov rdx, rdi
lea rcx, [rsi + 0xb8]
call fcn.140021eb0
nop
lea rcx, [rbp - 0x10]
call fcn.14001b7c0
xor edi, edi
mov r15, qword [r15 + 8]
test r15, r15
je 0x1400216c6
jmp 0x1400217e4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov r14d, edi
mov rcx, r13
call fcn.1400227b0
jmp 0x140021cd8
mov r14d, 4
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140021d1b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021d16
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140021d16
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400227b0
movdqa xmm0, xmmword [0x1400295c0]
movdqu xmmword [rbp - 0x48], xmm0
mov word [rbp - 0x58], di
mov rdx, qword [rbp - 0x20]
cmp rdx, 0x10
jb 0x140021d6a
inc rdx
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021d65
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140021d65
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400227b0
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x20], 0xf
mov byte [rbp - 0x38], 0
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140021db1
mov rbx, qword [rcx + 0x18]
cmp byte [rsp + 0x78], 0
je 0x140021d9e
mov rdi, rcx
xor eax, eax
mov rcx, qword [rcx]
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
mov qword [rsp + 0x68], rbx
test rbx, rbx
jne 0x140021d84
mov eax, r14d
mov rcx, qword [rbp + 0x490]
xor rcx, rsp
call fcn.140022790
lea r11, [rsp + 0x5a0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret