Function at 0x14001b8e0
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get common file path
Get file attributes
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
lea rbp, [rsp - 0x820]
sub rsp, 0x920
mov esi, edx
mov rbx, rcx
cmp edx, 2
jg 0x14001c10b
test rcx, rcx
jne 0x14001b94c
lea rax, [rbp + 0x600]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea edx, [rcx + 0x1a]
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x14001c10b
lea r9, [rbx - 1]
mov edx, 0x104
lea r8, [0x1401b9de0]
lea rcx, [rbp + 0x600]
call fcn.14003e19c
lea rbx, [rbp + 0x600]
mov qword [rsp + 0x940], rdi
lea rcx, [rbp + 0x1a0]
mov qword [rsp + 0x918], r14
mov r9, 0xffffffffffffffff
mov r8, rbx
mov qword [rsp + 0x910], r15
mov edx, 0x104
xor r14b, r14b
call fcn.14003c218
mov r9, 0xffffffffffffffff
lea r8, str.origin.txt
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call fcn.14003e19c
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001bfe2
xor r15d, r15d
mov dword [rbp - 0x6c], 0x104
lea rax, [rbp - 0x68]
mov dword [rbp - 0x70], r15d
mov qword [rbp - 0x78], rax
lea rdx, [0x14014fdc0]
lea rax, [0x1401b6698]
mov word [rbp - 0x68], r15w
mov ecx, 0x10000
mov qword [rbp - 0x80], rax
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x48], r15d
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], 0x10000
mov qword [rsp + 0x68], r15
mov dword [rsp + 0x70], r15d
mov byte [rsp + 0x74], r14b
mov qword [rsp + 0x60], r15
call fcn.14002e8b0
mov qword [rsp + 0x50], rax
test rax, rax
je 0x14001bf73
mov qword [rsp + 0x30], r15
lea r8d, [r15 + 3]
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x1a0]
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov qword [rsp + 0x40], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14001bf6e
lea rdx, [rbp + 0x850]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x60]
lea r8d, [r15 + 2]
mov dword [rsp + 0x48], eax
lea rdx, [rbp + 0x848]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, dword [rsp + 0x60]
test eax, eax
je 0x14001bac4
cmp r8d, 2
jne 0x14001bac4
cmp byte [rbp + 0x848], 0xff
jne 0x14001bac4
cmp byte [rbp + 0x849], 0xfe
jne 0x14001bac4
mov byte [rsp + 0x74], 1
jmp 0x14001baeb
mov rcx, qword [rsp + 0x40]
mov edx, r15d
mov dword [rsp + 0x5c], edx
mov dword [rsp + 0x64], r15d
test rcx, rcx
je 0x14001baef
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r8d, dword [rsp + 0x60]
mov edx, dword [rsp + 0x5c]
mov rdi, qword [rbp - 0x78]
mov esi, dword [rbp - 0x6c]
mov dword [rbp - 0x70], r15d
test rdi, rdi
je 0x14001bb0c
mov word [rdi], r15w
mov r8d, dword [rsp + 0x60]
mov edx, dword [rsp + 0x5c]
cmp byte [rsp + 0x74], r14b
je 0x14001bcc2
cmp qword [rsp + 0x40], r15
je 0x14001bbeb
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x14001bbeb
mov rbx, qword [rbp - 0x78]
lea rax, [rsi - 1]
lea rdi, [rbx + rax*2]
mov eax, edx
lea r9, [r9 + rax*2]
cmp dword [rsp + 0x64], r15d
je 0x14001bb56
mov ecx, edx
add rcx, rcx
mov eax, r8d
cmp rcx, rax
jne 0x14001bb96
mov r8d, dword [rsp + 0x58]
lea r9, [rsp + 0x60]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x5c], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001bbeb
mov r8d, dword [rsp + 0x60]
cmp r8d, 1
jb 0x14001bc6a
mov r9, qword [rsp + 0x50]
mov edx, dword [rsp + 0x5c]
mov ecx, edx
add rcx, rcx
mov eax, r8d
cmp rcx, rax
jae 0x14001bbda
cmp rbx, rdi
jae 0x14001bc3f
movzx eax, word [r9]
cmp ax, 0xa
je 0x14001bc23
mov word [rbx], ax
add r9, 2
mov edx, dword [rsp + 0x5c]
add rbx, 2
mov r8d, dword [rsp + 0x60]
inc edx
mov ecx, edx
add rcx, rcx
mov dword [rsp + 0x5c], edx
cmp rcx, r8
jb 0x14001bba3
mov ecx, edx
add rcx, rcx
mov eax, r8d
cmp rcx, rax
jbe 0x14001bb42
mov eax, r15d
test eax, eax
je 0x14001bbff
mov rcx, qword [rbp - 0x78]
call fcn.14001b660
movzx r14d, al
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14001bc14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x5c], r15
mov dword [rsp + 0x64], r15d
jmp 0x14001bf73
cmp rbx, qword [rbp - 0x78]
jbe 0x14001bc36
cmp word [rbx - 2], 0xd
lea rax, [rbx - 2]
cmove rbx, rax
mov word [rbx], r15w
jmp 0x14001be2a
mov word [rbx], r15w
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001bc60
mov edx, dword [rbp - 0x6c]
mov rcx, rdi
call fcn.14003c464
mov dword [rbp - 0x70], eax
mov eax, dword [rsp + 0x64]
jmp 0x14001bbee
mov dword [rbp - 0x70], r15d
mov eax, dword [rsp + 0x64]
jmp 0x14001bbee
mov word [rbx], r15w
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001bcad
mov edx, dword [rbp - 0x6c]
mov rcx, rdi
call fcn.14003c464
mov dword [rbp - 0x70], eax
cmp eax, 1
jb 0x14001bcb1
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001bcb1
cmp word [rdi], r15w
je 0x14001bcb1
inc dword [rsp + 0x64]
mov eax, r15d
cmp rbx, rdi
cmovne eax, dword [rsp + 0x64]
jmp 0x14001bbee
mov dword [rbp - 0x70], r15d
cmp rbx, qword [rbp - 0x78]
mov eax, r15d
cmovne eax, dword [rsp + 0x64]
jmp 0x14001bbee
mov eax, dword [rsp + 0x70]
cmp eax, esi
jae 0x14001bcff
mov rcx, qword [rsp + 0x68]
add eax, esi
mov dword [rsp + 0x70], eax
test rcx, rcx
je 0x14001bce3
call fcn.14002e8a8
mov eax, dword [rsp + 0x70]
mov ecx, eax
lea rdx, [0x14014fdc0]
call fcn.14002e8b0
mov r8d, dword [rsp + 0x60]
mov edx, dword [rsp + 0x5c]
mov qword [rsp + 0x68], rax
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x14001bbff
cmp qword [rsp + 0x40], r15
je 0x14001bbeb
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x14001bbeb
lea edi, [rsi - 1]
mov ecx, edx
add rdi, rbx
add rcx, r9
cmp dword [rsp + 0x64], r15d
je 0x14001bd3d
cmp edx, r8d
jne 0x14001bd84
mov r8d, dword [rsp + 0x58]
lea r9, [rsp + 0x60]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x5c], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001bbeb
mov r8d, dword [rsp + 0x60]
cmp r8d, 1
jb 0x14001bed6
mov edx, dword [rsp + 0x5c]
cmp edx, r8d
mov rcx, qword [rsp + 0x50]
jae 0x14001bdb2
cmp rbx, rdi
jae 0x14001be6b
movzx eax, byte [rcx]
cmp al, 0xa
je 0x14001bdc0
mov byte [rbx], al
inc rcx
mov edx, dword [rsp + 0x5c]
inc rbx
mov r8d, dword [rsp + 0x60]
inc edx
mov dword [rsp + 0x5c], edx
cmp edx, r8d
jb 0x14001bd86
cmp edx, r8d
jbe 0x14001bd31
jmp 0x14001bbeb
cmp rbx, qword [rsp + 0x68]
jbe 0x14001bdd3
cmp byte [rbx - 1], 0xd
lea rax, [rbx - 1]
cmove rbx, rax
mov byte [rbx], r14b
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001be58
cmp qword [rsp + 0x68], r15
je 0x14001be26
mov ebx, dword [rbp - 0x6c]
test ebx, ebx
je 0x14001be2a
mov r8, qword [rsp + 0x68]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], ebx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jg 0x14001be2a
jne 0x14001be26
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14001be26
lea eax, [rbx - 1]
mov word [rdi + rax*2], r15w
jmp 0x14001be2a
mov word [rdi], r15w
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001be54
mov edx, dword [rbp - 0x6c]
mov rcx, rdi
call fcn.14003c464
inc dword [rsp + 0x5c]
mov dword [rbp - 0x70], eax
mov eax, dword [rsp + 0x64]
inc eax
mov dword [rsp + 0x64], eax
jmp 0x14001bbee
mov dword [rbp - 0x70], r15d
mov eax, dword [rsp + 0x64]
inc dword [rsp + 0x5c]
inc eax
mov dword [rsp + 0x64], eax
jmp 0x14001bbee
mov byte [rbx], r14b
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001bc64
cmp qword [rsp + 0x68], r15
je 0x14001becd
mov ebx, dword [rbp - 0x6c]
test ebx, ebx
je 0x14001bc43
mov r8, qword [rsp + 0x68]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], ebx
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jg 0x14001bc43
jne 0x14001becd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14001becd
lea eax, [rbx - 1]
mov word [rdi + rax*2], r15w
jmp 0x14001bc43
mov word [rdi], r15w
jmp 0x14001bc43
mov byte [rbx], r14b
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001bf4a
cmp qword [rsp + 0x68], r15
je 0x14001bf29
mov esi, dword [rbp - 0x6c]
test esi, esi
je 0x14001bf2d
mov r8, qword [rsp + 0x68]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], esi
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jg 0x14001bf2d
jne 0x14001bf29
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14001bf29
lea eax, [rsi - 1]
mov word [rdi + rax*2], r15w
jmp 0x14001bf2d
mov word [rdi], r15w
mov rdi, qword [rbp - 0x78]
test rdi, rdi
je 0x14001bf46
mov edx, dword [rbp - 0x6c]
mov rcx, rdi
call fcn.14003c464
mov dword [rbp - 0x70], eax
jmp 0x14001bf4a
mov dword [rbp - 0x70], r15d
mov rax, qword [rsp + 0x68]
mov ecx, dword [rsp + 0x64]
cmp byte [rax], r14b
je 0x14001bf5e
inc ecx
mov dword [rsp + 0x64], ecx
cmp rbx, qword [rsp + 0x68]
mov eax, r15d
cmovne eax, ecx
jmp 0x14001bbee
mov qword [rsp + 0x40], r15
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14001bf88
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], r15
mov r9, qword [rsp + 0x50]
mov qword [rsp + 0x5c], r15
mov dword [rsp + 0x64], r15d
test r9, r9
je 0x14001bfa9
mov rcx, r9
call fcn.14002e8a8
mov qword [rsp + 0x50], r15
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x14001bfbb
mov rcx, rbx
call fcn.14002e8a8
mov rdi, qword [rsp + 0x940]
movzx eax, r14b
mov r14, qword [rsp + 0x918]
mov r15, qword [rsp + 0x910]
add rsp, 0x920
pop rsi
pop rbx
pop rbp
ret
xor edx, edx
lea rcx, [rbp + 0x3b0]
mov r8d, 0x250
call fcn.14014d290
mov r9, 0xffffffffffffffff
lea rcx, [rbp + 0x1a0]
mov r8, rbx
mov edx, 0x104
call fcn.14003c218
mov r9, 0xffffffffffffffff
lea r8, [0x1401c55c0]
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call fcn.14003e19c
lea rdx, [rbp + 0x3b0]
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14001bfbb
mov r15d, 1
nop word [rax + rax]
cmp word [rbp + 0x3dc], 0x2e
je 0x14001c0e5
test byte [rbp + 0x3b0], 0x10
je 0x14001c0e5
mov r9, 0xffffffffffffffff
lea rcx, [rbp + 0x1a0]
mov r8, rbx
mov edx, 0x104
call fcn.14003c218
mov r9, 0xffffffffffffffff
lea r8, [0x1401b667c]
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call fcn.14003e19c
mov r9, 0xffffffffffffffff
lea r8, [rbp + 0x3dc]
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call fcn.14003e19c
lea edx, [rsi + 1]
lea rcx, [rbp + 0x1a0]
call fcn.14001b8e0
test al, al
movzx r14d, r14b
cmovne r14d, r15d
lea rdx, [rbp + 0x3b0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x14001c060
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14001bfbb
xor al, al
add rsp, 0x920
pop rsi
pop rbx
pop rbp
ret