Function at 0x4107b0
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x2ce8
call fcn.00443760
mov eax, dword [0x56a338]
xor eax, esp
mov dword [esp + 0x2ce4], eax
mov eax, dword [esp + 0x2cec]
push ebx
push ebp
mov dword [esp + 0x14], eax
xor ebx, ebx
push esi
xor eax, eax
push edi
mov dword [esp + 0x18], eax
nop
push eax
lea ecx, [esp + 0x3e4]
push str..PhysicalDrive_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea edx, [esp + 0x3f8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x410adc
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
push 0x2710
mov dword [esp + 0x30], eax
lea eax, [esp + 0x5e4]
push ebx
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.00435740
add esp, 0xc
push ebx
lea ecx, [esp + 0x18]
push ecx
push 0x2710
lea edx, [esp + 0x5ec]
push edx
push 0xc
lea eax, [esp + 0x38]
push eax
push 0x2d1400
push ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x410ac1
push 0x7f
lea ecx, [esp + 0x365]
push ebx
push ecx
call fcn.00435740
add esp, 0xc
push 0x7f
lea edx, [esp + 0x265]
push ebx
push edx
call fcn.00435740
add esp, 0xc
push 0x7f
lea eax, [esp + 0x1e5]
push ebx
push eax
call fcn.00435740
add esp, 0xc
push 0x7f
lea ecx, [esp + 0x2e5]
push ebx
push ecx
call fcn.00435740
mov eax, dword [esp + 0x5f8]
add esp, 0xc
cmp eax, ebx
mov byte [esp + 0x1e0], bl
jle 0x4108e8
push ebx
lea edi, [esp + 0x1e4]
lea ecx, [esp + 0x5e4]
call fcn.00410640
mov eax, dword [esp + 0x5f0]
cmp eax, ebx
mov byte [esp + 0x260], bl
jle 0x41090e
push ebx
lea edi, [esp + 0x264]
lea ecx, [esp + 0x5e4]
call fcn.00410640
mov eax, dword [esp + 0x5f4]
cmp eax, ebx
mov byte [esp + 0x2e0], bl
jle 0x410934
push ebx
lea edi, [esp + 0x2e4]
lea ecx, [esp + 0x5e4]
call fcn.00410640
mov eax, dword [esp + 0x5f8]
cmp eax, ebx
mov byte [esp + 0x360], bl
jle 0x41095b
push 1
lea edi, [esp + 0x364]
lea ecx, [esp + 0x5e4]
call fcn.00410640
lea esi, [esp + 0x30]
call fcn.00410590
lea eax, [esp + 0x1e0]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x410970
sub eax, edx
je 0x410992
xor eax, eax
nop
mov cl, byte [esp + eax + 0x1e0]
mov byte [esp + eax + 0x58], cl
add eax, 1
cmp cl, bl
jne 0x410980
lea eax, [esp + 0x260]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4109a0
sub eax, edx
je 0x4109e2
lea eax, [esp + 0x260]
mov edx, eax
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4109b6
lea edi, [esp + 0x58]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
cmp cl, bl
jne 0x4109c8
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
jmp 0x4109f0
mov cl, byte [esp + eax + 0x2e0]
mov byte [esp + eax + 0x158], cl
add eax, 1
cmp cl, bl
jne 0x4109f0
xor eax, eax
jmp 0x410a10
mov cl, byte [esp + eax + 0x360]
mov byte [esp + eax + 0xd8], cl
add eax, 1
cmp cl, bl
jne 0x410a10
lea esi, [esp + 0xd8]
call fcn.00410c40
lea esi, [esp + 0x58]
call fcn.00410c40
lea esi, [esp + 0x158]
call fcn.00410c40
push 0x2710
lea edx, [esp + 0x5e4]
push ebx
push edx
call fcn.00435740
add esp, 0xc
push ebx
lea eax, [esp + 0x18]
push eax
push 0x2710
lea ecx, [esp + 0x5ec]
push ecx
push ebx
push ebx
push 0x700a0
push ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x410adc
mov edx, dword [esp + 0x5f8]
mov eax, dword [esp + 0x5fc]
xor ecx, ecx
cmp dword [esp + 0x5e8], 0xc
mov dword [esp + 0x30], edx
setne cl
lea edx, [esp + 0x30]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x1c]
push edx
sub ecx, 1
and ecx, 2
mov dword [esp + 0x1dc], ecx
call fcn.00410fe0
jmp 0x410ad5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.00431e44
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, 0x10
mov dword [esp + 0x18], eax
jl 0x4107e0
mov ecx, dword [esp + 0x2cf4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0042eb95
add esp, 0x2ce8
ret 4