Function at 0x3a98e2d50
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x288
mov esi, edx
mov edx, 0x5c
mov rbp, r8
mov rbx, r9
mov qword [rsp + 0x2d0], rcx
call sub.msvcrt.dll_wcsrchr
mov rcx, qword [rsp + 0x2d0]
mov edx, 0x2f
mov rdi, rax
call sub.msvcrt.dll_wcsrchr
cmp rax, rdi
jb 0x3a98e2da1
xor edi, edi
test rax, rax
je 0x3a98e2db0
mov rdi, rax
sub rdi, qword [rsp + 0x2d0]
sar rdi, 1
add rdi, 1
test rbp, rbp
je 0x3a98e2dcf
mov r8d, 0x27b
lea rdx, str.src_win32_replacements.c
lea rcx, str.errfunc____void__0_
call qword [sym.imp.msvcrt.dll__wassert]
test sil, 1
je 0x3a98e2fa0
cmp esi, 3
ja 0x3a98e2f80
lea rax, [rsp + 0x30]
mov rcx, qword [rsp + 0x2d0]
mov qword [rsp + 0x28], rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x3a98e2fc0
lea r13, [rdi + rdi]
mov qword [rbx], 0
xor eax, eax
xor ebp, ebp
mov qword [rbx + 8], 0
lea r12, [rsp + 0x5c]
add rdi, 1
jmp 0x3a98e2ea4
mov rcx, r12
call sub.msvcrt.dll_wcslen
lea rcx, [rdi + rax]
mov rsi, rax
add rcx, rcx
call fcn.3a98cd930
mov r14, rax
test rax, rax
je 0x3a98e2ed0
mov rdx, qword [rsp + 0x2d0]
mov r8, r13
mov rcx, rax
call sub.msvcrt.dll_memcpy
lea r8, [rsi + rsi + 2]
lea rcx, [r14 + r13]
mov rdx, r12
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx]
mov rdx, qword [rbx + 8]
lea rcx, [rax + 1]
mov qword [rbx], rcx
mov rcx, r15
mov qword [rdx + rax*8], r14
mov rdx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
test eax, eax
je 0x3a98e2f40
mov rax, qword [rbx]
cmp rbp, rax
jne 0x3a98e2e30
lea rbp, [rbp + rbp + 1]
mov rcx, qword [rbx + 8]
lea rdx, [rbp*8]
call fcn.3a98cd970
test rax, rax
je 0x3a98e2ed0
mov qword [rbx + 8], rax
jmp 0x3a98e2e30
mov rcx, r15
mov esi, 1
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rbp, qword [sym.imp.msvcrt.dll__errno]
call rbp
mov dword [rax], 0xc
call rbp
xor edi, edi
cmp qword [rbx], 0
mov r12d, dword [rax]
je 0x3a98e2f16
nop word [rax + rax]
mov rax, qword [rbx + 8]
mov rcx, qword [rax + rdi*8]
add rdi, 1
call fcn.3a98cd960
cmp rdi, qword [rbx]
jb 0x3a98e2f00
mov rcx, qword [rbx + 8]
call fcn.3a98cd960
call rbp
mov dword [rax], r12d
mov eax, esi
add rsp, 0x288
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r15
mov edi, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp edi, 0x12
je 0x3a98e2f24
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov esi, 2
call rbp
mov ecx, edi
mov r8, rax
call fcn.3a98e2390
mov dword [r8], eax
jmp 0x3a98e2eed
mov r8d, 0x27d
lea rdx, str.src_win32_replacements.c
lea rcx, str._flags___0x2__0x1____0
call qword [sym.imp.msvcrt.dll__wassert]
jmp 0x3a98e2de2
mov r8d, 0x27c
lea rdx, str.src_win32_replacements.c
lea rcx, str._flags__0x1___0x1
call qword [sym.imp.msvcrt.dll__wassert]
jmp 0x3a98e2dd9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 2
je 0x3a98e2fea
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, ebx
mov esi, 2
mov r8, rax
call fcn.3a98e2390
mov dword [r8], eax
jmp 0x3a98e2f24
call qword [sym.imp.msvcrt.dll__errno]
mov esi, 3
mov dword [rax], 0
jmp 0x3a98e2f24