Function at 0x51a274
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeb0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x13c], ebx
mov dword [ebp - 0x138], ebx
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x130], ebx
mov dword [ebp - 0x12c], ebx
mov dword [ebp - 0x128], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov esi, ecx
mov byte [ebp - 9], dl
mov ebx, eax
mov edi, dword [ebp + 8]
xor eax, eax
push ebp
push 0x51a582
push dword fs:[eax]
mov dword fs:[eax], esp
push 1
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x51a550
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x105
lea eax, [ebp - 0x121]
push eax
lea eax, [ebp - 0x128]
mov edx, ebx
call fcn.0040587c
lea eax, [ebp - 0x128]
mov edx, 0x51a59c
call fcn.00405960
mov eax, dword [ebp - 0x128]
call fcn.00405b24
push eax
call sub.kernel32.dll_GetVolumeInformationA
test eax, eax
je 0x51a4cb
lea eax, [ebp - 0x121]
call fcn.0040b5f4
mov ecx, eax
lea edx, [ebp - 0x121]
mov eax, esi
call fcn.00405784
mov eax, dword [esi]
call fcn.00405954
test eax, eax
jle 0x51a388
lea edx, [ebp - 0x12c]
mov eax, dword [esi]
call fcn.0041042c
mov edx, dword [ebp - 0x12c]
mov eax, esi
call fcn.004056e8
mov eax, dword [esi]
movzx eax, byte [eax]
call fcn.004035b0
push eax
mov eax, esi
call fcn.00405b84
pop edx
mov byte [eax], dl
lea eax, [ebp - 0x130]
mov edx, ebx
call fcn.0040587c
lea eax, [ebp - 0x130]
mov edx, 0x51a59c
call fcn.00405960
mov eax, dword [ebp - 0x130]
call fcn.00405b24
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp al, 4
jne 0x51a492
lea edx, [ebp - 4]
mov eax, ebx
call fcn.0051a128
movzx eax, byte [ebp - 9]
sub al, 1
jb 0x51a3df
je 0x51a429
dec al
je 0x51a45e
jmp 0x51a4c4
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0051a1f8
push dword [esi]
push 0x51a5a8
push dword [ebp - 8]
push 0x51a5b8
mov eax, ebx
call fcn.004035b0
mov edx, eax
lea eax, [ebp - 0x134]
call fcn.0040587c
push dword [ebp - 0x134]
push 0x51a5c4
mov eax, esi
mov edx, 6
call fcn.00405a28
jmp 0x51a4c4
push dword [ebp - 4]
push 0x51a5d0
mov eax, ebx
call fcn.004035b0
mov edx, eax
lea eax, [ebp - 0x138]
call fcn.0040587c
push dword [ebp - 0x138]
push 0x51a5c4
mov eax, esi
mov edx, 4
call fcn.00405a28
jmp 0x51a4c4
push dword [esi]
push 0x51a5d0
mov eax, ebx
call fcn.004035b0
mov edx, eax
lea eax, [ebp - 0x13c]
call fcn.0040587c
push dword [ebp - 0x13c]
push 0x51a5c4
mov eax, esi
mov edx, 4
call fcn.00405a28
jmp 0x51a4c4
push dword [esi]
push 0x51a5d0
mov eax, ebx
call fcn.004035b0
mov edx, eax
lea eax, [ebp - 0x140]
call fcn.0040587c
push dword [ebp - 0x140]
push 0x51a5c4
mov eax, esi
mov edx, 4
call fcn.00405a28
mov eax, dword [ebp - 0x10]
mov dword [edi], eax
jmp 0x51a539
mov edx, 0x51a5d4
lea eax, [ebp - 0x144]
call fcn.00403ac0
mov eax, ebx
call fcn.004035b0
mov edx, eax
lea eax, [ebp - 0x148]
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x148]
lea eax, [ebp - 0x144]
mov cl, 2
call fcn.00403a90
lea edx, [ebp - 0x144]
lea eax, [ebp - 0x150]
call fcn.00403ac0
mov edx, 0x51a5d8
lea eax, [ebp - 0x150]
mov cl, 4
call fcn.00403a90
lea edx, [ebp - 0x150]
mov eax, esi
call fcn.004058f8
mov dword [edi], 0xffffffff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51a557
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_SetErrorMode
ret