Function at 0x1800509ac
Capabilities:
Enumerate files on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x240]
sub rsp, 0x340
mov rax, qword [0x180079080]
xor rax, rsp
mov qword [rbp + 0x230], rax
mov r12, r8
mov rdi, rcx
movabs rbx, 0x200000000801
cmp rdx, rcx
je 0x180050a0e
mov al, byte [rdx]
sub al, 0x2f
cmp al, 0x2d
ja 0x1800509fe
movsx rax, al
bt rbx, rax
jb 0x180050a0e
mov rcx, rdi
call fcn.180056b88
mov rdx, rax
cmp rax, rdi
jne 0x1800509ec
mov r8b, byte [rdx]
cmp r8b, 0x3a
jne 0x180050a35
lea rax, [rdi + 1]
cmp rdx, rax
je 0x180050a35
mov r9, r12
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.180050828
jmp 0x180050cd8
sub r8b, 0x2f
xor r14d, r14d
cmp r8b, 0x2d
ja 0x180050a4e
movsx rax, r8b
bt rbx, rax
mov al, 1
jb 0x180050a51
mov al, r14b
sub rdx, rdi
mov qword [rsp + 0x40], r14
inc rdx
mov qword [rsp + 0x48], r14
neg al
mov qword [rsp + 0x50], r14
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x58], r14
sbb r13, r13
mov qword [rsp + 0x60], r14
and r13, rdx
mov byte [rsp + 0x68], r14b
xor edx, edx
mov qword [rsp + 0x38], r13
call fcn.180044128
mov rax, qword [rsp + 0x78]
mov ecx, 0xfde9
cmp dword [rax + 0xc], ecx
jne 0x180050ab4
cmp byte [rbp - 0x78], r14b
je 0x180050aaf
mov rax, qword [rsp + 0x70]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ecx
jmp 0x180050aec
call fcn.18004b360
test eax, eax
jne 0x180050ad7
cmp byte [rbp - 0x78], r14b
je 0x180050acf
mov rax, qword [rsp + 0x70]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x180050aec
cmp byte [rbp - 0x78], r14b
je 0x180050ae9
mov rax, qword [rsp + 0x70]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r14d
lea r8, [rsp + 0x30]
mov rcx, rdi
lea rdx, [rsp + 0x40]
call fcn.1800468e4
mov rcx, qword [rsp + 0x50]
lea r8, [rbp - 0x20]
test eax, eax
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
cmovne rcx, r14
xor r9d, r9d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180050b55
mov r9, r12
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.180050828
mov ebx, eax
cmp byte [rsp + 0x68], r14b
je 0x180050b4e
mov rcx, qword [rsp + 0x50]
call fcn.18004b05c
mov eax, ebx
jmp 0x180050cd8
mov rsi, qword [r12 + 8]
sub rsi, qword [r12]
sar rsi, 3
xor edx, edx
mov qword [rbp - 0x50], r14
lea rcx, [rbp - 0x70]
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x30], r14
mov byte [rbp - 0x28], r14b
call fcn.180044128
mov rax, qword [rbp - 0x68]
mov ecx, 0xfde9
cmp dword [rax + 0xc], ecx
jne 0x180050ba9
cmp byte [rbp - 0x58], r14b
je 0x180050ba4
mov rax, qword [rbp - 0x70]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ecx
jmp 0x180050bdf
call fcn.18004b360
test eax, eax
jne 0x180050bcb
cmp byte [rbp - 0x58], r14b
je 0x180050bc3
mov rax, qword [rbp - 0x70]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x180050bdf
cmp byte [rbp - 0x58], r14b
je 0x180050bdc
mov rax, qword [rbp - 0x70]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r14d
lea r8, [rsp + 0x30]
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0xc]
call fcn.180050458
mov r14, qword [rbp - 0x40]
xor edx, edx
test eax, eax
mov rcx, r14
cmovne rcx, rdx
cmp byte [rcx], 0x2e
jne 0x180050c24
mov al, byte [rcx + 1]
test al, al
jne 0x180050c1b
cmp byte [rbp - 0x28], dl
je 0x180050c4b
mov rcx, r14
call fcn.18004b05c
jmp 0x180050c4b
cmp al, 0x2e
jne 0x180050c24
cmp byte [rcx + 2], dl
je 0x180050c0c
mov r9, r12
mov r8, r13
mov rdx, rdi
call fcn.180050828
mov r13d, eax
test eax, eax
jne 0x180050cad
cmp byte [rbp - 0x28], al
je 0x180050c46
mov rcx, r14
call fcn.18004b05c
mov r13, qword [rsp + 0x38]
lea rdx, [rbp - 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
xor r14d, r14d
test eax, eax
jne 0x180050b62
mov rax, qword [r12]
mov rdx, qword [r12 + 8]
sub rdx, rax
sar rdx, 3
cmp rsi, rdx
je 0x180050c8f
sub rdx, rsi
lea rcx, [rax + rsi*8]
lea r9, [0x180050444]
lea r8d, [r14 + 8]
call fcn.180056310
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [rsp + 0x68], r14b
je 0x180050ca9
mov rcx, qword [rsp + 0x50]
call fcn.18004b05c
xor eax, eax
jmp 0x180050cd8
cmp byte [rbp - 0x28], 0
je 0x180050cbb
mov rcx, r14
call fcn.18004b05c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [rsp + 0x68], 0
je 0x180050cd5
mov rcx, qword [rsp + 0x50]
call fcn.18004b05c
mov eax, r13d
mov rcx, qword [rbp + 0x230]
xor rcx, rsp
call fcn.18003d520
add rsp, 0x340
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret