Function at 0x140005010
Capabilities:
Enumerate files on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
cmp qword [rcx + 8], 0
je 0x14000541f
mov rsi, rdx
mov rbx, rcx
mov r8d, 0x838
mov rcx, rdx
xor edx, edx
call fcn.1400924f0
lea rdi, [rbx + 0x40]
cmp byte [rbx + 0x290], 0
je 0x140005068
mov rcx, qword [rbx + 0x38]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400051e1
jmp 0x14000541f
mov r15, qword [rbx + 8]
add r15, 2
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea r12, [0x1400c67c0]
mov ecx, dword [r12 + r14*4 + 0x10]
cmp ecx, eax
je 0x1400050c7
mov ecx, dword [r12 + r14*4 + 0x14]
cmp ecx, eax
je 0x1400050b8
mov ecx, dword [r12 + r14*4 + 0x18]
cmp ecx, eax
je 0x1400050bd
mov ecx, dword [r12 + r14*4 + 0x1c]
cmp ecx, eax
je 0x1400050c3
add r14, 4
cmp r14, 0x80
jne 0x140005080
mov eax, 0xffffffff
jmp 0x1400050ca
inc r14
jmp 0x1400050c7
add r14, 2
jmp 0x1400050c7
add r14, 3
mov eax, r14d
shl rax, 4
mov rcx, qword [rax + r12 + 0x218]
mov r14, qword [rax + r12 + 0x210]
add r14, rcx
add r15, rcx
mov qword [rax + r12 + 0x218], r15
mov qword [rsp + 0x38], r14
mov rdx, qword [rbx]
mov r15, qword [rbx + 8]
mov rcx, r14
mov r8, r15
call fcn.140091e40
mov word [r15 + r14], 0x2a5c
lea rax, [r15 + 2]
mov qword [rsp + 0x40], rax
lea r14, [r15*2 + 6]
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
nop word cs:[rax + rax]
mov ecx, dword [r12 + r15*4 + 0x10]
cmp ecx, eax
je 0x140005177
mov ecx, dword [r12 + r15*4 + 0x14]
cmp ecx, eax
je 0x140005168
mov ecx, dword [r12 + r15*4 + 0x18]
cmp ecx, eax
je 0x14000516d
mov ecx, dword [r12 + r15*4 + 0x1c]
cmp ecx, eax
je 0x140005173
add r15, 4
cmp r15, 0x80
jne 0x140005130
mov eax, 0xffffffff
jmp 0x14000517a
inc r15
jmp 0x140005177
add r15, 2
jmp 0x140005177
add r15, 3
mov eax, r15d
shl rax, 4
mov rcx, qword [rax + r12 + 0x218]
mov r8, qword [rax + r12 + 0x210]
add r8, rcx
add r14, rcx
mov qword [rax + r12 + 0x218], r14
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x38]
call fcn.1400030a0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x30]
mov word [rcx + rax], 0
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov qword [rbx + 0x38], rax
cmp rax, 0xffffffffffffffff
je 0x14000541f
mov byte [rbx + 0x290], 1
mov r12, qword [rbx + 0x28]
lea r13, [rbx + 0x6c]
lea rbp, [rsi + 0x38]
mov r14, qword [sym.imp.KERNEL32.dll_FindNextFileW]
jmp 0x140005212
mov rcx, qword [rbx + 0x38]
mov rdx, rdi
call r14
test eax, eax
je 0x14000541f
cmp word [r13], 0
je 0x140005300
mov ecx, 1
xor eax, eax
nop word cs:[rax + rax]
mov edx, ecx
inc ecx
add eax, 0xfffffffe
cmp word [r13 + rdx*2], 0
jne 0x140005230
test eax, eax
je 0x140005300
neg eax
add rax, r13
mov rdx, r13
xor ecx, ecx
jmp 0x14000527b
mov byte [rbp + rcx], r8b
mov r8d, 1
add rcx, r8
add rdx, 2
cmp rdx, rax
jae 0x140005302
movzx r8d, word [rdx]
cmp r8w, 0x7f
jbe 0x140005260
movzx r9d, r8w
cmp r9d, 0x7ff
ja 0x1400052c0
mov r9d, r8d
shr r9d, 6
or r9b, 0xc0
mov byte [rbp + rcx], r9b
and r8b, 0x3f
or r8b, 0x80
mov byte [rbp + rcx + 1], r8b
mov r8d, 2
jmp 0x14000526b
mov r10d, r9d
shr r10d, 0xc
or r10b, 0xe0
mov byte [rbp + rcx], r10b
shr r9d, 6
and r9b, 0x3f
or r9b, 0x80
mov byte [rbp + rcx + 1], r9b
and r8b, 0x3f
or r8b, 0x40
mov byte [rbp + rcx + 2], r8b
mov r8d, 3
jmp 0x14000526b
xor ecx, ecx
mov qword [rsi], rbp
mov qword [rsi + 8], rcx
mov byte [rsi + rcx + 0x38], 0
mov r15, qword [rsi + 8]
cmp r15, 2
je 0x140005330
cmp r15, 1
jne 0x14000534a
mov rax, qword [rsi]
cmp byte [rax], 0x2e
je 0x140005200
jmp 0x14000534a
mov rcx, qword [rsi]
lea rdx, [0x1400aa25a]
mov r8, r15
call fcn.140092690
test eax, eax
je 0x140005200
test r12, r12
je 0x1400053bd
test byte [rdi], 0x10
jne 0x1400053bd
test r15, r15
je 0x140005200
mov rax, qword [rsi]
add r15, rax
xor r8d, r8d
nop word cs:[rax + rax]
lea rcx, [r15 + r8]
dec rcx
cmp rcx, rax
jb 0x140005200
dec r8
cmp byte [rcx], 0x2e
jne 0x140005370
cmp r8, 0xffffffffffffffff
je 0x140005200
mov rax, qword [rbx + 0x28]
not rax
cmp rax, r8
jne 0x140005200
lea rcx, [r15 + r8]
inc rcx
not r8
mov rdx, qword [rbx + 0x20]
call fcn.140092690
test eax, eax
jne 0x140005200
mov rax, qword [rbx + 0x44]
mov qword [rsi + 0x28], rax
mov rax, qword [rbx + 0x54]
mov qword [rsi + 0x30], rax
mov eax, dword [rbx + 0x5c]
mov ecx, dword [rbx + 0x60]
shl rax, 0x20
or rcx, rax
mov qword [rsi + 0x20], rcx
mov byte [rsi + 0x10], 0
mov eax, dword [rbx + 0x40]
and eax, 0x10
cmp eax, 1
mov cl, 2
sbb cl, 0
mov byte [rsi + 0x10], cl
mov edx, dword [rbx + 0x40]
test dl, 2
je 0x140005403
or cl, 4
mov byte [rsi + 0x10], cl
mov edx, dword [rdi]
test dl, 1
je 0x140005410
or cl, 8
mov byte [rsi + 0x10], cl
mov edx, dword [rdi]
mov al, 1
test dl, 4
je 0x140005421
or cl, 0x10
mov byte [rsi + 0x10], cl
jmp 0x140005421
xor eax, eax
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret