Function at 0x40a102
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x118]
mov esi, ecx
mov ecx, 0x40
push ebx
sub esp, 0x1dc
mov dword [ebp - 0x1b4], eax
xor eax, eax
cmp dword [0x4e28c8], 0
rep stosd dword es:[edi], eax
mov dword [ebp - 0x1b0], edx
mov dword [ebp - 0x19b], 0x5c2e5c5c
mov dword [ebp - 0x198], 0x3a235c
jne 0x40a27f
xor eax, eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov dword [esp + 8], 0x498b84
mov dword [esp], 0xfde9
mov dword [ebp - 0x1ac], eax
call eax
sub esp, 0x18
mov edi, eax
cmp eax, 1
jg 0x40a18e
xor ebx, ebx
jmp 0x40a1d8
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov ebx, eax
test eax, eax
je 0x40a18a
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x498b84
mov dword [esp + 4], eax
mov dword [esp], 0xfde9
mov eax, dword [ebp - 0x1ac]
call eax
sub esp, 0x18
cmp edi, eax
je 0x40a1df
xor edi, edi
jmp 0x40a25f
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
push edi
mov edi, eax
test eax, eax
jne 0x40a25f
cmp word [0x526d7c], 0x3f
jbe 0x40a207
mov dword [esp], 0x498b8a
call fcn.0043efa9
jmp 0x40a1d8
xor ecx, ecx
mov dword [esp + 8], 0x800
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x40a241
movzx eax, word [0x526d7c]
lea edx, [eax + 1]
mov dword [eax*4 + 0x526d80], edi
mov word [0x526d7c], dx
jmp 0x40a25f
call fcn.0043f53d
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], 0x498bb3
call fcn.0043efa9
jmp 0x40a1d8
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov dword [esp + 4], str.NtQueryVolumeInformationFile
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push edx
push edx
mov dword [0x4e28c8], eax
cmp dword [ebp - 0x1b0], 0
je 0x40a291
mov eax, dword [ebp - 0x1b0]
mov byte [eax], 0
test esi, esi
je 0x40a299
xor eax, eax
mov dword [esi], eax
cmp dword [ebp - 0x1b4], 0
js 0x40a30b
mov eax, dword [ebp - 0x1b4]
add eax, 0xffffff80
mov dword [ebp - 0x1b8], eax
cmp eax, 0x40
jbe 0x40a2d3
mov dword [esp + 8], 0x45a
mov dword [esp + 4], str.drive.c
mov dword [esp], str._DriveIndex___DRIVE_INDEX_MIN____DriveIndex___DRIVE_INDEX_MAX_
call dword [0x494088]
lea ebx, [ebp - 0x181]
mov dword [esp], 0x69
mov dword [esp + 4], ebx
call dword [sym.imp.KERNEL32.DLL_GetLogicalDriveStringsA]
push edi
push edi
mov dword [ebp - 0x1a0], eax
test eax, eax
jne 0x40a31a
call fcn.0043f53d
mov dword [esp], str.GetLogicalDriveStrings_failed:__s
mov dword [esp + 4], eax
call fcn.0043efa9
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x1ac], ecx
jmp 0x40a5c2
cmp eax, 0x69
jbe 0x40a339
mov dword [esp + 8], 0x69
mov dword [esp + 4], eax
mov dword [esp], str.GetLogicalDriveStrings:_Buffer_too_small__required__lu_vs.__zu_
call fcn.0043efa9
jmp 0x40a30b
xor edi, edi
mov dword [ebp - 0x1bc], edi
mov dword [ebp - 0x1ac], edi
mov al, byte [ebx]
test al, al
je 0x40a509
movsx edi, al
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_isalpha]
test eax, eax
je 0x40a4f8
mov dword [esp], edi
mov edi, dword [sym.imp.msvcrt.dll_toupper]
call edi
mov byte [ebx], al
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
push edx
mov dword [ebp - 0x1c0], eax
sub eax, 2
cmp eax, 1
ja 0x40a4f8
movsx eax, byte [ebx]
mov dword [esp], eax
call edi
lea edx, [ebp - 0x19b]
mov dword [esp + 8], str.._c:
mov dword [esp], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 7
call dword [sym.imp.msvcrt.dll__snprintf]
xor eax, eax
mov byte [ebp - 0x195], 0
lea edx, [ebp - 0x19b]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp], edx
mov dword [esp + 0x1c], 0xbb8
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
call fcn.0043ff91
mov edx, eax
cmp eax, 0xffffffff
jne 0x40a437
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x102
jne 0x40a4f8
movsx eax, byte [ebx]
mov dword [esp], eax
call edi
mov dword [esp], str.Warning:_Time_out_while_trying_to_query_drive__c
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x40a4f8
mov eax, dword [0x4e28c8]
test eax, eax
jne 0x40a474
lea eax, [ebp - 0x19b]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x1c4], edx
call fcn.00409fd4
mov edx, dword [ebp - 0x1c4]
mov edi, eax
lea eax, [edx - 1]
cmp eax, 0xfffffffd
ja 0x40a4bb
mov dword [esp], edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
jmp 0x40a4bb
lea ecx, [ebp - 0x18c]
mov dword [esp], edx
mov dword [esp + 8], ecx
lea ecx, [ebp - 0x194]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 8
mov dword [esp + 4], ecx
mov dword [ebp - 0x1c4], edx
call eax
mov edx, dword [ebp - 0x1c4]
sub esp, 0x14
test eax, eax
jne 0x40a440
test byte [ebp - 0x188], 4
je 0x40a440
jmp 0x40a4f8
cmp dword [ebp - 0x1b8], edi
jne 0x40a4f8
cmp dword [ebp - 0x1b0], 0
je 0x40a4e6
mov edx, dword [ebp - 0x1ac]
mov al, byte [ebx]
mov ecx, dword [ebp - 0x1b0]
mov byte [ecx + edx], al
mov eax, edx
inc eax
mov dword [ebp - 0x1ac], eax
test esi, esi
je 0x40a4f2
mov eax, dword [ebp - 0x1c0]
mov dword [esi], eax
inc dword [ebp - 0x1bc]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
lea ebx, [ebx + eax + 1]
jmp 0x40a347
cmp dword [ebp - 0x1bc], 0
jne 0x40a5bd
test esi, esi
je 0x40a5bd
xor edx, edx
xor ebx, ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x1b4]
mov dword [esp], eax
call fcn.00408902
xor ecx, ecx
mov dword [esp + 0xc], ebx
mov edi, eax
lea eax, [ebp - 0x1a0]
mov dword [esp + 8], ebx
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x118]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x700a0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
mov ebx, eax
lea eax, [edi - 1]
sub esp, 0x20
cmp eax, 0xfffffffd
ja 0x40a590
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
test ebx, ebx
je 0x40a5c2
cmp dword [ebp - 0x1a0], 0
je 0x40a5c2
mov eax, dword [ebp - 0x110]
cmp eax, 0xc
jne 0x40a5b0
mov dword [esi], 3
jmp 0x40a5c2
cmp eax, 0xb
jne 0x40a5c2
mov dword [esi], 2
jmp 0x40a5c2
mov ebx, 1
cmp dword [ebp - 0x1b0], 0
je 0x40a5db
mov eax, dword [ebp - 0x1b0]
mov esi, dword [ebp - 0x1ac]
mov byte [eax + esi], 0
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret