Function at 0x14005cb40
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
sub rsp, 0x1c8
mov rax, qword [0x140193440]
xor rax, rsp
mov qword [rsp + 0x1a0], rax
mov qword [rsp + 0x48], rcx
mov rbp, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [0x140157c40]
xor edx, edx
lea r9d, [rbp + 0x13]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov r15, rax
cmp rax, rbp
jne 0x14005cba2
call fcn.140050120
mov rdx, rax
lea rcx, str.SetupDiGetClassDevs__Interface__failed:__s
call fcn.14004f910
xor eax, eax
jmp 0x14005d016
mov qword [rsp + 0x1e8], rbx
lea r8, [rsp + 0x58]
mov qword [rsp + 0x1f0], rsi
xor ebx, ebx
mov qword [rsp + 0x1f8], rdi
xor edx, edx
mov qword [rsp + 0x1c0], r12
mov rcx, r15
mov qword [rsp + 0x1b8], r13
mov r13d, ebx
mov qword [rsp + 0x1b0], r14
mov dword [rsp + 0x58], 0x20
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x14005cfe4
mov r12d, 0x104
lea rax, [0x1401e5200]
mov r8, r12
mov rcx, rax
xor edx, edx
call fcn.140136960
mov edx, 2
mov rcx, r12
call fcn.1400c537c
mov rdi, rax
lea r9, [rsp + 0x50]
lea rax, [rsp + 0x40]
mov r8d, 0xc
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x58]
mov dword [rsp + 0x28], r12d
mov rcx, r15
mov qword [rsp + 0x20], rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
test esi, esi
je 0x14005cc9d
mov qword [rsp + 0x38], rbx
lea rax, [0x1401e5200]
mov qword [rsp + 0x30], rbx
mov r9d, 0xffffffff
mov dword [rsp + 0x28], r12d
mov r8, rdi
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x14005cc9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov esi, ebx
test rdi, rdi
je 0x14005ccaa
mov rcx, rdi
call fcn.1400e9080
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x14005ccf9
call fcn.140050120
mov rdx, rax
lea rcx, str.SetupDiGetDeviceRegistryProperty__Friendly_Name__failed:__s
call fcn.14004f910
mov eax, dword [0x140170978]
movups xmm0, xmmword [str.Generic_Optical_Drive]
mov dword [0x1401e5210], eax
movzx eax, word [0x14017097c]
mov word [0x1401e5214], ax
mov byte [0x1401e5215], bl
movaps xmmword [0x1401e5200], xmm0
lea rdx, [0x1401e5200]
lea rcx, str.Found__s_optical_device
call fcn.14004f910
mov dword [rsp + 0x78], 0x20
mov rdi, rbx
mov r14d, ebx
nop word [rax + rax]
lea rax, [rbp - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14005cd3a
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, 0xffffffffffffffff
mov rcx, rdi
call fcn.1400e9080
xor ecx, ecx
mov rdi, rbx
call fcn.1400e9080
lea rax, [rsp + 0x78]
mov r9d, r14d
lea r8, [0x140157c40]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x58]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x14005cfa7
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x78]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
jne 0x14005cf93
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14005cf77
mov edx, dword [rsp + 0x40]
lea ecx, [rax - 0x79]
call fcn.1400c537c
mov rdi, rax
test rax, rax
jne 0x14005cdd8
lea rcx, str.Unable_to_allocate_data_for_SP_DEVICE_INTERFACE_DETAIL_DATA
call fcn.14004f910
inc r14d
jmp 0x14005cd20
mov dword [rax], 8
lea rdx, [rsp + 0x78]
mov r9d, dword [rsp + 0x40]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rbx
mov r8, rdi
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
jne 0x14005ce23
call fcn.140050120
mov rdx, rax
lea rcx, str.SetupDiGetDeviceInterfaceDetail__actual__failed:__s
call fcn.14004f910
inc r14d
jmp 0x14005cd20
xor r9d, r9d
mov qword [rsp + 0x30], rbx
lea rsi, [rdi + 4]
mov dword [rsp + 0x28], 0x8000000
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, rsi
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14005cf9f
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x28], 0x100
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x700a0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x14005cf9f
cmp qword [rsp + 0xb8], 0x1000
jle 0x14005cf9f
mov ecx, 0x800
call fcn.1400e9094
mov r14, rax
test rax, rax
je 0x14005d031
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14005d031
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, 0x800
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005d031
cmp dword [rsp + 0x40], 0x800
jne 0x14005d031
movups xmm0, xmmword [r14 + 0x28]
lea rdx, [0x1401e51d0]
mov rax, 0xffffffffffffffff
movups xmmword [0x1401e51d0], xmm0
movups xmm1, xmmword [r14 + 0x38]
mov byte [0x1401e51f0], bl
movups xmmword [0x1401e51e0], xmm1
inc rax
cmp byte [rdx + rax], bl
jne 0x14005cf40
sub eax, 1
movsxd rcx, eax
js 0x14005cf69
cmp byte [rcx + rdx], 0x20
jne 0x14005cf69
cmp rcx, 0x21
jae 0x14005d0a9
mov byte [rcx + rdx], bl
sub rcx, 1
jns 0x14005cf50
mov r15, qword [rsp + 0x48]
mov qword [r15 + 0x28], rdx
jmp 0x14005d036
call fcn.140050120
mov rdx, rax
lea rcx, str.SetupDiGetDeviceInterfaceDetail__dummy__failed:__s
call fcn.14004f910
inc r14d
jmp 0x14005cd20
lea rcx, str.SetupDiGetDeviceInterfaceDetail__dummy____no_data_was_allocated
call fcn.14004f910
inc r14d
jmp 0x14005cd20
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x14005cfc8
call fcn.140050120
mov rdx, rax
lea rcx, str.SetupDiEnumDeviceInterfaces_failed:__s
call fcn.14004f910
inc r13d
lea r8, [rsp + 0x58]
mov edx, r13d
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x14005cbfd
xor eax, eax
mov r13, qword [rsp + 0x1b8]
mov r12, qword [rsp + 0x1c0]
mov rdi, qword [rsp + 0x1f8]
mov rsi, qword [rsp + 0x1f0]
mov rbx, qword [rsp + 0x1e8]
mov r14, qword [rsp + 0x1b0]
mov rcx, qword [rsp + 0x1a0]
xor rcx, rsp
call fcn.1400b1f80
add rsp, 0x1c8
pop r15
pop rbp
ret
mov r15, qword [rsp + 0x48]
test rsi, rsi
je 0x14005d04b
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rsi + rbx], 0
jne 0x14005d042
lea rax, [rbx + 1]
mov rdx, rsi
cmp rax, r12
lea rbx, [0x1401e5200]
mov rcx, rbx
cmovb r12, rax
mov r8, r12
call fcn.1401362c0
mov rcx, qword [rsp + 0xb8]
mov byte [r12 + rbx - 1], 0
mov qword [r15 + 0x10], rcx
mov qword [r15 + 0x18], rbx
test rbp, rbp
je 0x14005d08f
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.1400e9080
mov rcx, r14
call fcn.1400e9080
mov eax, 1
jmp 0x14005cfe6
call fcn.1400b20a8
int3