Function at 0x4560d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x5512ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x12
push 0
push 0
push 0x52c278
mov dword [ebp - 0x154], ecx
or edi, 0xffffffff
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
mov dword [ebp - 0x150], ebx
cmp ebx, edi
jne 0x456132
call fcn.0044b6b0
push eax
push str.SetupDiGetClassDevs__Interface__failed:__s
call fcn.0044b0b0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x124]
mov dword [ebp - 0x124], 0x1c
push eax
push 0
push ebx
mov dword [ebp - 0x14c], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x45611f
nop word [eax + eax]
push 0x104
push 0
push 0x59f420
call fcn.004ab0f0
add esp, 0xc
push 2
push 0x104
call fcn.004b6706
add esp, 8
mov esi, eax
lea eax, [ebp - 0x148]
push eax
push 0x104
push esi
lea eax, [ebp - 0x158]
push eax
push 0xc
lea eax, [ebp - 0x124]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x144], eax
test ebx, ebx
je 0x4561eb
push 0
push 0
push 0x104
push 0x59f420
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4561eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x144], eax
xor ebx, ebx
test esi, esi
je 0x4561f8
push esi
call fcn.004d1211
add esp, 4
push dword [ebp - 0x144]
call dword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x456245
call fcn.0044b6b0
push eax
push str.SetupDiGetDeviceRegistryProperty__Friendly_Name__failed:__s
call fcn.0044b0b0
mov eax, dword [0x543ba8]
add esp, 8
movups xmm0, xmmword [str.Generic_Optical_Drive]
mov dword [0x59f430], eax
mov ax, word [0x543bac]
mov word [0x59f434], ax
movups xmmword [0x59f420], xmm0
mov byte [0x59f435], bl
push 0x59f420
push str.Found__s_optical_device
call fcn.0044b0b0
add esp, 8
mov dword [ebp - 0x140], 0x1c
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x144], esi
nop dword [eax + eax]
cmp edi, 0xffffffff
je 0x456283
test edi, edi
je 0x456283
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, 0xffffffff
push ebx
call fcn.004d1211
add esp, 4
xor ebx, ebx
push ebx
call fcn.004d1211
add esp, 4
lea eax, [ebp - 0x140]
push eax
push esi
mov esi, dword [ebp - 0x150]
lea eax, [ebp - 0x124]
push 0x52c278
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x4564fd
push ebx
lea eax, [ebp - 0x148]
push eax
push ebx
push ebx
lea eax, [ebp - 0x140]
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
jne 0x4564df
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4564bb
push dword [ebp - 0x148]
push 1
call fcn.004b6706
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x456323
push str.Unable_to_allocate_data_for_SP_DEVICE_INTERFACE_DETAIL_DATA
call fcn.0044b0b0
add esp, 4
inc dword [ebp - 0x144]
mov esi, dword [ebp - 0x144]
jmp 0x456270
push 0
lea eax, [ebp - 0x148]
mov dword [ebx], 5
push eax
push dword [ebp - 0x148]
lea eax, [ebp - 0x140]
push ebx
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
jne 0x45636f
call fcn.0044b6b0
push eax
push str.SetupDiGetDeviceInterfaceDetail__actual__failed:__s
call fcn.0044b0b0
add esp, 8
inc dword [ebp - 0x144]
mov esi, dword [ebp - 0x144]
jmp 0x456270
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
lea esi, [ebx + 4]
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4564ec
push 0
lea eax, [ebp - 0x148]
push eax
push 0x100
lea eax, [ebp - 0x108]
push eax
push 0
push 0
push 0x700a0
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4564ec
cmp dword [ebp - 0xec], 0
jg 0x4563e2
jl 0x4564ec
cmp dword [ebp - 0xf0], 0x1000
jbe 0x4564ec
push 0x800
call fcn.004d122c
mov edx, eax
add esp, 4
mov dword [ebp - 0x144], edx
test edx, edx
je 0x4564ab
push 0
push 0
push 0
push 0x8000
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x4564ab
push 0
lea eax, [ebp - 0x148]
push eax
push 0x800
push dword [ebp - 0x144]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4564ab
cmp dword [ebp - 0x148], 0x800
jne 0x4564ab
mov eax, dword [ebp - 0x144]
mov ecx, 0x59f3f8
movups xmm0, xmmword [eax + 0x28]
lea edx, [ecx + 1]
movups xmmword [0x59f3f8], xmm0
movups xmm0, xmmword [eax + 0x38]
mov byte [0x59f418], 0
movups xmmword [0x59f408], xmm0
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x456470
sub ecx, edx
lea eax, [ecx - 1]
test eax, eax
js 0x45649e
cmp byte [eax + 0x59f3f8], 0x20
jne 0x45649e
cmp eax, 0x21
jae 0x45661f
mov byte [eax + 0x59f3f8], 0
sub eax, 1
jns 0x456480
mov eax, dword [ebp - 0x154]
mov dword [eax + 0x20], 0x59f3f8
test esi, esi
jne 0x456548
xor ecx, ecx
inc ecx
jmp 0x456579
call fcn.0044b6b0
push eax
push str.SetupDiGetDeviceInterfaceDetail__dummy__failed:__s
call fcn.0044b0b0
add esp, 8
inc dword [ebp - 0x144]
mov esi, dword [ebp - 0x144]
jmp 0x456270
push str.SetupDiGetDeviceInterfaceDetail__dummy____no_data_was_allocated
call fcn.0044b0b0
add esp, 4
inc dword [ebp - 0x144]
mov esi, dword [ebp - 0x144]
jmp 0x456270
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
je 0x45651d
call fcn.0044b6b0
push eax
push str.SetupDiEnumDeviceInterfaces_failed:__s
call fcn.0044b0b0
add esp, 8
mov eax, dword [ebp - 0x14c]
lea ecx, [ebp - 0x124]
inc eax
push ecx
push eax
push esi
mov dword [ebp - 0x14c], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x45611f
mov ebx, esi
jmp 0x456160
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x456550
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x456574
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x456568
sub ecx, edx
inc ecx
jmp 0x456579
mov ecx, 0x104
push ecx
push esi
push 0x59f420
call fcn.004aab70
add esp, 0xc
test esi, esi
jne 0x45658f
inc esi
jmp 0x4565c1
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x456594
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x4565bc
lea ecx, [esi + 1]
nop word [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4565b0
sub esi, ecx
inc esi
jmp 0x4565c1
mov esi, 0x104
mov edx, dword [ebp - 0x154]
mov eax, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0xec]
mov byte [esi + 0x59f41f], 0
mov dword [edx + 0x18], 0x59f420
mov dword [edx + 0x10], eax
mov dword [edx + 0x14], ecx
test edi, edi
je 0x4565f2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.004d1211
add esp, 4
push dword [ebp - 0x144]
call fcn.004d1211
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 1
pop edi
pop esi
pop ebx
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
call fcn.004a8c90
int3