Function at 0x140066260
Capabilities:
Enumerate files on windows
Get common file path
Set current directory

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x520
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov rax, qword [0x1400e71f0]
xor rax, rsp
mov qword [rsp + 0x510], rax
mov r14d, r9d
mov dword [rsp + 0x48], r9d
mov qword [rsp + 0x58], r8
mov rbx, rdx
mov r12, rcx
call fcn.1400696cc
mov rcx, rax
xor edx, edx
test rax, rax
setne dl
test edx, edx
jne 0x1400662c3
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
test rbx, rbx
je 0x140066323
test rbx, 0xffffffffffff0000
jne 0x14006630b
movzx edi, bx
mov ecx, edi
call fcn.1400696b8
test rax, rax
je 0x140066305
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.140003a40
or r13, 0xffffffffffffffff
jmp 0x14006633a
or r13, 0xffffffffffffffff
jmp 0x14006633a
xor eax, eax
or r13, 0xffffffffffffffff
mov rcx, r13
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
jmp 0x140066329
xor ecx, ecx
or r13, 0xffffffffffffffff
mov r8d, ecx
mov rdx, rbx
lea rcx, [rsp + 0x38]
call fcn.140003c40
nop
call fcn.1400696cc
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x140066359
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
call fcn.1400696cc
mov rdx, rax
xor ecx, ecx
test rax, rax
setne cl
test ecx, ecx
jne 0x14006638a
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x300]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r8d, 1
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x38]
call fcn.140003710
xor edx, edx
lea r15, [0x1400a3ff4]
mov rdi, r15
mov rsi, qword [rax]
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x1400663e2
sbb edx, edx
sbb edx, 0xffffffff
test edx, edx
setne dil
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140066409
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test dil, dil
je 0x1400664b1
xor eax, eax
mov rcx, r13
mov rdi, r15
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov qword [rsp + 0x70], rcx
mov r14, r15
mov rdi, qword [rsp + 0x38]
sub r14, rdi
sar r14, 1
mov eax, dword [rdi - 0x10]
mov dword [rsp + 0x50], eax
lea esi, [rax + rcx]
mov edx, 1
sub edx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, esi
or eax, edx
jge 0x140066468
mov edx, esi
lea rcx, [rsp + 0x38]
call fcn.140003180
mov rdi, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x70]
mov eax, dword [rsp + 0x50]
cmp r14, rax
ja 0x140066475
lea r15, [rdi + r14*2]
movsxd rdx, ecx
add rdx, rdx
lea rcx, [rdi + rax*2]
mov r9, rdx
mov r8, r15
call fcn.140080540
test esi, esi
js 0x1400664a6
cmp esi, dword [rdi - 0xc]
jg 0x1400664a6
mov dword [rdi - 0x10], esi
movsxd rax, esi
mov word [rdi + rax*2], 0
mov r14d, dword [rsp + 0x48]
jmp 0x1400664b6
mov ecx, 0x80070057
call fcn.140001000
int3
mov rdi, qword [rsp + 0x38]
lea rcx, [r12 + 0x23a8]
mov r8, rdi
mov edx, 0x104
call fcn.140081cd0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x140066545
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400664fa
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14006651c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov ecx, r13d
lock xadd dword [rdx + 0x10], ecx
add ecx, 0xffffffff
test ecx, ecx
jg 0x14006653d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r13d
jmp 0x1400669a6
mov dword [rsp + 0xb0], 0x927
xor ebx, ebx
mov dword [rsp + 0xb4], ebx
mov dword [rsp + 0xb8], ebx
mov dword [rsp + 0xbc], ebx
mov dword [rsp + 0xc0], ebx
mov dword [rsp + 0xc4], ebx
mov dword [rsp + 0xc8], ebx
mov dword [rsp + 0xcc], 0xffffffff
mov dword [rsp + 0xd0], ebx
mov dword [rsp + 0xd4], ebx
mov dword [rsp + 0xd8], ebx
test r14d, r14d
je 0x1400665c0
lea rdx, [rsp + 0xb0]
lea rcx, str.oem.inf
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
mov qword [rsp + 0x48], rax
jmp 0x1400665dd
lea rdx, [rsp + 0xb0]
lea rcx, str..inf
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
mov qword [rsp + 0x48], rax
mov esi, ebx
cmp r14, 0xffffffffffffffff
setne sil
lea rcx, [r12 + 0x58]
mov r8, r13
xor edx, edx
call fcn.140067be4
lea rcx, [r12 + 0x30]
mov r8, r13
xor edx, edx
call fcn.140078a50
mov rdi, qword [rsp + 0x40]
mov r15, qword [rsp + 0x58]
nop
test esi, esi
je 0x140066911
lea r8, [rsp + 0xdc]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x68]
call fcn.14000b5c0
nop
mov rdx, qword [rax]
lea rsi, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rsi, rdi
je 0x1400666ed
cmp dword [rdi + 0x10], 0
jl 0x1400666de
mov rcx, qword [rsi]
cmp rcx, qword [rdi]
jne 0x1400666de
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rsi + 0x10], 0
jl 0x140066678
cmp rax, qword [rsi]
jne 0x140066678
mov rbx, rsi
lock add dword [rsi + 0x10], 1
jmp 0x1400666b6
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rsi + 8]
call qword [rax]
mov rbx, rax
test rax, rax
jne 0x140066693
call fcn.1400019f0
mov eax, dword [rsi + 8]
mov dword [rbx + 8], eax
mov eax, dword [rsi + 8]
add eax, 1
movsxd rdx, eax
lea r9, [rdx + rdx]
lea r8, [rsi + 0x18]
add rdx, rdx
lea rcx, [rbx + 0x18]
call fcn.140080540
mov eax, r13d
lock xadd dword [rdi + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400666d1
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbx + 0x18]
mov qword [rsp + 0x40], rax
xor ebx, ebx
jmp 0x1400666ed
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.140003c40
nop
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14006670e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, r13
lea rdi, [rsp + 0xdc]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
jne 0x140066796
mov rax, qword [rsp + 0x30]
lea rdx, [rax - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], ecx
je 0x140066829
cmp dword [rdx + 0x10], ecx
jge 0x140066767
cmp dword [rax - 0xc], ecx
jge 0x140066755
mov ecx, 0x80070057
call fcn.140001000
mov dword [rax - 0x10], ebx
mov rax, qword [rsp + 0x30]
mov word [rax], 0
jmp 0x140066829
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14006677f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
jmp 0x140066829
mov rcx, qword [rsp + 0x30]
mov esi, dword [rcx - 0x10]
lea rbx, [rsp + 0xdc]
sub rbx, rcx
sar rbx, 1
mov edx, 1
sub edx, dword [rcx - 8]
mov eax, dword [rcx - 0xc]
sub eax, edi
or eax, edx
jge 0x1400667ce
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.140003180
mov rcx, qword [rsp + 0x30]
cmp rbx, rsi
ja 0x1400667eb
movsxd rax, edi
lea rsi, [rax + rax]
lea r8, [rcx + rbx*2]
mov r9, rsi
mov rdx, rsi
call fcn.140081c40
jmp 0x140066805
movsxd rax, edi
lea rsi, [rax + rax]
mov r9, rsi
lea r8, [rsp + 0xdc]
mov rdx, rsi
call fcn.140080540
test edi, edi
js 0x140066906
mov rax, qword [rsp + 0x30]
cmp edi, dword [rax - 0xc]
jg 0x140066906
mov dword [rax - 0x10], edi
mov rax, qword [rsp + 0x30]
mov word [rsi + rax], 0
mov r8, r15
mov rdi, qword [rsp + 0x40]
mov rdx, rdi
mov rcx, r12
call fcn.140064080
test eax, eax
je 0x1400668ec
mov ecx, 0x328
call fcn.1400674d8
mov rcx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x140066888
lea rax, [r12 + 0x28]
lea rdx, [r12 + 0x20]
lea r9, [r12 + 0x18]
lea r8, [r12 + 0x10]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x30]
call fcn.140062dd0
mov rsi, rax
jmp 0x14006688a
xor esi, esi
lea rax, [r12 + 0x380]
lea rcx, [r12 + 0x358]
lea r9, [r12 + 0x330]
lea r8, [r12 + 0x308]
lea rdx, [r12 + 0x2e0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
call fcn.1400627c0
lea rcx, [r12 + 0x30]
mov r8, rsi
mov rdx, qword [rcx + 0x10]
call fcn.140078c80
lea rcx, [r12 + 0x58]
lea r8, [rsp + 0xdc]
mov rdx, qword [rcx + 0x10]
call fcn.140068584
nop
lea rdx, [rsp + 0xb0]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
xor ebx, ebx
jmp 0x140066610
mov ecx, 0x80070057
call fcn.140001000
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x14006693a
lea rcx, [rsp + 0x300]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rdi, qword [r12 + 0x68]
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140066961
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140066983
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r13d
add r13d, 0xffffffff
test r13d, r13d
jg 0x1400669a4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
mov rcx, qword [rsp + 0x510]
xor rcx, rsp
call fcn.140081050
add rsp, 0x520
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret