Function at 0x415676
Capabilities:
Get disk information via ioctl
Read file on windows

Disassembly:
push ebp
push ebx
push edi
mov edx, 0x243
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x41567e
call fcn.0045e790
mov eax, dword [esp + 0x924]
mov dword [esp], eax
lea ebp, [esp + 4]
mov dword [ebp], 0x1c
lea eax, [esp + 4]
push eax
push dword [esp + 0x924]
mov ebp, 0x46ff08
push ebp
push 0
push dword [esp + 0x92c]
call sub.setupapi.dll_SetupDiEnumDeviceInterfaces
mov ebx, eax
and ebx, ebx
jne 0x4156d5
xor eax, eax
jmp 0x415d40
push 0
lea eax, [esp + 0x24]
push eax
push 0
push 0
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x930]
call sub.setupapi.dll_SetupDiGetDeviceInterfaceDetailW
cmp dword [esp + 0x20], 0
je 0x415705
xor eax, eax
jmp 0x41570a
mov eax, 1
and eax, eax
je 0x415715
xor eax, eax
jmp 0x415d40
push dword [esp + 0x20]
pop eax
mov dword [esp + 0x24], eax
lea ebp, [esp + 0x30]
mov dword [ebp], 6
push 0
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x2c]
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x930]
call sub.setupapi.dll_SetupDiGetDeviceInterfaceDetailW
and eax, eax
je 0x415d3e
mov edx, dword [esp]
push dword [edx]
call fcn.0045e3e5
mov dword [esp + 0x8d0], eax
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x80000000
lea ebp, [esp + 0x48]
lea eax, [ebp + 4]
push eax
call sub.kernel32.dll_CreateFileW
mov dword [esp + 0x8d4], eax
mov ebx, dword [esp + 0x8d4]
cmp ebx, 0xffffffff
je 0x415d3e
push 0
lea eax, [esp + 0x8dc]
push eax
push 0xc
lea eax, [esp + 0x840]
push eax
push 0
push 0
push 0x2d1080
push dword [esp + 0x8f0]
call sub.kernel32.dll_DeviceIoControl
push 0
lea eax, [esp + 0x8dc]
push eax
push 0x90
lea eax, [esp + 0x84c]
push eax
push 0
push 0
push 0x70048
push dword [esp + 0x8f0]
call sub.kernel32.dll_DeviceIoControl
push edx
call fcn.0045e620
pop edx
push eax
mov edx, str.Disk
push edx
call fcn.0045e6f0
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
lea ebp, [esp + 0x840]
mov eax, dword [ebp + 4]
cdq
push edx
push eax
call fcn.0044f300
pop eax
lea eax, [esp + 0x30]
push eax
call fcn.0045e660
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e620
pop edx
push eax
mov edx, 0x4629b0
push edx
call fcn.0045e6f0
mov edx, dword [esp + 0x34]
push edx
call fcn.0045e6f0
mov edx, 0x4629b0
push edx
call fcn.0045e6f0
call fcn.0045e850
push edx
call fcn.0045e620
pop edx
push eax
mov edx, 0x4629b0
push edx
call fcn.0045e6f0
mov ebp, dword [0x473558]
mov edx, dword [ebp + 0xb0]
push edx
call fcn.0045e6f0
mov edx, 0x4629b0
push edx
call fcn.0045e6f0
call fcn.0044e2d2
add dword [esp], edx
call fcn.0044e2d2
add dword [esp + 4], edx
call fcn.0044f710
call fcn.0044e2f0
and eax, eax
je 0x4158db
jmp 0x415d32
lea ebp, [esp + 0x840]
push dword [ebp]
xor ebx, ebx
cmp ebx, dword [esp]
jne 0x415b1c
push 0x400
call fcn.0045ac20
mov dword [esp + 0x8f0], eax
push 0
lea eax, [esp + 0x8f0]
push eax
push 0x400
push dword [esp + 0x8fc]
push dword [esp + 0x8e8]
call sub.kernel32.dll_ReadFile
push dword [esp + 0x8d8]
call sub.kernel32.dll_CloseHandle
mov ebx, dword [esp + 0x8f0]
add ebx, 0x1be
mov dword [esp + 0x8fc], ebx
mov dword [esp + 0x8e0], 1
jmp 0x415953
mov eax, 4
cmp eax, dword [esp + 0x8e0]
jl 0x4159fc
mov ebp, dword [esp + 0x8fc]
movzx ebx, byte [ebp]
push ebx
mov ebx, pe_nt_image_headers32
cmp ebx, dword [esp]
jne 0x4159ba
mov ebx, dword [esp + 0x8f8]
add ebx, dword [esp + 0x8e4]
mov dword [esp + 0x8f8], ebx
mov ebx, dword [esp + 0x900]
add ebx, 8
mov dword [esp + 0x904], ebx
mov ebp, dword [esp + 0x904]
push dword [ebp]
pop eax
mov dword [esp + 0x8fc], eax
add esp, 4
jmp 0x4159fc
mov ebx, 5
cmp ebx, dword [esp]
je 0x4159ce
mov ebx, 0xf
cmp ebx, dword [esp]
jne 0x4159dd
mov ebx, dword [esp + 0x8f8]
dec ebx
mov dword [esp + 0x8f8], ebx
pop eax
mov ebx, dword [esp + 0x8fc]
add ebx, 0x10
mov dword [esp + 0x8fc], ebx
inc dword [esp + 0x8e0]
jno 0x415953
push dword [esp + 0x8f0]
call fcn.0045ac40
mov dword [esp + 0x8e4], 0
jmp 0x415a15
mov eax, dword [esp + 0x8d4]
cmp eax, dword [esp + 0x8e4]
jl 0x415b17
lea ebp, [esp + 0x838]
mov ebx, dword [ebp + 4]
mov edi, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul edi, edi, 0x14
add ebp, edi
cmp ebx, dword [ebp + 8]
jne 0x415a8d
mov ebx, dword [esp + 0x8f4]
mov edi, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul edi, edi, 0x14
add ebp, edi
cmp ebx, dword [ebp + 0xc]
jne 0x415a8d
mov ebx, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul ebx, ebx, 0x14
add ebp, ebx
push dword [ebp]
call fcn.0044f9d0
and eax, eax
je 0x415a8d
mov eax, 1
jmp 0x415a8f
xor eax, eax
and eax, eax
je 0x415b0a
push edx
call fcn.0045e620
pop edx
push eax
call fcn.0044811a
lea eax, [esp + 0x30]
push eax
call fcn.0045e660
mov ebx, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul ebx, ebx, 0x14
add ebp, ebx
push dword [ebp]
push dword [esp + 0x30]
push 1
call sub.kernel32.dll_DefineDosDeviceW
mov ebp, dword [0x473558]
push dword [ebp + 0xac]
mov edx, 0x46105e
pop ecx
call fcn.0044e300
je 0x415b0a
mov edx, dword [esp + 0x2c]
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e6f0
mov ebp, dword [0x473558]
lea eax, [ebp + 0xac]
push eax
call fcn.0045e660
inc dword [esp + 0x8e4]
jno 0x415a15
jmp 0x415d31
mov ebx, 1
cmp ebx, dword [esp]
jne 0x415d31
push 0x8000
call fcn.0045ac20
mov dword [esp + 0x904], eax
push dword [esp + 0x904]
pop eax
mov dword [esp + 0x908], eax
push 0
lea eax, [esp + 0x8e0]
push eax
push 0x8000
push dword [esp + 0x910]
push 0
push 0
push 0x70050
push dword [esp + 0x8f4]
call sub.kernel32.dll_DeviceIoControl
and eax, eax
je 0x415d25
mov ebx, dword [esp + 0x908]
add ebx, 0x30
mov dword [esp + 0x908], ebx
mov dword [esp + 0x8e0], 1
jmp 0x415ba4
mov ebp, dword [esp + 0x904]
mov eax, dword [ebp + 4]
cmp eax, dword [esp + 0x8e0]
jl 0x415d25
push dword [esp + 0x908]
pop eax
mov dword [esp + 0x90c], eax
push 0x10
mov ebp, dword [esp + 0x910]
lea eax, [ebp + 0x20]
push eax
mov ebp, 0x46fea6
push ebp
call sub.MSVCRT.dll_memcmp
add esp, 0xc
mov ebx, eax
and ebx, ebx
jne 0x415d04
mov dword [esp + 0x8e4], 0
jmp 0x415bff
mov eax, dword [esp + 0x8d4]
cmp eax, dword [esp + 0x8e4]
jl 0x415d04
lea ebp, [esp + 0x838]
mov ebx, dword [ebp + 4]
mov edi, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul edi, edi, 0x14
add ebp, edi
cmp ebx, dword [ebp + 8]
jne 0x415c7a
mov ebp, dword [esp + 0x90c]
mov ebx, dword [ebp + 0x18]
mov edi, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul edi, edi, 0x14
add ebp, edi
cmp ebx, dword [ebp + 0xc]
jne 0x415c7a
mov ebx, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul ebx, ebx, 0x14
add ebp, ebx
push dword [ebp]
call fcn.0044f9d0
and eax, eax
je 0x415c7a
mov eax, 1
jmp 0x415c7c
xor eax, eax
and eax, eax
je 0x415cf7
push edx
call fcn.0045e620
pop edx
push eax
call fcn.0044811a
lea eax, [esp + 0x30]
push eax
call fcn.0045e660
mov ebx, dword [esp + 0x8e4]
mov edx, dword [esp + 4]
mov ebp, dword [edx]
imul ebx, ebx, 0x14
add ebp, ebx
push dword [ebp]
push dword [esp + 0x30]
push 1
call sub.kernel32.dll_DefineDosDeviceW
mov ebp, dword [0x473558]
push dword [ebp + 0xac]
mov edx, 0x46105e
pop ecx
call fcn.0044e300
je 0x415cf7
mov edx, dword [esp + 0x2c]
push edx
call fcn.0045e620
pop edx
push eax
push edx
call fcn.0045e6f0
mov ebp, dword [0x473558]
lea eax, [ebp + 0xac]
push eax
call fcn.0045e660
inc dword [esp + 0x8e4]
jno 0x415bff
mov ebx, dword [esp + 0x908]
add ebx, 0x90
mov dword [esp + 0x908], ebx
inc dword [esp + 0x8e0]
jno 0x415ba4
push dword [esp + 0x904]
call fcn.0045ac40
pop eax
push dword [esp + 0x8d4]
call sub.kernel32.dll_CloseHandle
xor eax, eax
push dword [esp + 0x28]
call fcn.0045e7f0
push dword [esp + 0x2c]
call fcn.0045e7f0
push dword [esp + 0x8e4]
call fcn.0045e7f0
add esp, 0x90c
pop edi
pop ebx
pop ebp
ret 0xc