Function at 0x406e50
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x103
mov dword [ebp - 0x19c], eax
xor bl, bl
lea eax, [ebp - 0x18f]
mov byte [ebp - 0x192], dl
push 0
push eax
mov esi, ecx
mov byte [ebp - 0x191], bl
mov byte [ebp - 0x190], bl
call fcn.004198c0
add esp, 0xc
lea eax, [ebp - 0x88]
push esi
push str..PhysicalDrive_d
push 0x80
push eax
call fcn.004136cf
add esp, 0x10
lea eax, [ebp - 0x190]
push 0x104
push eax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
jne 0x406efe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryDosDeviceA_failed_error:_u
call fcn.0040c4e0
push 0x429124
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.00413978
add esp, 0x14
jmp 0x406f12
lea eax, [ebp - 0x190]
push eax
push str.QueryDosDeviceA_success__s
call fcn.0040c4e0
add esp, 8
xor ecx, ecx
xor esi, esi
cmp byte [ebp - 0x19c], cl
mov eax, 0x40000000
cmovne ecx, eax
or ecx, 0x80000000
lea edx, [esi + 2]
mov dword [ebp - 0x198], ecx
push 0
xor eax, eax
test bl, bl
push 0xa0000080
push 3
cmovne eax, edx
push 0
or eax, 1
push eax
push ecx
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov ebx, eax
lea eax, [ebp - 0x88]
push ebx
push eax
push esi
push str.__d__CreateFileA__s_code:_u__p
call fcn.0040c4e0
add esp, 0x14
cmp edi, 0xffffffff
jne 0x407016
cmp ebx, 0x20
je 0x406f8b
cmp ebx, 5
jne 0x406ff6
test esi, esi
jne 0x406fb2
lea eax, [ebp - 0x190]
push eax
lea eax, [ebp - 0x88]
push eax
push str.Waiting_for_access_on__s___s_...
call fcn.0040c4e0
mov bl, byte [ebp - 0x191]
add esp, 0xc
jmp 0x406fd6
mov bl, byte [ebp - 0x191]
test bl, bl
jne 0x406fd6
cmp esi, 0x32
jle 0x406fd6
push str.Warning:_Could_not_obtain_exclusive_rights._Retrying_with_write_sharing_enabled...
call fcn.0040c4e0
mov bl, 1
add esp, 4
mov byte [ebp - 0x191], bl
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x198]
inc esi
mov edx, 2
cmp esi, 0x96
jl 0x406f33
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x88]
push eax
push str.Could_not_open__s__u
call fcn.0040c4e0
add esp, 0xc
jmp 0x4070fe
cmp byte [ebp - 0x19c], 0
je 0x407048
cmp byte [ebp - 0x191], 0
mov ecx, str.exclusive
mov eax, str.shared
cmove eax, ecx
push eax
lea eax, [ebp - 0x88]
push eax
push str.Opened__s_for__s_write_access
call fcn.0040c4e0
add esp, 0xc
cmp byte [ebp - 0x192], 0
je 0x407132
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x1a0]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x90083
push edi
call ebx
test eax, eax
je 0x407085
push str.I_O_boundary_checks_disabled
call fcn.0040c4e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov esi, eax
mov eax, edx
add esi, 0x3a98
adc eax, 0
mov dword [ebp - 0x198], eax
mov edi, edi
push 0
lea eax, [ebp - 0x1a0]
push eax
push 0
push 0
push 0
push 0
push 0x90018
push edi
call ebx
test eax, eax
jne 0x407125
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
cmp edx, dword [ebp - 0x198]
jb 0x4070a0
ja 0x4070d9
cmp eax, esi
jb 0x4070a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x88]
push eax
push str.Could_not_lock_access_to__s__u
call fcn.0040c4e0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, 0xffffffff
lea eax, [ebp - 0x190]
push eax
push str.Can_get_handle_of__s__maybe_some_process_control_it.
call fcn.0040c4e0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004136c0
mov esp, ebp
pop ebp
ret
push str.FSCTL_LOCK_VOLUME_success
call fcn.0040c4e0
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004136c0
mov esp, ebp
pop ebp
ret