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

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x2a0
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov rax, qword [0x140126108]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov r14, rdx
mov rdi, qword [rdx]
mov rcx, qword [rdi - 0x18]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi - 8], 0
jl 0x14000474f
cmp rax, qword [rdi - 0x18]
jne 0x14000474f
lea rsi, [rdi - 0x18]
lock add dword [rdi - 8], 1
jmp 0x14000478d
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi - 0x10]
call qword [rax]
mov rsi, rax
test rax, rax
jne 0x14000476b
call fcn.140006b60
int3
mov eax, dword [rdi - 0x10]
mov dword [rsi + 8], eax
mov eax, dword [rdi - 0x10]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
mov r8, rdi
add rdx, rdx
lea rcx, [rsi + 0x18]
call fcn.14009d1a0
lea rdi, [rsi + 0x18]
mov qword [rsp + 0x20], rdi
mov ecx, dword [rdi - 0x10]
lea eax, [rcx - 1]
or rbp, 0xffffffffffffffff
lea rsi, [0x1400e86b8]
test eax, eax
js 0x1400047d0
cmp eax, ecx
jg 0x1400047d0
cdqe
lea rcx, [rdi + rax*2]
mov rdx, rsi
call fcn.14009c5e0
test rax, rax
je 0x1400047d0
sub rax, rdi
sar rax, 1
cmp eax, ebp
jne 0x140004856
xor eax, eax
mov rcx, rbp
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
lea r13, [rcx - 1]
mov rax, qword [r14]
mov rbx, rsi
sub rbx, rax
sar rbx, 1
mov r12d, dword [rax - 0x10]
lea edi, [r12 + rcx - 1]
mov edx, 1
sub edx, dword [rax - 8]
mov eax, dword [rax - 0xc]
sub eax, edi
or eax, edx
jge 0x140004812
mov edx, edi
mov rcx, r14
call fcn.140006b70
mov rax, qword [r14]
cmp rbx, r12
ja 0x14000481e
lea rsi, [rax + rbx*2]
movsxd rdx, r13d
add rdx, rdx
lea rcx, [rax + r12*2]
mov r9, rdx
mov r8, rsi
call fcn.14009d1a0
test edi, edi
js 0x140004ae2
mov rax, qword [r14]
cmp edi, dword [rax - 0xc]
jg 0x140004ae2
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [r14]
mov word [rax + rcx*2], 0
mov r8, qword [r14]
lea rdx, [0x1400e87b0]
lea rcx, [rsp + 0x20]
call fcn.140007750
lea rdx, [rsp + 0x40]
mov rdi, qword [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400048a5
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebp
add ebp, eax
test ebp, ebp
jg 0x14000489e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x140004aed
call fcn.140075174
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x1400048c4
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x28], rax
nop
nop
nop
lea r9, [rsp + 0x6c]
mov r8, qword [r14]
lea rdx, [0x1400e87b8]
lea rcx, [rsp + 0x28]
call fcn.140007750
mov rbx, qword [rsp + 0x28]
cmp dword [rbx - 8], 1
jle 0x140004916
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x28]
call fcn.140006670
mov rbx, qword [rsp + 0x28]
test rbx, rbx
je 0x140004996
xor eax, eax
mov rcx, rbp
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x14000497a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140004945
test al, 0x10
je 0x140004945
mov al, 1
jmp 0x140004947
xor al, al
movzx eax, al
test eax, eax
je 0x14000497a
lea rsi, [rsp + 0x6c]
lea rdi, [0x1400e87c4]
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x14000497a
lea rsi, [rsp + 0x6c]
lea rdi, [0x1400e87c8]
mov ecx, 3
repe cmpsw word [rsi], word [rdi]
jne 0x1400049d1
xor eax, eax
mov rcx, rbp
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
test ecx, ecx
js 0x140004ad7
jmp 0x140004998
xor ecx, ecx
cmp ecx, dword [rbx - 0xc]
jg 0x140004ad7
mov dword [rbx - 0x10], ecx
movsxd rax, ecx
mov word [rbx + rax*2], 0
lea rdx, [rsp + 0x40]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140004a8f
test r12, r12
je 0x140004a51
jmp 0x1400048e0
xor eax, eax
mov rcx, rbp
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
test ecx, ecx
js 0x140004a46
cmp ecx, dword [rbx - 0xc]
jg 0x140004a46
mov dword [rbx - 0x10], ecx
movsxd rax, ecx
mov word [rbx + rax*2], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140004a1e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x140004a3c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov eax, 1
jmp 0x140004aed
mov ecx, 0x80070057
call fcn.140001000
nop
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140004a6d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x140004a8b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x140004aed
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140004ab5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebp
add ebp, 0xffffffff
test ebp, ebp
jg 0x140004ad3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x140004aed
mov ecx, 0x80070057
call fcn.140001000
nop
mov ecx, 0x80070057
call fcn.140001000
nop
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.14009cca0
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret