Function at 0x140022df0
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xca8]
sub rsp, 0xd80
mov qword [rbp - 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x14027bbd0]
xor rax, rsp
mov qword [rbp + 0xc70], rax
xor r8d, r8d
lea rdx, str.Tool_EnumDriverStoreInf
lea rcx, [rsp + 0x70]
call fcn.140017fc0
nop
xor r13d, r13d
mov word [rbp + 0x430], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x432]
call fcn.140192cb0
mov word [rbp + 0x640], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x642]
call fcn.140192cb0
call fcn.140054cb8
mov r14, qword [rax + 8]
mov qword [rsp + 0x50], r14
mov edx, 0x104
lea rcx, [rbp + 0x430]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x140022ecc
xor r9d, r9d
lea r8, str.return___08x
lea edx, [rax + 2]
lea rcx, [rsp + 0x70]
call fcn.140017c80
nop
lea rcx, [rsp + 0x70]
call fcn.140018150
xor eax, eax
jmp 0x1400235a8
lea rdx, str.DriverStoreFileRepository_
lea rcx, [rbp + 0x430]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea r8, [rbp + 0x430]
mov edx, 0x104
lea rcx, [rbp + 0x640]
call fcn.140195e58
lea rdx, [0x1401ce7f0]
lea rcx, [rbp + 0x430]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x430]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x140023581
movsxd rax, dword [r14 + 0x350]
mov qword [rsp + 0x68], rax
lea rsi, [0x1401c6ea8]
mov rdi, qword [rsp + 0x60]
cmp dword [rbp - 0x70], 0x10
jne 0x1400234c2
call fcn.140051e58
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
je 0x140023566
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
lea rcx, [rbp - 0x44]
lea rax, [rbp - 0x44]
test rax, 0xffffffffffff0000
jne 0x140022fb3
movzx edi, cx
mov ecx, edi
call fcn.140051c2c
test rax, rax
je 0x1400230a0
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140001b00
mov rbx, qword [rsp + 0x48]
jmp 0x1400230a0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp - 0x44]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140023023
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x1400230a0
cmp dword [rdx + 0x10], eax
jge 0x140022ff8
cmp dword [rbx - 0xc], eax
jl 0x1400234dc
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x1400230a0
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14002300f
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]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
jmp 0x1400230a0
mov r12d, dword [rbx - 0x10]
lea rsi, [rbp - 0x44]
sub rsi, rbx
sar rsi, 1
test ecx, ecx
js 0x14002355b
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x14002305b
mov edx, edi
lea rcx, [rsp + 0x48]
call fcn.1400018f0
mov rbx, qword [rsp + 0x48]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp rsi, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x14002307f
lea r8, [rbx + rsi*2]
call fcn.140192c44
jmp 0x140023088
lea r8, [rbp - 0x44]
call fcn.140192bbc
cmp edi, dword [rbx - 0xc]
jg 0x140023550
mov dword [rbx - 0x10], edi
mov word [r12 + rbx], r13w
lea rsi, [0x1401c6ea8]
call fcn.140051e58
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
je 0x140023545
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x40], rdi
test rsi, 0xffffffffffff0000
jne 0x1400230f2
movzx esi, si
mov ecx, esi
call fcn.140051c2c
test rax, rax
je 0x140023107
mov r8d, esi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001b00
jmp 0x140023102
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.140001c20
mov rdi, qword [rsp + 0x40]
movsxd rsi, dword [rbx - 0x10]
test esi, esi
js 0x14002353a
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, esi
or eax, ecx
jge 0x140023135
mov edx, esi
lea rcx, [rsp + 0x48]
call fcn.1400018f0
mov rbx, qword [rsp + 0x48]
lea eax, [rsi + 1]
movsxd rdx, eax
mov rcx, rbx
call fcn.140196380
cmp esi, dword [rbx - 0xc]
jg 0x14002352f
lea r15, [rbx - 0x10]
mov qword [rbp - 0x80], r15
mov dword [r15], esi
mov word [rbx + rsi*2], r13w
mov r12, r13
mov qword [rsp + 0x58], r13
cmp qword [rsp + 0x68], 0
jle 0x140023373
test r12, r12
js 0x140023529
cmp r12, qword [r14 + 0x350]
jge 0x140023529
mov rax, qword [r14 + 0x348]
mov r14, qword [rax + r12*8]
lea rcx, [r14 - 0x18]
lea rsi, [rdi - 0x18]
cmp rcx, rsi
je 0x1400232da
cmp dword [rsi + 0x10], 0
jl 0x1400231e5
mov rax, qword [rsi]
cmp qword [rcx], rax
jne 0x1400231e5
call fcn.140001950
mov rdi, rax
or ecx, 0xffffffff
lock xadd dword [rsi + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400231d2
mov rcx, qword [rsi]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
add rdi, 0x18
mov qword [rsp + 0x40], rdi
mov rbx, qword [rsp + 0x48]
jmp 0x1400232da
movsxd r12, dword [r14 - 0x10]
test r12d, r12d
jne 0x14002324f
mov r12, qword [rsi]
cmp dword [rsi + 8], 0
je 0x1400232d5
cmp dword [rsi + 0x10], 0
jge 0x140023218
cmp dword [rdi - 0xc], 0
jl 0x1400234e7
mov dword [rdi - 0x10], r13d
mov word [rdi], r13w
jmp 0x1400232d5
or eax, 0xffffffff
lock xadd dword [rsi + 0x10], eax
dec eax
test eax, eax
jg 0x140023232
mov rcx, qword [rsi]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [r12]
mov rcx, r12
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x40], rdi
mov rbx, qword [rsp + 0x48]
jmp 0x1400232d5
test r14, r14
je 0x140023508
mov r15d, dword [rdi - 0x10]
mov r13, r14
sub r13, rdi
sar r13, 1
test r12d, r12d
js 0x1400234fd
mov ecx, 1
sub ecx, dword [rsi + 0x10]
mov eax, dword [rsi + 0xc]
sub eax, r12d
or eax, ecx
jge 0x140023292
mov edx, r12d
lea rcx, [rsp + 0x40]
call fcn.1400018f0
mov rdi, qword [rsp + 0x40]
lea rsi, [r12 + r12]
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
mov r9, rsi
add rdx, rdx
cmp r13, r15
ja 0x1400232b3
lea r8, [rdi + r13*2]
call fcn.140192c44
jmp 0x1400232bb
mov r8, r14
call fcn.140192bbc
cmp r12d, dword [rdi - 0xc]
jg 0x1400234f2
mov dword [rdi - 0x10], r12d
xor r13d, r13d
mov word [rsi + rdi], r13w
mov r15, qword [rbp - 0x80]
mov r12, qword [rsp + 0x58]
movsxd rsi, dword [rdi - 0x10]
test esi, esi
js 0x14002351e
mov ecx, 1
sub ecx, dword [rdi - 8]
mov eax, dword [rdi - 0xc]
sub eax, esi
or eax, ecx
jge 0x140023308
mov edx, esi
lea rcx, [rsp + 0x40]
call fcn.1400018f0
mov rdi, qword [rsp + 0x40]
lea eax, [rsi + 1]
movsxd rdx, eax
mov rcx, rdi
call fcn.140196380
cmp esi, dword [rdi - 0xc]
jg 0x140023513
mov dword [rdi - 0x10], esi
mov word [rdi + rsi*2], r13w
cmp dword [r15], 0
jl 0x140023348
mov rdx, rdi
mov rcx, rbx
call fcn.140195de8
test rax, rax
je 0x140023348
sub rax, rbx
sar rax, 1
cmp eax, 0xffffffff
jg 0x14002336e
inc r12
mov qword [rsp + 0x58], r12
mov rsi, qword [rsp + 0x68]
cmp r12, rsi
mov r14, qword [rsp + 0x50]
jl 0x140023170
test rsi, rsi
jne 0x140023475
jmp 0x140023373
mov r14, qword [rsp + 0x50]
mov word [rbp + 0x850], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x852]
call fcn.140192cb0
mov word [rbp + 0xa60], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0xa62]
call fcn.140192cb0
lea r11, [rbp - 0x44]
mov qword [rsp + 0x28], r11
lea rax, [rbp + 0x640]
mov qword [rsp + 0x20], rax
lea r9, str._s_s.inf
or r8, 0xffffffffffffffff
mov edx, 0x104
lea rcx, [rbp + 0x850]
call fcn.140196124
lea rdx, [rbp + 0x1e0]
lea rcx, [rbp + 0x850]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140023475
nop dword [rax]
lea rax, [rbp + 0x20c]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x640]
mov qword [rsp + 0x20], rax
lea r9, str._s_s_s
or r8, 0xffffffffffffffff
mov edx, 0x104
lea rcx, [rbp + 0xa60]
call fcn.140196124
lea r8, [rbp + 0xa60]
mov rdx, qword [r14 + 0x328]
lea rcx, [r14 + 0x318]
call fcn.140053fa4
lea rdx, [rbp + 0x1e0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140023400
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
lea rdx, [rdi - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140023491
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400234b1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rsi, [0x1401c6ea8]
mov rdi, qword [rsp + 0x60]
mov r14, qword [rsp + 0x50]
lea rdx, [rbp - 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140023571
jmp 0x140022f44
mov ecx, 0x80070057
call fcn.140001010
nop
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
int3
call fcn.140050fc8
int3
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
nop
mov ecx, 0x80004005
call fcn.140001010
nop
mov ecx, 0x80070057
call fcn.140001010
int3
mov ecx, 0x80070057
call fcn.140001010
nop
mov ecx, 0x80004005
call fcn.140001010
int3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov r13d, dword [r14 + 0x328]
mov r9d, r13d
lea r8, str.return___08x
mov edx, 2
lea rcx, [rsp + 0x70]
call fcn.140017c80
nop
lea rcx, [rsp + 0x70]
call fcn.140018150
mov eax, r13d
mov rcx, qword [rbp + 0xc70]
xor rcx, rsp
call fcn.1401945b0
lea r11, [rsp + 0xd80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret