Function at 0x4c0350
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fc260
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x46bc
call fcn.004f2630
push ebx
push esi
push edi
lea eax, [ebp - 0x46cc]
mov dword [ebp - 0x10], esp
xor esi, esi
push eax
push 0x27fe
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
lea edx, [ebp - 0x46cc]
mov dword [ebp - 0x14], edx
cmp byte [edx], 0
je 0x4c087b
lea eax, [esi + esi*4]
mov edi, edx
push edx
lea ecx, [eax + eax*8]
lea eax, [esi + ecx*2]
mov ecx, dword [ebp + 8]
lea ebx, [ecx + eax*4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov edx, eax
cmp edx, 6
mov dword [ebp - 0x34], edx
ja case.default.0x4c03e8
jmp dword [edx*4 + 0x4c08e0]
mov edi, str.not_a_root
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
jmp 0x4c0569
mov edi, 0x52a11c
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
jmp 0x4c0569
mov edi, 0x52a114
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
jmp 0x4c0569
mov edi, 0x52a108
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
jmp 0x4c0649
mov edi, 0x52a100
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
jmp 0x4c0569
mov edi, 0x52a0f4
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
jmp 0x4c0569
mov dword [ebx + 0x168], 0
jmp 0x4c0569
mov edi, str.unknown
or ecx, 0xffffffff
xor eax, eax
lea esi, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [ebp - 0x30], esi
mov eax, ecx
mov esi, edi
mov edi, dword [ebp - 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp edx, 4
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x168], 1
je 0x4c0649
mov ecx, dword [str..X:]
mov al, byte [0x52a0f2]
mov dx, word [0x52a0f0]
mov dword [ebp - 0xa4], ecx
mov byte [ebp - 0x9e], al
mov ecx, 0x17
xor eax, eax
lea edi, [ebp - 0x9d]
mov word [ebp - 0xa0], dx
push 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x14]
push 0
push 3
push 0
mov dl, byte [ecx]
push 2
stosb byte es:[edi], al
lea eax, [ebp - 0xa4]
push 0
push eax
mov byte [ebp - 0xa0], dl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4c0642
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x1c]
sub eax, 2
push 0
neg eax
sbb eax, eax
push ecx
lea edx, [ebp - 0x1ecc]
push 0x1c20
and eax, 0xfffff400
push edx
push 0
add eax, 0x70c00
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4c0642
mov eax, 0xaaaaaaab
lea ecx, [ebp - 0x1ecc]
mul dword [ebp - 0x1c]
shr edx, 4
mov eax, edx
dec edx
test eax, eax
mov dword [ebp - 0x1c], edx
je 0x4c0642
mov eax, dword [ecx]
add ecx, 0x18
mov dword [ebx + 0x8c], eax
mov eax, dword [ecx - 0xc]
mov dword [ebx + 0x90], eax
mov eax, dword [ecx - 8]
mov dword [ebx + 0x94], eax
mov eax, dword [ecx - 4]
mov dword [ebx + 0x98], eax
jmp 0x4c0610
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.3......
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x2ac]
push 0x104
lea edx, [ebp - 0x3c]
push ecx
lea eax, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x40]
push eax
push ecx
lea edx, [ebp - 0x1a8]
push 0x104
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
je 0x4c07d5
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x38]
push eax
lea edx, [ebp - 0x28]
push ecx
lea eax, [ebp - 0x24]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x4c07d5
lea edi, [ebp - 0x1a8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 0x9c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.3......2
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebx + 0x120]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x2ac]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x24]
imul eax, dword [ebp - 0x28]
mov edx, eax
imul eax, dword [ebp - 0x38]
imul edx, dword [ebp - 0x20]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x2c]
shr edx, 0x14
mov dword [ebx + 0x11c], ecx
mov dword [ebx + 0x84], edx
shr eax, 0x14
mov dword [ebx + 0x88], eax
mov ecx, dword [ebx + 0x84]
add ecx, eax
mov dword [ebx + 0x84], ecx
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
push str.4......
mov ecx, 0xf558a0
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov edi, 0x52a0c8
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 0x160]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x18]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x18], eax
cmp eax, 0x18
jg 0x4c0878
xor esi, esi
jmp 0x4c085d
mov edi, str.NO_DISK
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 0x9c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.3......1
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebx + 0x120]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.NO_DISK
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
mov ecx, 0xf558a0
mov dword [ebx + 0x11c], esi
mov dword [ebx + 0x84], esi
mov dword [ebx + 0x88], esi
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov ecx, dword [ebp - 0x14]
push esi
push ecx
call fcn.004f3240
mov esi, dword [ebp - 0x18]
add esp, 8
inc eax
mov dword [ebp - 0x14], eax
mov edx, eax
jmp 0x4c039c
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
push str.5......
mov ecx, 0xf558a0
mov dword [edx], esi
call fcn.004f0087
push 0xa
mov ecx, eax
call fcn.004eff40
push 0x402150
mov ecx, eax
call fcn.004016a0
mov ax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret