Function at 0x402c8c
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x188
mov eax, dword [ecx]
xor ecx, ecx
mov dword [ebp - 0x160], eax
mov dword [esp + 0xc], 0x12
mov dword [esp + 8], ecx
mov dword [esp + 4], ecx
mov dword [esp], 0x4c249c
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [ebp - 0x15c], eax
sub esp, 0x10
inc eax
jne 0x402cf0
call fcn.0043df77
mov dword [esp], str.SetupDiGetClassDevs__Interface__failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x40314b
mov dword [ebp - 0x150], 0x1c
xor edx, edx
or ebx, 0xffffffff
mov dword [ebp - 0x16c], edx
lea esi, [ebp - 0x150]
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x16c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
sub esp, 0xc
test eax, eax
je 0x40314b
mov edx, 0x4df0c0
xor eax, eax
mov ecx, 0x41
mov edi, edx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x158]
mov dword [esp], edx
mov edx, esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x15c]
lea ecx, [ebp - 0x154]
call fcn.0040266e
test eax, eax
jne 0x402d97
call fcn.0043df77
mov dword [esp], str.SetupDiGetDeviceRegistryProperty__Friendly_Name__failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
mov ecx, str.Generic_Optical_Drive
mov edx, 0x104
mov dword [esp], 0x16
mov eax, 0x4df0c0
call fcn.004024ec
mov dword [esp + 4], 0x4df0c0
xor esi, esi
mov dword [esp], str.Found__s_optical_device
call fcn.0043d9e0
xor eax, eax
mov dword [ebp - 0x134], 0x1c
mov dword [ebp - 0x170], eax
lea eax, [ebx - 1]
cmp eax, 0xfffffffd
ja 0x402dd4
mov dword [esp], ebx
or ebx, 0xffffffff
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
mov dword [esp], esi
lea edi, [ebp - 0x134]
call sub.msvcrt.dll_free
mov dword [esp + 0x10], edi
mov eax, dword [ebp - 0x170]
mov dword [esp + 8], 0x4c249c
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x150]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
sub esp, 0x14
test eax, eax
jne 0x402e43
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x103
je 0x403140
call fcn.0043df77
mov dword [esp], str.SetupDiEnumDeviceInterfaces_failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x403140
xor eax, eax
mov dword [esp + 4], edi
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x158]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
mov eax, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
mov dword [ebp - 0x168], eax
call eax
mov dword [ebp - 0x164], eax
sub esp, 0x18
test eax, eax
jne 0x402f38
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
jne 0x402f1c
mov edx, dword [ebp - 0x158]
mov dword [esp + 4], edx
mov dword [ebp - 0x174], edx
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov edx, dword [ebp - 0x174]
test eax, eax
mov esi, eax
jne 0x402ec8
mov dword [esp], str.Unable_to_allocate_data_for_SP_DEVICE_INTERFACE_DETAIL_DATA
jmp 0x402f3f
mov dword [eax], 5
xor eax, eax
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x158]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
mov eax, dword [ebp - 0x168]
call eax
sub esp, 0x18
test eax, eax
jne 0x402f46
call fcn.0043df77
mov dword [esp], str.SetupDiGetDeviceInterfaceDetail__actual__failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x403135
call fcn.0043df77
mov dword [esp], str.SetupDiGetDeviceInterfaceDetail__dummy__failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
xor esi, esi
jmp 0x403135
mov dword [esp], str.SetupDiGetDeviceInterfaceDetail__dummy____no_data_was_allocated
call fcn.0043d9e0
jmp 0x402f31
lea eax, [esi + 4]
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x168], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0x8000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x403135
xor eax, eax
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x158]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x118]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x700a0
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x403135
mov eax, 0x1000
cmp eax, dword [ebp - 0x100]
mov eax, dword [ebp - 0x164]
sbb eax, dword [ebp - 0xfc]
jge 0x403135
mov dword [esp], 0x800
call sub.msvcrt.dll_malloc
mov edi, eax
test eax, eax
je 0x4030c0
xor ecx, ecx
xor eax, eax
mov dword [esp + 4], 0x8000
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
sub esp, 0x14
test eax, eax
je 0x4030c0
xor edx, edx
lea eax, [ebp - 0x158]
mov dword [esp + 8], 0x800
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
sub esp, 0x14
test eax, eax
je 0x4030c0
cmp dword [ebp - 0x158], 0x800
jne 0x4030c0
movups xmm0, xmmword [edi + 0x28]
movups xmm1, xmmword [edi + 0x38]
mov byte [0x4df0a0], 0
movups xmmword [0x4df080], xmm0
movups xmmword [0x4df090], xmm1
mov dword [esp], 0x4df080
call sub.msvcrt.dll_strlen
sub eax, 1
jae 0x4030ae
mov eax, dword [ebp - 0x160]
mov dword [eax + 0x20], 0x4df080
jmp 0x4030c0
cmp byte [eax + 0x4df080], 0x20
jne 0x40309f
mov byte [eax + 0x4df080], 0
jmp 0x40309a
mov eax, dword [ebp - 0x168]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov edx, 0x104
inc eax
mov dword [esp], eax
mov ecx, dword [ebp - 0x168]
mov eax, 0x4df0c0
call fcn.004024ec
mov eax, dword [ebp - 0x160]
mov ecx, dword [ebp - 0x160]
mov edx, dword [ebp - 0xfc]
mov dword [eax + 0x18], 0x4df0c0
mov eax, dword [ebp - 0x100]
mov dword [ecx + 0x14], edx
mov dword [ecx + 0x10], eax
lea eax, [ebx - 1]
cmp eax, 0xfffffffd
ja 0x40311e
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], edi
call sub.msvcrt.dll_free
mov eax, 1
jmp 0x40314d
inc dword [ebp - 0x170]
jmp 0x402dbf
inc dword [ebp - 0x16c]
jmp 0x402d05
xor eax, eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret