Function at 0x106ae68
Capabilities:
Get disk information
Get disk information via ioctl
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [0x1251b5c]
xor eax, dword [ebp + 4]
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x170]
push 0x1015da0
xor esi, esi
push eax
mov byte [ebp - 9], 0
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], 0x70
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0xffffffffffffffff
push 0x80
push 3
push esi
push 3
push 0x80000000
lea eax, [ebp - 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x106aee7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1015d78
call dword [sym.imp.msvcrt.dll_printf]
mov ebx, dword [ebp + 0x10]
pop ecx
jmp 0x106b1d3
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
lea ecx, [ebp - 0x20]
push ecx
push 0xc
lea ecx, [ebp - 0x60]
push ecx
push esi
push esi
push 0x2d1080
push eax
call edi
test eax, eax
jne 0x106aff5
mov ebx, 0x800
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, esi
mov dword [ebp - 0x10], eax
jne 0x106af46
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10159ec
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
jmp 0x106afc9
push esi
lea ecx, [ebp - 0x20]
push ecx
push ebx
push eax
push esi
push esi
push 0x560000
push dword [ebp - 0x18]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
call ebx
cmp dword [ebp - 8], esi
jne 0x106afdd
cmp eax, 0x7a
jne 0x106afac
mov eax, dword [ebp - 0x20]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 8], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
cmp eax, esi
je 0x106afd1
push esi
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
push eax
push esi
push esi
push 0x560000
push dword [ebp - 0x18]
call edi
mov dword [ebp - 8], eax
call ebx
cmp dword [ebp - 8], esi
je 0x106af69
cmp dword [ebp - 8], esi
jne 0x106afdd
call ebx
push eax
lea eax, [ebp - 0x170]
push eax
push 0x1015d38
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
mov ebx, dword [ebp + 0x10]
jmp 0x106b1c4
call ebx
push 0x1015d10
jmp 0x106af30
mov edi, dword [ebp - 0x10]
mov eax, dword [edi]
lea eax, [eax + eax*2]
lea eax, [eax*8 + 0x58]
mov byte [ebp - 9], 1
mov dword [ebp - 8], eax
jmp 0x106aff8
mov edi, dword [ebp + 0x10]
push dword [ebp - 8]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
cmp ebx, esi
jne 0x106b02b
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1015cf4
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
jmp 0x106b1c4
cmp byte [ebp - 9], 0
mov eax, dword [ebp - 8]
mov dword [ebx], eax
je 0x106b06b
or dword [ebx + 0xc], 0xffffffff
mov dword [ebx + 4], 2
mov dword [ebx + 0x10], 1
mov eax, dword [edi]
lea ecx, [eax + eax*2]
lea ecx, [ecx*8 + 8]
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [ebx + 0x50]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
jmp 0x106b07e
mov dword [ebx + 4], 1
mov eax, dword [ebp - 0x5c]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x58]
mov dword [ebx + 0x10], eax
mov edi, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edi]
push eax
call dword [sym.imp.ntdll.dll_RtlUpperChar]
cmp byte [ebp + 0x10], 0
mov byte [ebx + 8], al
mov cl, byte [edi + 1]
mov byte [ebx + 9], cl
mov cl, byte [edi + 2]
mov byte [ebx + 0xa], cl
mov byte [ebp - 0x14], al
mov al, byte [ebx + 9]
mov byte [ebp - 0x13], al
mov byte [ebp - 0x12], 0x5c
mov byte [ebp - 0x11], 0
lea edi, [ebx + 0x28]
mov dword [ebx + 0x14], esi
mov dword [edi], esi
mov dword [ebx + 0x2c], esi
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x3c], esi
mov esi, dword [sym.imp.msvcrt.dll_printf]
je 0x106b0db
push dword [ebp + 0xc]
push 0x1015ce0
call esi
pop ecx
pop ecx
xor eax, eax
push eax
lea ecx, [ebp - 0x68]
push ecx
push 0x20
lea ecx, [ebp - 0x50]
push ecx
push eax
push eax
push 0x74004
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x106b11d
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
call edi
push eax
push 0x1015cb8
call esi
push 0x1015c90
call esi
add esp, 0xc
jmp 0x106b1c2
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x10], eax
mov dword [ebp - 0x18], eax
je 0x106b141
push dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [ebp - 0x10], 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebx + 0x2c]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x106b186
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1015c60
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
add esp, 0x10
xor esi, esi
jmp 0x106b1ca
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
test eax, eax
jne 0x106b206
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1015c2c
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
add esp, 0x10
xor esi, esi
cmp dword [ebp - 0x18], 0xffffffff
je 0x106b1d3
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, esi
je 0x106b1e6
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x10], esi
je 0x106b1fc
push dword [ebp - 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 0xc0000001
jmp 0x106b37b
mov ecx, dword [ebx + 0x2c]
mov eax, dword [edi]
imul eax, ecx
mov dword [ebp - 8], ecx
xor ecx, ecx
push ecx
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x30]
call fcn.0105c660
mov dword [ebx + 0x30], eax
xor eax, eax
push eax
push dword [ebp - 0x1c]
mov dword [ebx + 0x34], edx
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.0105c660
cmp byte [ebp + 0x10], 0
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
je 0x106b2e3
push dword [ebx + 0x34]
push dword [ebx + 0x30]
push dword [ebp - 8]
push dword [edi]
push edx
push eax
push 0x1015bd8
call esi
mov eax, dword [edi]
imul eax, dword [ebx + 0x2c]
push dword [ebx + 0x34]
push dword [ebx + 0x30]
push eax
push dword [ebx + 0x3c]
push dword [ebx + 0x38]
push 0x1015ba4
call esi
add esp, 0x34
cmp byte [ebp - 9], 0
je 0x106b2c6
and dword [ebp - 0x18], 0
cmp dword [ebx + 0x50], 0
jbe 0x106b2e3
lea eax, [ebx + 0x68]
mov dword [ebp - 8], eax
jmp 0x106b296
mov eax, dword [ebp - 8]
push dword [eax - 4]
push dword [eax - 8]
push 0x1015b84
call esi
mov eax, dword [ebp - 8]
push dword [eax + 4]
push dword [eax]
push 0x1015b64
call esi
add dword [ebp - 8], 0x18
add esp, 0x18
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebx + 0x50]
jb 0x106b293
jmp 0x106b2e3
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push 0x1015b3c
call esi
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push 0x1015b14
call esi
add esp, 0x18
mov eax, dword [ebp - 0x50]
mov edx, dword [ebx + 0x2c]
mov edi, dword [edi]
mov ecx, dword [ebx + 0x3c]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebx + 0x1c], eax
mov dword [ebp - 8], edx
mov eax, edi
mul edx
push ecx
push dword [ebx + 0x38]
push edx
push eax
call fcn.0105c6d0
add eax, dword [ebp - 0x50]
adc edx, dword [ebp - 0x4c]
cmp byte [ebp + 0x10], 0
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], edx
je 0x106b33a
push dword [ebp - 8]
push edi
push dword [ebx + 0x3c]
push dword [ebx + 0x38]
push edx
push eax
push dword [ebx + 0x1c]
push dword [ebx + 0x18]
push dword [ebp + 0xc]
push 0x1015ab0
call esi
add esp, 0x28
push 0x10
xor eax, eax
lea edi, [ebx + 0x40]
push edi
push eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x106b374
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1015a80
call esi
mov eax, dword [0x100b0c4]
mov dword [edi], eax
mov eax, dword [0x100b0c8]
pop ecx
pop ecx
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.0105b9a4
leave
ret 0xc