Function at 0x18005a130
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x838]
sub rsp, 0x910
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x180168908]
xor rax, rsp
mov qword [rbp + 0x800], rax
mov r14, rcx
xor r12d, r12d
mov dword [rsp + 0x28], r12d
lea rdx, [rsp + 0x50]
call fcn.1800579a0
nop
mov rax, qword [rsp + 0x50]
lea r15d, [r12 - 1]
cmp dword [rax - 0x10], r12d
je 0x18005a8ae
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x18005a8a9
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp + 0x3f0]
call fcn.1800d4600
lea r8, [0x180119788]
mov rdx, qword [rsp + 0x50]
lea rcx, [rbp + 0x3f0]
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
mov ebx, 0x5c
mov word [rbp + 0x3d8], bx
mov qword [rbp + 0x3e0], r12
mov dword [rbp + 0x3e8], r12d
lea rcx, [rbp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
jge 0x18005a313
lea r8, [rbp + 0x3f0]
mov edx, 0x104
lea rcx, [rbp - 0x54]
call fcn.1800dd560
test eax, eax
je 0x18005a242
cmp eax, 0xc
je 0x18005a91e
cmp eax, 0x16
je 0x18005a913
cmp eax, 0x22
je 0x18005a913
cmp eax, 0x50
jne 0x18005a908
lea rdx, [rbp - 0x80]
lea rcx, [rbp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rcx, rax
mov qword [rbp + 0x3e0], rax
cmp rax, 0xffffffffffffffff
je 0x18005a313
xor r9d, r9d
lea r8, [rbp + 0x1d0]
mov edx, 0x104
lea rcx, [rbp + 0x3f0]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x18005a2b9
mov dword [rbp + 0x3e8], r12d
mov rcx, qword [rbp + 0x3e0]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18005a2ac
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rbp + 0x3e0], r12
mov ecx, 0x7b
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18005a313
mov edx, ebx
lea rcx, [rbp + 0x1d0]
call fcn.1800d4d50
mov rbx, rax
mov edx, 0x2f
lea rcx, [rbp + 0x1d0]
call fcn.1800d4d50
test rax, rax
jne 0x18005a2ec
test rbx, rbx
je 0x18005a309
lea rax, [rbp + 0x1d0]
lea rcx, [rbp + 0x1d0]
test rbx, rbx
cmovne rcx, rbx
cmp rax, rcx
jb 0x18005a305
mov word [rax], r12w
jmp 0x18005a309
mov word [rcx], r12w
mov dword [rbp + 0x3e8], 1
cmp dword [rbp + 0x3e8], 0
je 0x18005a832
mov eax, dword [rbp - 0x80]
shr eax, 4
and eax, 1
je 0x18005a350
cmp word [rbp - 0x54], 0x2e
jne 0x18005a350
movzx ecx, word [rbp - 0x52]
test cx, cx
je 0x18005a832
cmp cx, 0x2e
jne 0x18005a350
cmp word [rbp - 0x50], 0
je 0x18005a832
test eax, eax
je 0x18005a832
call fcn.180009090
mov rcx, rax
test rax, rax
je 0x18005a8fd
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x104
or eax, ecx
jge 0x18005a3a0
mov edx, 0x104
lea rcx, [rsp + 0x30]
call fcn.180009160
mov rbx, qword [rsp + 0x30]
cmp dword [rbx - 0xc], 0x104
jl 0x18005a8f2
mov dword [rbx - 0x10], 0x104
mov word [rbx + 0x208], r12w
lea rcx, [rbp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x18005a4d6
dec eax
movsxd rcx, eax
movzx eax, word [rbp + rcx*2 + 0x1d0]
cmp ax, 0x5c
je 0x18005a3ef
cmp ax, 0x2f
je 0x18005a3ef
mov dil, 1
jmp 0x18005a3f2
xor dil, dil
lea rcx, [rbp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movzx ecx, dil
add eax, ecx
cmp eax, 0x104
jge 0x18005a4d6
lea r8, [rbp + 0x1d0]
mov edx, 0x104
mov rcx, rbx
call fcn.1800dd560
test eax, eax
je 0x18005a44c
cmp eax, 0xc
je 0x18005a93f
cmp eax, 0x16
je 0x18005a934
cmp eax, 0x22
je 0x18005a934
cmp eax, 0x50
jne 0x18005a929
test dil, dil
je 0x18005a49d
movzx eax, word [rbp + 0x3d8]
mov word [rsp + 0x38], ax
mov word [rsp + 0x3a], r12w
lea r8, [rsp + 0x38]
mov edx, 0x104
mov rcx, rbx
call fcn.1800dd4e0
test eax, eax
je 0x18005a49d
cmp eax, 0xc
je 0x18005a960
cmp eax, 0x16
je 0x18005a955
cmp eax, 0x22
je 0x18005a955
cmp eax, 0x50
jne 0x18005a94a
lea r8, [rbp - 0x54]
mov edx, 0x104
mov rcx, rbx
call fcn.1800dd4e0
test eax, eax
je 0x18005a4d6
cmp eax, 0xc
je 0x18005a981
cmp eax, 0x16
je 0x18005a976
cmp eax, 0x22
je 0x18005a976
cmp eax, 0x50
jne 0x18005a96b
cmp dword [rbx - 8], 1
jle 0x18005a4ee
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.180008f00
mov rbx, qword [rsp + 0x30]
lea rdx, str.Preferences
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
call fcn.180009090
mov rcx, rax
test rax, rax
je 0x18005a9e4
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x20], rbx
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x104
or ecx, eax
jge 0x18005a546
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.180009160
mov rbx, qword [rsp + 0x20]
cmp dword [rbx - 0xc], 0x104
jl 0x18005a9d9
mov dword [rbx - 0x10], 0x104
mov rax, qword [rsp + 0x20]
mov word [rax + 0x208], r12w
lea rcx, [rbp - 0x54]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
jge 0x18005a5ba
cmp dword [rbp + 0x3e8], 0
je 0x18005a5ba
lea r8, [rbp - 0x54]
mov edx, 0x104
mov rcx, rbx
call fcn.1800dd560
test eax, eax
je 0x18005a5ba
cmp eax, 0xc
je 0x18005a9a2
cmp eax, 0x16
je 0x18005a997
cmp eax, 0x22
je 0x18005a997
cmp eax, 0x50
jne 0x18005a98c
mov rcx, qword [rsp + 0x20]
add rcx, 0xffffffffffffffe8
call fcn.180008df0
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x60], rcx
mov esi, 1
mov rbx, r12
lea rdi, [r14 + 0x18]
mov rdx, qword [rdi]
mov rcx, qword [rdi + 8]
sub rcx, rdx
sar rcx, 3
test rcx, rcx
je 0x18005a641
nop word [rax + rax]
lea rcx, [rdx + rbx*8]
test rax, rax
je 0x18005a9ad
mov rdx, rax
mov rcx, qword [rcx]
call fcn.1800dce44
test eax, eax
je 0x18005a639
inc rbx
mov rdx, qword [rdi]
mov rax, qword [rdi + 8]
sub rax, rdx
sar rax, 3
cmp rbx, rax
mov rax, qword [rsp + 0x40]
jb 0x18005a600
jmp 0x18005a641
mov esi, r12d
mov rax, qword [rsp + 0x40]
lea rdx, [rax - 0x18]
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18005a65b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x30]
test esi, esi
je 0x18005a798
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x18005a798
mov rsi, qword [rdi + 8]
cmp qword [rdi + 0x10], rsi
je 0x18005a69f
mov rcx, qword [rsp + 0x20]
add rcx, 0xffffffffffffffe8
call fcn.180008df0
add rax, 0x18
mov qword [rsi], rax
add qword [rdi + 8], 8
jmp 0x18005a6af
lea r8, [rsp + 0x20]
mov rdx, rsi
mov rcx, rdi
call fcn.18004c400
mov ecx, 0xa0
call fcn.1800a5060
mov rsi, rax
mov qword [rsp + 0x70], rax
test rax, rax
je 0x18005a735
call fcn.180009090
test rax, rax
je 0x18005a9b8
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
lea rdx, str.Preferences
lea rcx, [rsp + 0x48]
call fcn.180037120
test al, al
jne 0x18005a713
mov r8d, ntohs
lea rdx, str.Preferences
lea rcx, [rsp + 0x48]
call fcn.180009210
nop
mov edi, dword [rsp + 0x28]
or edi, 1
mov dword [rsp + 0x28], edi
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.18004c650
mov rsi, rax
jmp 0x18005a73c
mov rsi, r12
mov edi, dword [rsp + 0x28]
mov qword [rsp + 0x58], rsi
test dil, 1
je 0x18005a772
and edi, 0xfffffffe
mov dword [rsp + 0x28], edi
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18005a76d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x30]
test rsi, rsi
je 0x18005a798
mov rdx, qword [r14 + 8]
cmp qword [r14 + 0x10], rdx
je 0x18005a78b
mov qword [rdx], rsi
add qword [r14 + 8], 8
jmp 0x18005a798
lea r8, [rsp + 0x58]
mov rcx, r14
call fcn.180055ec0
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1800d7f80
test eax, eax
js 0x18005a9ce
cmp eax, dword [rbx - 0xc]
jg 0x18005a9ce
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r12w
mov rcx, qword [rsp + 0x20]
movsxd rdx, dword [rcx - 0xc]
call fcn.1800d7f80
test eax, eax
js 0x18005a9c3
mov rcx, qword [rsp + 0x20]
cmp eax, dword [rcx - 0xc]
jg 0x18005a9c3
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [rsp + 0x20]
mov word [rax + rcx*2], r12w
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18005a813
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18005a832
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbp + 0x3e0]
test rcx, rcx
je 0x18005a884
cmp dword [rbp + 0x3e8], 0
je 0x18005a85f
lea rdx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov dword [rbp + 0x3e8], eax
test eax, eax
jne 0x18005a313
mov dword [rbp + 0x3e8], r12d
mov rcx, qword [rbp + 0x3e0]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18005a884
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rbp + 0x3e0], r12
mov dword [rbp + 0x3e8], r12d
mov rcx, qword [rbp + 0x3e0]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x18005a8a9
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rbp + 0x3e0], r12
mov rax, qword [rsp + 0x50]
lea rdx, [rax - 0x18]
lock xadd dword [rdx + 0x10], r15d
sub r15d, 1
jg 0x18005a8c7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbp + 0x800]
xor rcx, rsp
call fcn.1800a5130
lea r11, [rsp + 0x910]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
mov ecx, 0x80070057
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
int3
mov ecx, 0x80004005
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x8007000e
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x8007000e
call fcn.180008c20
int3
mov ecx, 0x80004005
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x8007000e
call fcn.180008c20
int3
mov ecx, 0x80004005
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x8007000e
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x8007000e
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
nop
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
int3
mov ecx, 0x80070057
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
int3