Function at 0x14004b120
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
sub rsp, 0x1c8
mov rax, qword [0x140106438]
xor rax, rsp
mov qword [rsp + 0x1a0], rax
mov qword [rsp + 0x48], rcx
mov rbp, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [0x1400d8b30]
xor edx, edx
lea r9d, [rbp + 0x13]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov r15, rax
cmp rax, rbp
jne 0x14004b182
call fcn.140041e50
mov rdx, rax
lea rcx, str.SetupDiGetClassDevs__Interface__failed:__s
call fcn.140041aa0
xor eax, eax
jmp 0x14004b5f6
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 0x14004b5c4
mov r12d, 0x104
lea rax, [0x1401576a0]
mov r8, r12
mov rcx, rax
xor edx, edx
call fcn.140093c00
mov edx, 2
mov rcx, r12
call fcn.1400966e0
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 0x14004b27d
mov qword [rsp + 0x38], rbx
lea rax, [0x1401576a0]
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 0x14004b27d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov esi, ebx
test rdi, rdi
je 0x14004b28a
mov rcx, rdi
call fcn.14009b5a0
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jne 0x14004b2d9
call fcn.140041e50
mov rdx, rax
lea rcx, str.SetupDiGetDeviceRegistryProperty__Friendly_Name__failed:__s
call fcn.140041aa0
mov eax, dword [0x1400f0eb8]
movups xmm0, xmmword [str.Generic_Optical_Drive]
mov dword [0x1401576b0], eax
movzx eax, word [0x1400f0ebc]
mov word [0x1401576b4], ax
mov byte [0x1401576b5], bl
movaps xmmword [0x1401576a0], xmm0
lea rdx, [0x1401576a0]
lea rcx, str.Found__s_optical_device
call fcn.140041aa0
mov dword [rsp + 0x78], 0x20
mov rdi, rbx
mov r14d, ebx
nop word [rax + rax]
lea rax, [rbp - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14004b31a
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, 0xffffffffffffffff
mov rcx, rdi
call fcn.14009b5a0
xor ecx, ecx
mov rdi, rbx
call fcn.14009b5a0
lea rax, [rsp + 0x78]
mov r9d, r14d
lea r8, [0x1400d8b30]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x58]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x14004b587
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 0x14004b573
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14004b557
mov edx, dword [rsp + 0x40]
lea ecx, [rax - 0x79]
call fcn.1400966e0
mov rdi, rax
test rax, rax
jne 0x14004b3b8
lea rcx, str.Unable_to_allocate_data_for_SP_DEVICE_INTERFACE_DETAIL_DATA
call fcn.140041aa0
inc r14d
jmp 0x14004b300
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 0x14004b403
call fcn.140041e50
mov rdx, rax
lea rcx, str.SetupDiGetDeviceInterfaceDetail__actual__failed:__s
call fcn.140041aa0
inc r14d
jmp 0x14004b300
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x8000000
lea rcx, [rdi + 4]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14004b57f
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 0x14004b57f
cmp qword [rsp + 0xb8], 0x1000
jle 0x14004b57f
mov ecx, 0x800
call fcn.14009b5b4
mov r14, rax
test rax, rax
je 0x14004b611
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14004b611
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 0x14004b611
cmp dword [rsp + 0x40], 0x800
jne 0x14004b611
movups xmm0, xmmword [r14 + 0x28]
lea rcx, [0x140157678]
mov rax, 0xffffffffffffffff
movups xmmword [0x140157678], xmm0
movups xmm1, xmmword [r14 + 0x38]
mov byte [0x140157698], bl
movups xmmword [0x140157688], xmm1
nop dword [rax]
inc rax
cmp byte [rcx + rax], bl
jne 0x14004b520
sub eax, 1
cdqe
js 0x14004b549
nop
cmp byte [rax + rcx], 0x20
jne 0x14004b549
cmp rax, 0x21
jae 0x14004b68f
mov byte [rax + rcx], bl
sub rax, 1
jns 0x14004b530
mov r15, qword [rsp + 0x48]
mov qword [r15 + 0x28], rcx
jmp 0x14004b616
call fcn.140041e50
mov rdx, rax
lea rcx, str.SetupDiGetDeviceInterfaceDetail__dummy__failed:__s
call fcn.140041aa0
inc r14d
jmp 0x14004b300
lea rcx, str.SetupDiGetDeviceInterfaceDetail__dummy____no_data_was_allocated
call fcn.140041aa0
inc r14d
jmp 0x14004b300
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x14004b5a8
call fcn.140041e50
mov rdx, rax
lea rcx, str.SetupDiEnumDeviceInterfaces_failed:__s
call fcn.140041aa0
inc r13d
lea r8, [rsp + 0x58]
mov edx, r13d
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x14004b1dd
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.140092060
add rsp, 0x1c8
pop r15
pop rbp
ret
mov r15, qword [rsp + 0x48]
lea rax, [rdi + 4]
test rax, rax
je 0x14004b630
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx + 4], 0
jne 0x14004b626
lea rax, [rbx + 1]
cmp rax, r12
lea rbx, [0x1401576a0]
lea rdx, [rdi + 4]
mov rcx, rbx
cmovb r12, rax
mov r8, r12
call fcn.140093550
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 0x14004b675
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.14009b5a0
mov rcx, r14
call fcn.14009b5a0
mov eax, 1
jmp 0x14004b5c6
call fcn.140092188
int3