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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3d8]
sub rsp, 0x4b0
mov rax, qword [0x1401e3028]
xor rax, rsp
mov qword [rbp + 0x3a0], rax
xor r12d, r12d
mov rdi, rcx
mov r15d, r12d
test rcx, rcx
je 0x140012f17
mov rdx, qword [rcx]
test rdx, rdx
je 0x140012f17
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rdx + rax*2], r12w
jne 0x140012cb4
lea r13d, [rax + 1]
movsxd rbx, r13d
mov rcx, rbx
shl rcx, 3
call fcn.14015319c
mov r14, rax
test rax, rax
je 0x140012f1c
test r13d, r13d
jle 0x140012cf3
mov r8, qword [rdi]
mov r9, rsi
mov rdx, rbx
mov rcx, r14
call fcn.1401525e0
mov rcx, r14
mov rsi, r14
mov qword [rsp + 0x20], rcx
movzx eax, word [rsi]
mov edx, 0x3b
test ax, ax
je 0x140012d2a
movzx ecx, ax
movzx eax, cx
cmp cx, dx
je 0x140012d25
add rsi, 2
movzx eax, word [rsi]
movzx ecx, ax
test ax, ax
jne 0x140012d0e
mov rcx, qword [rsp + 0x20]
mov rbx, rsi
test ax, ax
je 0x140012d3c
mov word [rsi], r12w
add rsi, 2
jmp 0x140012d3f
mov rsi, r12
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
or r9, 0xffffffffffffffff
mov qword [rsp + 0x30], rax
cmp rax, r9
je 0x140012eee
sub rbx, 2
xor edx, edx
jmp 0x140012d77
cmp word [rbx], dx
je 0x140012d7c
cmp word [rbx], 0x5c
je 0x140012e8e
sub rbx, 2
cmp rbx, r14
jae 0x140012d64
mov rcx, qword [rsp + 0x20]
lea r8, [rsp + 0x6c]
mov rax, r9
inc rax
cmp word [r8 + rax*2], dx
jne 0x140012d89
lea ebx, [rax + r12]
cmp ebx, 0x104
jae 0x140012ebc
mov word [rbp + 0x190], dx
test r12d, r12d
je 0x140012dc3
mov r8, rcx
mov edx, 0x104
lea rcx, [rbp + 0x190]
call fcn.1401525e0
mov r8d, 0x104
lea rdx, [rbp + 0x190]
lea rcx, [rsp + 0x6c]
call fcn.14003348c
lea rcx, [rbp + 0x190]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140012df5
and eax, 0x10
jne 0x140012ebc
lea eax, [r15 + 1]
add eax, ebx
cmp eax, r13d
jle 0x140012e33
mov rax, qword [rdi]
lea rcx, [rsp + 0x28]
add r13d, 0x100
mov qword [rsp + 0x28], rax
movsxd rdx, r13d
shl rdx, 3
call fcn.140032304
neg al
sbb rcx, rcx
and rcx, qword [rsp + 0x28]
je 0x140012f0f
mov qword [rdi], rcx
xor edx, edx
test r15d, r15d
je 0x140012e4c
mov rax, qword [rdi]
lea r8d, [rdx + 0x3b]
movsxd rcx, r15d
inc r15d
mov word [rax + rcx*2], r8w
mov eax, r13d
movsxd rbx, r15d
sub eax, r15d
add rbx, rbx
test eax, eax
jle 0x140012e77
mov rcx, qword [rdi]
lea r8, [rbp + 0x190]
add rcx, rbx
movsxd rdx, eax
or r9, 0xffffffffffffffff
call fcn.1401525e0
xor edx, edx
mov rcx, qword [rdi]
add rcx, rbx
je 0x140012eb6
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], dx
jne 0x140012e83
jmp 0x140012eb9
mov rcx, qword [rsp + 0x20]
mov word [rbx + 2], dx
test rcx, rcx
je 0x140012eae
mov r12, r9
inc r12
cmp word [rcx + r12*2], dx
jne 0x140012e9f
jmp 0x140012d81
mov r12, rdx
jmp 0x140012d81
mov rax, rdx
add r15d, eax
mov rbx, qword [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov rcx, qword [rsp + 0x20]
xor edx, edx
lea r9, [rdx - 1]
test eax, eax
jne 0x140012d81
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
xor r12d, r12d
mov rcx, rsi
mov qword [rsp + 0x20], rcx
test rsi, rsi
jne 0x140012cfe
test r15d, r15d
jne 0x140012f0f
mov rcx, qword [rdi]
call fcn.140152ed8
mov qword [rdi], r12
mov rcx, r14
call fcn.140152ed8
mov eax, 1
mov rcx, qword [rbp + 0x3a0]
xor rcx, rsp
call fcn.14012e400
lea r11, [rsp + 0x4b0]
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