Function at 0x40cd60
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov bh, byte [ebp + 8]
lea eax, [ebp - 0x190]
push esi
push edi
push 0x104
push 0
xor bl, bl
mov byte [ebp - 0x193], dl
push eax
mov esi, ecx
mov byte [ebp - 0x192], bh
mov byte [ebp - 0x191], bl
call fcn.00420f90
add esp, 0xc
lea eax, [ebp - 0x88]
push esi
push str..PhysicalDrive_d
push 0x80
push eax
call fcn.00401010
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 0x40ce08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryDosDeviceA_failed_error:_u
call fcn.00414ac0
push 0x440240
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.004241d3
add esp, 0x14
jmp 0x40ce1c
lea eax, [ebp - 0x190]
push eax
push str.QueryDosDeviceA_success__s
call fcn.00414ac0
add esp, 8
xor esi, esi
mov ecx, 0x80000000
test bh, bh
mov eax, 0xc0000000
cmovne ecx, eax
mov dword [ebp - 0x198], ecx
xor eax, eax
test bl, bl
push 0
push 0xa0000080
setne al
push 3
push 0
lea eax, [eax*2 + 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.00414ac0
add esp, 0x14
cmp edi, 0xffffffff
jne 0x40cf15
cmp ebx, 0x20
je 0x40ce8f
cmp ebx, 5
jne 0x40cef5
test esi, esi
jne 0x40ceb6
lea eax, [ebp - 0x190]
push eax
lea eax, [ebp - 0x88]
push eax
push str.Waiting_for_access_on__s___s_...
call fcn.00414ac0
mov bl, byte [ebp - 0x191]
add esp, 0xc
jmp 0x40ceda
mov bl, byte [ebp - 0x191]
test bl, bl
jne 0x40ceda
cmp esi, 0x32
jle 0x40ceda
push str.Warning:_Could_not_obtain_exclusive_rights._Retrying_with_write_sharing_enabled...
call fcn.00414ac0
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
cmp esi, 0x96
jl 0x40ce33
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x88]
push eax
push str.Could_not_open__s__u
call fcn.00414ac0
add esp, 0xc
jmp 0x40cffe
cmp byte [ebp - 0x192], 0
je 0x40cf47
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.00414ac0
add esp, 0xc
cmp byte [ebp - 0x193], 0
je 0x40d032
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x19c]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x90083
push edi
call esi
test eax, eax
je 0x40cf84
push str.I_O_boundary_checks_disabled
call fcn.00414ac0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ebx, eax
add ebx, 0x3a98
adc edx, 0
mov dword [ebp - 0x198], edx
nop dword [eax + eax]
push 0
lea eax, [ebp - 0x19c]
push eax
push 0
push 0
push 0
push 0
push 0x90018
push edi
call esi
test eax, eax
jne 0x40d025
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
cmp edx, dword [ebp - 0x198]
jb 0x40cfa0
ja 0x40cfd9
cmp eax, ebx
jb 0x40cfa0
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.00414ac0
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.00414ac0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret
push str.FSCTL_LOCK_VOLUME_success
call fcn.00414ac0
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret