Function at 0x140016660
Capabilities:
Enumerate files on windows

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb40
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14012e6d8]
xor rax, rsp
mov qword [rsp + 0xb30], rax
mov r13, rdx
mov qword [rsp + 0x98], rcx
xor edi, edi
mov dword [rsp + 0x30], edi
call fcn.140055b68
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
jne 0x1400166cd
mov ecx, 0x80004005
call fcn.140001610
int3
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x90], rax
call fcn.140055b68
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
jne 0x1400166fe
mov ecx, 0x80004005
call fcn.140001610
int3
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x38], rbx
call fcn.140055b68
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
jne 0x14001672c
mov ecx, 0x80004005
call fcn.140001610
int3
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rsi, [rax + 0x18]
mov qword [rsp + 0x48], rsi
test r13, r13
jne 0x1400167ae
lea rdx, [rsi - 0x18]
or r14, 0xffffffffffffffff
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, r14d
test eax, eax
jg 0x140016761
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 eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140016783
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
add r14d, 0xffffffff
test r14d, r14d
jg 0x1400167a7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x14001701b
xor edx, edx
mov r8d, 0x250
lea rcx, [rsp + 0xb0]
call fcn.14009c4e0
mov r8, qword [r13 + 0x328]
lea rdx, str._s.inf
lea rcx, [rsp + 0x720]
call fcn.1400034e0
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x720]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r12, rax
mov qword [rsp + 0x70], rax
or r14, 0xffffffffffffffff
cmp rax, r14
je 0x140016fb6
nop
nop
lea r9, [rsp + 0xdc]
mov r8, qword [r13 + 0x328]
lea rdx, [0x1400eb388]
lea rcx, [rsp + 0x720]
call fcn.1400034e0
xor ebp, ebp
mov dword [rsp + 0x40], ebp
xor r15d, r15d
mov dword [rsp + 0x60], ebp
xor r9d, r9d
xor edx, edx
lea r8d, [rbp + 2]
lea rcx, [rsp + 0x720]
call qword [sym.imp.SETUPAPI.dll_SetupOpenInfFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x140016f4b
cmp dword [r13 + 0x720], ebp
je 0x1400169cc
lea r9, [rsp + 0x78]
xor r8d, r8d
lea rdx, str.Version
mov rcx, rax
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x1400169ae
nop
nop
nop
mov qword [rsp + 0x20], r15
mov r9d, 0x104
lea r8, [rsp + 0x300]
xor edx, edx
lea rcx, [rsp + 0x78]
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x140016962
mov edx, 0x104
lea rcx, [rsp + 0x300]
call fcn.14009b820
lea rdx, [0x1400eb978]
lea rcx, [rsp + 0x300]
call fcn.14009b200
test rax, rax
je 0x140016962
mov qword [rsp + 0x20], r15
mov r9d, 0x104
lea r8, [rsp + 0x510]
mov edx, 1
lea rcx, [rsp + 0x78]
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x140016962
lea rdx, [0x1400eb974]
lea rcx, [rsp + 0x510]
call fcn.14009b200
test rax, rax
je 0x140016962
lea r8, [rax + 2]
mov edx, 0x104
lea rcx, [rsp + 0x300]
call fcn.14009cc40
lea rdx, [0x1400eb970]
lea rcx, [rsp + 0x300]
call fcn.14009b200
test rax, rax
jne 0x14001697b
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x78]
call qword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
je 0x1400169ae
jmp 0x1400168a0
lea rcx, [rsp + 0x300]
sub rax, rcx
sar rax, 1
mov r9, rax
lea r8, [rsp + 0x300]
mov edx, 0x104
lea rcx, [rsp + 0x510]
call fcn.14009cdc0
mov r15d, 1
jmp 0x1400169cc
xor edx, edx
mov r8d, 0x104
lea rcx, [rsp + 0x510]
call fcn.14009c4e0
mov edi, dword [rsp + 0x30]
jmp 0x140016f5b
lea r9, [rsp + 0x78]
xor r8d, r8d
lea rdx, str.Manufacturer
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x140016dc7
mov qword [rsp + 0x20], rbp
mov r9d, 0x104
lea r8, [rsp + 0x300]
mov edx, 1
lea rcx, [rsp + 0x78]
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x140016dc7
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x300]
mov rdx, rdi
mov rcx, qword [rsp + 0x98]
call fcn.140003670
test eax, eax
jne 0x140016a52
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov edi, dword [rsp + 0x30]
jmp 0x140016f5b
lea r9, [rsp + 0x78]
xor r8d, r8d
lea rdx, [rsp + 0x300]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x140016dc7
nop
nop
nop
nop
mov qword [rsp + 0x20], 0
mov r9d, 0x104
lea r8, [rsp + 0x300]
mov edx, 2
lea rcx, [rsp + 0x78]
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x140016d3d
xor eax, eax
mov rcx, r14
lea rdi, [rsp + 0x300]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
cmp rcx, 1
jbe 0x140016d3d
lea rdx, str.FUNC_01VEN
lea rcx, [rsp + 0x300]
call fcn.14009b200
test rax, rax
je 0x140016afe
mov r8, rax
mov edx, 0x104
lea rcx, [rsp + 0x300]
call fcn.14009cc40
xor eax, eax
mov rcx, r14
lea rdi, [rsp + 0x300]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
jne 0x140016b79
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140016c03
cmp dword [rdx + 0x10], eax
jge 0x140016b45
cmp dword [rbx - 0xc], eax
jl 0x140016f75
mov dword [rbx - 0x10], eax
mov word [rbx], ax
jmp 0x140016c03
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140016b5d
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 + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x38], rbx
mov rsi, qword [rsp + 0x48]
jmp 0x140016c03
mov ebp, dword [rbx - 0x10]
lea r12, [rsp + 0x300]
sub r12, rbx
sar r12, 1
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140016bac
mov edx, edi
lea rcx, [rsp + 0x38]
call fcn.140004670
mov rbx, qword [rsp + 0x38]
cmp r12, rbp
ja 0x140016bcc
movsxd rax, edi
lea rbp, [rax + rax]
lea r8, [rbx + r12*2]
mov r9, rbp
mov rdx, rbp
mov rcx, rbx
call fcn.14009b340
jmp 0x140016be9
movsxd rax, edi
lea rbp, [rax + rax]
mov r9, rbp
lea r8, [rsp + 0x300]
mov rdx, rbp
mov rcx, rbx
call fcn.14009b270
test edi, edi
js 0x140016f8b
cmp edi, dword [rbx - 0xc]
jg 0x140016f8b
mov dword [rbx - 0x10], edi
mov word [rbx + rbp], 0
movsxd rdi, dword [rbx - 0x10]
mov r12d, 1
mov ecx, r12d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140016c2d
mov edx, edi
lea rcx, [rsp + 0x38]
call fcn.140004670
mov rbx, qword [rsp + 0x38]
lea eax, [rdi + 1]
movsxd rdx, eax
mov rcx, rbx
call fcn.14009b820
test edi, edi
js 0x140016f80
cmp edi, dword [rbx - 0xc]
jg 0x140016f80
mov dword [rbx - 0x10], edi
mov word [rbx + rdi*2], 0
lea rcx, [rbx - 0x18]
add rsi, 0xffffffffffffffe8
cmp rcx, rsi
je 0x140016cb4
cmp dword [rsi + 0x10], 0
jl 0x140016ca3
mov rax, qword [rsi]
cmp qword [rcx], rax
jne 0x140016ca3
call fcn.1400046d0
mov rdi, rax
mov eax, r14d
lock xadd dword [rsi + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140016c93
mov rcx, qword [rsi]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rdi + 0x18]
mov qword [rsp + 0x48], rax
mov rbx, qword [rsp + 0x38]
jmp 0x140016cb4
mov r8d, dword [rbx - 0x10]
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.1400062e0
mov dx, 0x2a
lea rcx, [rsp + 0x48]
call fcn.140006990
xor ebp, ebp
cmp dword [r13 + 0x320], ebp
jle 0x140016d38
mov rdi, r13
mov rsi, qword [rsp + 0x48]
mov rdx, rbx
mov rcx, qword [rdi]
call fcn.14009b200
test rax, rax
jne 0x140016d7e
mov rdx, rsi
mov rcx, qword [rdi]
call fcn.14009b200
test rax, rax
jne 0x140016d7e
cmp dword [r13 + 0x71c], eax
je 0x140016d26
mov rdx, qword [rdi]
mov rcx, rbx
call fcn.14009b200
test rax, rax
jne 0x140016d56
mov rdx, qword [rdi]
mov rcx, rsi
call fcn.14009b200
test rax, rax
jne 0x140016d56
add ebp, r12d
add rdi, 8
cmp ebp, dword [r13 + 0x320]
jl 0x140016cd5
jmp 0x140016d3d
mov rsi, qword [rsp + 0x48]
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x78]
call qword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
je 0x140016da9
jmp 0x140016a80
mov dword [rsp + 0x60], r12d
lea rdx, [0x1400eb960]
mov rcx, rbx
call fcn.14009b200
test rax, rax
je 0x140016db9
mov ebp, r12d
mov rdi, qword [rsp + 0x50]
mov r12, qword [rsp + 0x70]
jmp 0x140016dc7
mov dword [rsp + 0x60], r12d
lea rdx, [0x1400eb960]
mov rcx, rbx
call fcn.14009b200
mov ebp, dword [rsp + 0x40]
test rax, rax
cmovne ebp, r12d
mov rdi, qword [rsp + 0x50]
mov r12, qword [rsp + 0x70]
jmp 0x140016dc7
mov rdi, qword [rsp + 0x50]
mov ebp, dword [rsp + 0x40]
mov r12, qword [rsp + 0x70]
jmp 0x140016dc7
mov rdi, qword [rsp + 0x50]
mov ebp, dword [rsp + 0x40]
mov r12, qword [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
cmp dword [rsp + 0x60], 0
je 0x140016f57
test r15d, r15d
je 0x140016df3
cmp dword [r13 + 0x720], 0
jne 0x140016e01
mov edi, dword [rsp + 0x30]
jmp 0x140016f5b
cmp dword [r13 + 0x720], 0
jne 0x140016f51
lea rax, [rsp + 0x68]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x60], rax
call fcn.140055b68
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
je 0x140016fa1
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x510]
lea rax, [rsp + 0x510]
test rax, 0xffffffffffff0000
jne 0x140016e75
movzx edi, cx
mov ecx, edi
call fcn.140055990
test rax, rax
je 0x140016e9f
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.140006090
jmp 0x140016e9f
xor eax, eax
mov rcx, r14
lea rdi, [rsp + 0x510]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rsp + 0x510]
lea rcx, [rsp + 0x68]
call fcn.1400062e0
nop
call fcn.140055b68
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
je 0x140016f96
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
add rax, 0x18
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x720]
lea rax, [rsp + 0x720]
test rax, 0xffffffffffff0000
jne 0x140016eff
movzx edi, cx
mov ecx, edi
call fcn.140055990
test rax, rax
je 0x140016f29
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.140006090
jmp 0x140016f29
xor eax, eax
mov rcx, r14
lea rdi, [rsp + 0x720]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rsp + 0x720]
lea rcx, [rsp + 0x58]
call fcn.1400062e0
nop
mov r9d, ebp
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x58]
mov rcx, r13
call fcn.140008cd0
mov eax, 1
mov edi, eax
mov dword [rsp + 0x30], eax
jmp 0x140016f5b
mov edi, dword [rsp + 0x30]
jmp 0x140016f5b
mov edi, dword [rsp + 0x30]
jmp 0x140016f5b
mov edi, dword [rsp + 0x30]
lea rdx, [rsp + 0xb0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140016fac
jmp 0x140016810
mov ecx, 0x80070057
call fcn.140001610
int3
mov ecx, 0x80070057
call fcn.140001610
int3
mov ecx, 0x80070057
call fcn.140001610
nop
mov ecx, 0x80004005
call fcn.140001610
nop
mov ecx, 0x80004005
call fcn.140001610
int3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
lea rdx, [rsi - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140016fd3
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 eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140016ff5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
add r14d, 0xffffffff
test r14d, r14d
jg 0x140017019
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, edi
mov rcx, qword [rsp + 0xb30]
xor rcx, rsp
call fcn.14009af10
lea r11, [rsp + 0xb40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret