Function at 0x4218b0
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3814
call fcn.0081558c
mov eax, dword [0x689640]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x37c4], ecx
mov dword [ebp - 0x37f8], 0
mov dword [ebp - 0x37c8], 0
mov dword [ebp - 0x37c8], 0
jmp 0x4218fc
mov eax, dword [ebp - 0x37c8]
add eax, 1
mov dword [ebp - 0x37c8], eax
cmp dword [ebp - 0x37c8], 1
jge 0x421d5b
mov dword [ebp - 0x37cc], 0
mov ecx, dword [ebp - 0x37c8]
push ecx
push 0x6101e8
push 0x100
lea edx, [ebp - 0x104]
push edx
call fcn.00422dc0
add esp, 0x10
push 0
push 0
push 3
push 0
push 3
push 0
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x37cc], eax
cmp dword [ebp - 0x37cc], 0xffffffff
jne 0x4219e9
mov dword [ebp - 0x37d8], 0x100
mov ecx, dword [ebp - 0x37c4]
add ecx, 0x800
mov dword [ebp - 0x37fc], ecx
mov edx, dword [ebp - 0x37fc]
mov dword [ebp - 0x37d4], edx
cmp dword [ebp - 0x37d8], 0
je 0x4219b9
mov eax, dword [ebp - 0x37d4]
mov byte [eax], 0
mov ecx, dword [ebp - 0x37d4]
add ecx, 1
mov dword [ebp - 0x37d4], ecx
mov edx, dword [ebp - 0x37d8]
sub edx, 1
mov dword [ebp - 0x37d8], edx
jmp 0x421987
lea eax, [ebp - 0x104]
push eax
push 0x143
push str._d_ReadPhysicalDriveInNTWithZeroRights_ERROR_CreateFileA__s__returned_INVALID_HANDLE_VALUE
push 0x100
mov ecx, dword [ebp - 0x37c4]
add ecx, 0x800
push ecx
call fcn.00422dc0
add esp, 0x14
jmp 0x421d56
mov dword [ebp - 0x37ec], 0
xor edx, edx
mov dword [ebp - 0x37c0], edx
mov dword [ebp - 0x37bc], edx
mov dword [ebp - 0x37b8], edx
mov dword [ebp - 0x37c0], 0
mov dword [ebp - 0x37bc], 0
push 0x2710
push 0
lea eax, [ebp - 0x37b4]
push eax
call fcn.00812c16
add esp, 0xc
push 0
lea ecx, [ebp - 0x37ec]
push ecx
push 0x2710
lea edx, [ebp - 0x37b4]
push edx
push 0xc
lea eax, [ebp - 0x37c0]
push eax
push 0x2d1400
mov ecx, dword [ebp - 0x37cc]
push ecx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
je 0x421cc2
lea edx, [ebp - 0x37b4]
mov dword [ebp - 0x37d0], edx
lea eax, [ebp - 0xcbc]
push eax
lea ecx, [ebp - 0x37b4]
push ecx
push 0
mov edx, dword [ebp - 0x37d0]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x37c4]
call fcn.00422000
lea ecx, [ebp - 0x8d4]
push ecx
lea edx, [ebp - 0x37b4]
push edx
push 0
mov eax, dword [ebp - 0x37d0]
mov ecx, dword [eax + 0x10]
push ecx
mov ecx, dword [ebp - 0x37c4]
call fcn.00422000
lea edx, [ebp - 0x10a4]
push edx
lea eax, [ebp - 0x37b4]
push eax
push 0
mov ecx, dword [ebp - 0x37d0]
mov edx, dword [ecx + 0x14]
push edx
mov ecx, dword [ebp - 0x37c4]
call fcn.00422000
lea eax, [ebp - 0x4ec]
push eax
lea ecx, [ebp - 0x37b4]
push ecx
push 0
mov edx, dword [ebp - 0x37d0]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x37c4]
call fcn.00422000
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 0x37c4]
movsx ecx, byte [eax + edx]
test ecx, ecx
jne 0x421bab
mov edx, 1
imul eax, edx, 0
movsx cx, byte [ebp + eax - 0x4ec]
movzx edx, cx
push edx
call fcn.005a5da9
add esp, 4
test eax, eax
jne 0x421b65
mov eax, 1
imul ecx, eax, 0x13
movsx dx, byte [ebp + ecx - 0x4ec]
movzx eax, dx
push eax
call fcn.005a5da9
add esp, 4
test eax, eax
je 0x421bab
lea ecx, [ebp - 0x4ec]
push ecx
push 0x400
mov edx, dword [ebp - 0x37c4]
push edx
call fcn.005a5f14
add esp, 0xc
lea eax, [ebp - 0x8d4]
push eax
push 0x400
mov ecx, dword [ebp - 0x37c4]
add ecx, 0x400
push ecx
call fcn.005a5f14
add esp, 0xc
mov dword [ebp - 0x37f8], 1
push 0x2710
push 0
lea edx, [ebp - 0x37b4]
push edx
call fcn.00812c16
add esp, 0xc
push 0
lea eax, [ebp - 0x37ec]
push eax
push 0x2710
lea ecx, [ebp - 0x37b4]
push ecx
push 0
push 0
push 0x700a0
mov edx, dword [ebp - 0x37cc]
push edx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
jne 0x421c6b
mov dword [ebp - 0x37e0], 0x100
mov eax, dword [ebp - 0x37c4]
add eax, 0x800
mov dword [ebp - 0x3800], eax
mov ecx, dword [ebp - 0x3800]
mov dword [ebp - 0x37dc], ecx
cmp dword [ebp - 0x37e0], 0
je 0x421c49
mov edx, dword [ebp - 0x37dc]
mov byte [edx], 0
mov eax, dword [ebp - 0x37dc]
add eax, 1
mov dword [ebp - 0x37dc], eax
mov ecx, dword [ebp - 0x37e0]
sub ecx, 1
mov dword [ebp - 0x37e0], ecx
jmp 0x421c17
lea edx, [ebp - 0x104]
push edx
push str._s_ReadPhysicalDriveInNTWithZeroRights_ERROR_DeviceIoControl____IOCTL_DISK_GET_DRIVE_GEOMETRY_EX__returned_0
mov eax, dword [ebp - 0x37c4]
add eax, 0x800
push eax
call fcn.00422d60
add esp, 0xc
jmp 0x421cbd
lea ecx, [ebp - 0x37b4]
mov dword [ebp - 0x37f4], ecx
mov edx, dword [ebp - 0x37f4]
cmp dword [edx + 8], 0xc
jne 0x421c8f
mov dword [ebp - 0x37f0], 1
jmp 0x421c99
mov dword [ebp - 0x37f0], 0
mov eax, dword [ebp - 0x37f0]
mov dword [ebp - 0x380c], eax
mov ecx, dword [ebp - 0x37f4]
mov edx, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
mov dword [ebp - 0x3814], edx
mov dword [ebp - 0x3810], eax
jmp 0x421d49
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x3808], eax
mov dword [ebp - 0x37e8], 0x100
mov ecx, dword [ebp - 0x37c4]
add ecx, 0x800
mov dword [ebp - 0x3804], ecx
mov edx, dword [ebp - 0x3804]
mov dword [ebp - 0x37e4], edx
cmp dword [ebp - 0x37e8], 0
je 0x421d28
mov eax, dword [ebp - 0x37e4]
mov byte [eax], 0
mov ecx, dword [ebp - 0x37e4]
add ecx, 1
mov dword [ebp - 0x37e4], ecx
mov edx, dword [ebp - 0x37e8]
sub edx, 1
mov dword [ebp - 0x37e8], edx
jmp 0x421cf6
mov eax, dword [ebp - 0x3808]
push eax
push str.DeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
mov ecx, dword [ebp - 0x37c4]
add ecx, 0x800
push ecx
call fcn.00422d60
add esp, 0xc
mov edx, dword [ebp - 0x37cc]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x4218ed
mov eax, dword [ebp - 0x37f8]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00817892
mov esp, ebp
pop ebp
ret