Function at 0x14005c390
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 r9d, 0x12
lea rcx, [0x140157cc0]
xor r8d, r8d
xor edx, edx
mov rbp, 0xffffffffffffffff
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov r15, rax
cmp rax, rbp
jne 0x14005c3f4
call fcn.14004fba0
mov rdx, rax
lea rcx, str.SetupDiGetClassDevs__Interface__failed:__s
call fcn.14004f2f0
xor eax, eax
jmp 0x14005c86a
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 0x14005c838
mov r12d, 0x104
lea rax, [0x1401e51b0]
mov r8, r12
mov rcx, rax
xor edx, edx
call fcn.140136540
mov edx, 2
mov rcx, r12
call fcn.1400c4f6c
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 0x14005c4ef
mov qword [rsp + 0x38], rbx
lea rax, [0x1401e51b0]
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 0x14005c4ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov esi, ebx
test rdi, rdi
je 0x14005c4fc
mov rcx, rdi
call fcn.1400e8c70
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x14005c54b
call fcn.14004fba0
mov rdx, rax
lea rcx, str.SetupDiGetDeviceRegistryProperty__Friendly_Name__failed:__s
call fcn.14004f2f0
mov eax, dword [0x140170a58]
movups xmm0, xmmword [str.Generic_Optical_Drive]
mov dword [0x1401e51c0], eax
movzx eax, word [0x140170a5c]
mov word [0x1401e51c4], ax
mov byte [0x1401e51c5], bl
movaps xmmword [0x1401e51b0], xmm0
lea rdx, [0x1401e51b0]
lea rcx, str.Found__s_optical_device
call fcn.14004f2f0
mov dword [rsp + 0x78], 0x20
mov rdi, rbx
mov r14d, ebx
nop dword [rax]
lea rax, [rbp - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14005c58a
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, 0xffffffffffffffff
mov rcx, rdi
call fcn.1400e8c70
xor ecx, ecx
mov rdi, rbx
call fcn.1400e8c70
lea rax, [rsp + 0x78]
mov r9d, r14d
lea r8, [0x140157cc0]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x58]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x14005c7fb
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 0x14005c7e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14005c7cb
mov edx, dword [rsp + 0x40]
mov ecx, 1
call fcn.1400c4f6c
mov rdi, rax
test rax, rax
jne 0x14005c62a
lea rcx, str.Unable_to_allocate_data_for_SP_DEVICE_INTERFACE_DETAIL_DATA
call fcn.14004f2f0
inc r14d
jmp 0x14005c570
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 0x14005c675
call fcn.14004fba0
mov rdx, rax
lea rcx, str.SetupDiGetDeviceInterfaceDetail__actual__failed:__s
call fcn.14004f2f0
inc r14d
jmp 0x14005c570
mov qword [rsp + 0x30], rbx
lea rsi, [rdi + 4]
mov rcx, rsi
mov dword [rsp + 0x28], 0x8000000
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14005c7f3
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 0x14005c7f3
cmp qword [rsp + 0xb8], 0x1000
jle 0x14005c7f3
mov ecx, 0x800
call fcn.1400e8c84
mov r14, rax
test rax, rax
je 0x14005c885
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14005c885
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 0x14005c885
cmp dword [rsp + 0x40], 0x800
jne 0x14005c885
movups xmm0, xmmword [r14 + 0x28]
lea rdx, [0x1401e5180]
mov rax, 0xffffffffffffffff
movups xmmword [0x1401e5180], xmm0
movups xmm1, xmmword [r14 + 0x38]
mov byte [0x1401e51a0], bl
movups xmmword [0x1401e5190], xmm1
inc rax
cmp byte [rdx + rax], bl
jne 0x14005c794
sub eax, 1
movsxd rcx, eax
js 0x14005c7bd
cmp byte [rcx + rdx], 0x20
jne 0x14005c7bd
cmp rcx, 0x21
jae 0x14005c8fd
mov byte [rcx + rdx], bl
sub rcx, 1
jns 0x14005c7a4
mov r15, qword [rsp + 0x48]
mov qword [r15 + 0x28], rdx
jmp 0x14005c88a
call fcn.14004fba0
mov rdx, rax
lea rcx, str.SetupDiGetDeviceInterfaceDetail__dummy__failed:__s
call fcn.14004f2f0
inc r14d
jmp 0x14005c570
lea rcx, str.SetupDiGetDeviceInterfaceDetail__dummy____no_data_was_allocated
call fcn.14004f2f0
inc r14d
jmp 0x14005c570
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x14005c81c
call fcn.14004fba0
mov rdx, rax
lea rcx, str.SetupDiEnumDeviceInterfaces_failed:__s
call fcn.14004f2f0
inc r13d
lea r8, [rsp + 0x58]
mov edx, r13d
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x14005c44f
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.1400b2a30
add rsp, 0x1c8
pop r15
pop rbp
ret
mov r15, qword [rsp + 0x48]
test rsi, rsi
je 0x14005c89f
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rsi + rbx], 0
jne 0x14005c896
lea rax, [rbx + 1]
mov rdx, rsi
cmp rax, r12
lea rbx, [0x1401e51b0]
mov rcx, rbx
cmovb r12, rax
mov r8, r12
call fcn.140135ea0
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 0x14005c8e3
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.1400e8c70
mov rcx, r14
call fcn.1400e8c70
mov eax, 1
jmp 0x14005c83a
call fcn.1400b2b58
int3