Function at 0x402f5d
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2d48
call fcn.0040b5a0
mov eax, dword [0x41e340]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x2d44], eax
mov eax, dword [ebp + 0xc]
mov ebx, 0x104
xor edi, edi
push ebx
mov dword [ebp - 0x2d48], eax
lea eax, [ebp - 0x20c]
push edi
push eax
mov esi, edi
call fcn.00409f10
push ebx
lea eax, [ebp - 0x310]
push edi
push eax
call fcn.00409f10
add esp, 0x18
mov ebx, edi
mov dword [ebp - 0x2d38], edi
push ebx
lea eax, [ebp - 0x410]
push str..PhysicalDrive_d
push eax
call fcn.00404be9
add esp, 0xc
lea eax, [ebp - 0x410]
push edi
push edi
push 3
push edi
push 3
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2d3c], eax
cmp eax, 0xffffffff
jne 0x403008
lea eax, [ebp - 0x410]
push eax
push ebx
push str._n_d_ReadPhysicalDriveInNTWithZeroRights_ERROR_nCreateFile__s__returned_INVALID_HANDLE_VALUE_n
call fcn.004053e9
add esp, 0xc
jmp 0x40320e
mov dword [ebp - 0x2d40], edi
xor eax, eax
lea edi, [ebp - 0x2d34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
push 0x2710
lea eax, [ebp - 0x2d28]
push edi
push eax
mov dword [ebp - 0x2d34], edi
mov dword [ebp - 0x2d30], edi
call fcn.00409f10
add esp, 0xc
lea eax, [ebp - 0x2d40]
push edi
push eax
push 0x2710
lea eax, [ebp - 0x2d28]
push eax
push 0xc
lea eax, [ebp - 0x2d34]
push eax
push 0x2d1400
push dword [ebp - 0x2d3c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x403265
mov edi, 0x104
push edi
xor ebx, ebx
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.00409f10
push edi
lea eax, [ebp - 0x618]
push ebx
push eax
call fcn.00409f10
push edi
lea eax, [ebp - 0x514]
push ebx
push eax
call fcn.00409f10
add esp, 0x24
mov byte [ebp - 0x618], bl
cmp dword [ebp - 0x2d1c], ebx
jle 0x4030cd
lea eax, [ebp - 0x618]
push eax
push ebx
push dword [ebp - 0x2d1c]
lea ecx, [ebp - 0x2d28]
call fcn.00402e1e
mov byte [ebp - 0x514], bl
cmp dword [ebp - 0x2d14], ebx
jle 0x4030f4
lea eax, [ebp - 0x514]
push eax
push ebx
push dword [ebp - 0x2d14]
lea ecx, [ebp - 0x2d28]
call fcn.00402e1e
mov byte [ebp - 0x108], bl
cmp dword [ebp - 0x2d10], ebx
jle 0x403122
lea eax, [ebp - 0x108]
push eax
push 1
push dword [ebp - 0x2d10]
lea ecx, [ebp - 0x2d28]
call fcn.00402e1e
mov bl, byte [ebp - 0x108]
cmp byte [ebp - 0x20c], 0
mov bh, byte [ebp - 0xf5]
jne 0x403165
movsx eax, bl
push eax
call fcn.00406416
pop ecx
test eax, eax
jne 0x40314d
movsx eax, bh
push eax
call fcn.00406416
pop ecx
test eax, eax
je 0x403165
xor ecx, ecx
mov al, byte [ebp + ecx - 0x108]
mov byte [ebp + ecx - 0x310], al
inc ecx
test al, al
jne 0x40314f
xor esi, esi
inc esi
lea edx, [ebp - 0x20c]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40316e
sub edx, ecx
lea ecx, [ebp - 0x108]
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403180
sub ecx, edi
mov eax, 0x104
inc ecx
sub eax, edx
cmp eax, ecx
jbe 0x4031fa
movsx eax, bl
push eax
call fcn.00406416
pop ecx
test eax, eax
jne 0x4031b1
movsx eax, bh
push eax
call fcn.00406416
pop ecx
test eax, eax
je 0x4031fa
lea edx, [ebp - 0x108]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4031b9
lea edi, [ebp - 0x20c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4031c9
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x20c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4031e6
mov ax, word [0x41b9b4]
xor esi, esi
mov word [edi], ax
inc esi
mov ebx, dword [ebp - 0x2d38]
xor edi, edi
push dword [ebp - 0x2d3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
mov dword [ebp - 0x2d38], ebx
cmp ebx, 0x10
jl 0x402fb9
mov edx, dword [ebp - 0x2d44]
lea ecx, [ebp - 0x310]
mov eax, ecx
sub edx, eax
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x40322e
mov eax, dword [ebp - 0x2d48]
lea edx, [ebp - 0x20c]
mov ecx, edx
sub eax, ecx
mov cl, byte [edx]
mov byte [eax + edx], cl
inc edx
test cl, cl
jne 0x403248
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004042fc
leave
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.004053e9
pop ecx
pop ecx
jmp 0x403202