Function at 0x140016088
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x3c0]
sub rsp, 0x4c0
mov rax, qword [0x1400390f8]
xor rax, rsp
mov qword [rbp + 0x3b0], rax
mov rbx, rcx
mov qword [rsp + 0x28], r8
or rcx, 0xffffffffffffffff
mov r9, rcx
xor esi, esi
inc r9
cmp word [rbx + r9*2], si
jne 0x1400160c1
add r9, 2
mov eax, edx
cmp r9, rax
ja 0x14001ee05
mov rdi, rcx
inc rdi
cmp word [rbx + rdi*2], si
jne 0x1400160dd
sub edi, 2
mov rcx, rbx
mov dword [r8], edi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001edf6
test al, 0x10
jne 0x140016129
mov eax, 1
mov rcx, qword [rbp + 0x3b0]
xor rcx, rsp
call fcn.1400173b0
mov rbx, qword [rsp + 0x4e8]
add rsp, 0x4c0
pop rdi
pop rsi
pop rbp
ret
or rax, 0xffffffffffffffff
jmp 0x14001ee0c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
xor edx, edx
call fcn.140014d90
xor eax, eax
jmp 0x140016107
inc rax
cmp word [rbx + rax*2], si
jne 0x14001ee0c
mov r8d, 0x5c
lea ecx, [r8 - 0x32]
cmp word [rbx + rax*2 - 2], r8w
jne 0x14001ee2c
movzx edx, si
jmp 0x14001ee37
mov edx, ecx
mov word [rbx + rax*2 + 4], si
movzx ecx, r8w
mov word [rbx + rax*2], cx
mov rcx, rbx
mov word [rbx + rax*2 + 2], dx
lea rdx, [rbp + 0x160]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindFirstFileW]
mov qword [rsp + 0x30], rax
cmp rax, 0xffffffffffffffff
jne 0x14001ee7b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
or rcx, 0xffffffffffffffff
mov ebx, eax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
lea ecx, [rbx - 2]
test ecx, 0xffffffef
jmp 0x14001f068
mov esi, 1
xor edx, edx
movzx ecx, word [rbp + 0x18c]
movzx eax, word [0x1400303c0]
sub ecx, eax
jne 0x14001eea4
movzx ecx, word [rbp + 0x18e]
movzx eax, word [0x1400303c2]
sub ecx, eax
test ecx, ecx
je 0x14001f010
movzx ecx, word [rbp + 0x18c]
movzx eax, word [0x1400303b8]
sub ecx, eax
jne 0x14001eee0
movzx ecx, word [rbp + 0x18e]
movzx eax, word [0x1400303ba]
sub ecx, eax
jne 0x14001eee0
movzx ecx, word [rbp + 0x190]
movzx eax, word [0x1400303bc]
sub ecx, eax
test ecx, ecx
je 0x14001f010
lea rax, [rbp + 0x18c]
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], dx
jne 0x14001eef3
test rcx, rcx
je 0x14001f010
test byte [rbp + 0x160], 0x10
jne 0x14001f002
mov qword [rbp + 0x148], rdx
lea rcx, [rsp + 0x40]
xor edx, edx
mov byte [rbp + 0x150], 1
mov r8d, 0x104
mov qword [rbp + 0x158], 0x104
call sub.msvcrt.dll_memset
mov al, byte [rbp + 0x150]
lea rcx, [rsp + 0x40]
neg al
sbb rdx, rdx
and edx, 0x7ee3
add rdx, 0x104
call fcn.1400104d0
test eax, eax
js 0x14001f030
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140010630
mov rax, qword [rbp + 0x148]
lea rdx, [rsp + 0x40]
xor r8d, r8d
lea rcx, [rsp + 0x40]
test rax, rax
cmovne rdx, rax
cmovne rcx, rax
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], r8w
jne 0x14001ef97
mov word [rdx + rax*2 - 2], r8w
lea rcx, [rsp + 0x40]
lea rdx, [rbp + 0x18c]
call fcn.140010578
mov rax, qword [rbp + 0x148]
lea rcx, [rsp + 0x40]
mov edx, dword [rbp + 0x158]
lea r8, [rsp + 0x20]
test rax, rax
cmovne rcx, rax
call fcn.140016088
test eax, eax
je 0x14001f03b
mov rdx, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x20]
add ecx, edi
mov eax, dword [rdx]
cmp eax, ecx
cmovle eax, ecx
mov rcx, qword [rbp + 0x148]
mov dword [rdx], eax
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
jmp 0x14001f010
mov rdx, qword [rsp + 0x28]
mov eax, dword [rdx]
cmp eax, ecx
cmovle eax, ecx
mov dword [rdx], eax
mov rcx, qword [rsp + 0x30]
lea rdx, [rbp + 0x160]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindNextFileW]
xor edx, edx
mov esi, eax
test eax, eax
jne 0x14001ee82
jmp 0x14001f048
mov ecx, 8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rcx, qword [rbp + 0x148]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [rsp + 0x30]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
xor eax, eax
test esi, esi
jne 0x140016107
cmp ebx, 0x12
je 0x140016102
mov ecx, ebx
jmp 0x14001edfe