Function at 0x409b45
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 [0x4dfd48], 0
rep stosd dword es:[edi], eax
mov dword [ebp - 0x1b0], edx
mov dword [ebp - 0x19b], 0x5c2e5c5c
mov dword [ebp - 0x198], 0x3a235c
jne 0x409ce2
mov eax, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
xor ebx, ebx
xor edi, edi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0x495b98
mov dword [esp], 0xfde9
mov dword [ebp - 0x1ac], eax
call eax
sub esp, 0x18
mov edi, eax
cmp eax, 1
jg 0x409bd1
xor ebx, ebx
jmp 0x409c1b
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov ebx, eax
test eax, eax
je 0x409bcd
xor ecx, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x495b98
mov dword [esp + 4], ecx
mov dword [esp], 0xfde9
mov eax, dword [ebp - 0x1ac]
call eax
sub esp, 0x18
cmp edi, eax
je 0x409c22
xor edi, edi
jmp 0x409cc2
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
mov edi, eax
push edx
test eax, eax
jne 0x409cc2
cmp word [0x5241d4], 0x3f
jbe 0x409c4e
mov dword [esp], 0x495b9e
call fcn.0043d9e0
jmp 0x409c1b
xor edi, edi
mov dword [esp + 8], 0x800
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
sub esp, 0xc
mov edi, eax
test eax, eax
jne 0x409c8a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp ax, 0x57
jne 0x409ca4
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov edi, eax
push ecx
test eax, eax
je 0x409ca4
movzx eax, word [0x5241d4]
lea edx, [eax + 1]
mov dword [eax*4 + 0x5241e0], edi
mov word [0x5241d4], dx
jmp 0x409cc2
call fcn.0043df77
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], 0x495bc7
call fcn.0043d9e0
jmp 0x409c1b
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 [0x4dfd48], eax
cmp dword [ebp - 0x1b0], 0
je 0x409cf4
mov eax, dword [ebp - 0x1b0]
mov byte [eax], 0
test esi, esi
je 0x409cfc
xor eax, eax
mov dword [esi], eax
cmp dword [ebp - 0x1b4], 0
js 0x409d6e
mov eax, dword [ebp - 0x1b4]
add eax, 0xffffff80
mov dword [ebp - 0x1b8], eax
cmp eax, 0x40
jbe 0x409d36
mov dword [esp + 8], 0x456
mov dword [esp + 4], str.drive.c
mov dword [esp], str._DriveIndex___DRIVE_INDEX_MIN____DriveIndex___DRIVE_INDEX_MAX_
call dword [0x491228]
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 0x409d7d
call fcn.0043df77
mov dword [esp], str.GetLogicalDriveStrings_failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x1ac], ecx
jmp 0x40a02d
cmp eax, 0x69
jbe 0x409d9c
mov dword [esp + 8], 0x69
mov dword [esp + 4], eax
mov dword [esp], str.GetLogicalDriveStrings:_Buffer_too_small__required__lu_vs.__zu_
call fcn.0043d9e0
jmp 0x409d6e
xor edi, edi
mov dword [ebp - 0x1bc], edi
mov dword [ebp - 0x1ac], edi
mov al, byte [ebx]
test al, al
je 0x409f74
movsx edi, al
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll_isalpha]
test eax, eax
je 0x409f63
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 0x409f63
movsx eax, byte [ebx]
mov dword [esp], eax
call edi
lea edx, [ebp - 0x19b]
mov dword [esp + 0xc], str.._c:
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 7
call dword [sym.imp.msvcrt.dll__snprintf_s]
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.0043eadf
mov edx, eax
cmp eax, 0xffffffff
jne 0x409ea2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x102
jne 0x409f63
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.0043d9e0
jmp 0x409f63
mov eax, dword [0x4dfd48]
test eax, eax
jne 0x409edf
lea eax, [ebp - 0x19b]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [ebp - 0x1c4], edx
call fcn.00409a0c
mov edx, dword [ebp - 0x1c4]
mov edi, eax
lea eax, [edx - 1]
cmp eax, 0xfffffffd
ja 0x409f26
mov dword [esp], edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
jmp 0x409f26
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 0x409eab
test byte [ebp - 0x188], 4
je 0x409eab
jmp 0x409f63
cmp dword [ebp - 0x1b8], edi
jne 0x409f63
cmp dword [ebp - 0x1b0], 0
je 0x409f51
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 0x409f5d
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 0x409daa
cmp dword [ebp - 0x1bc], 0
jne 0x40a028
test esi, esi
je 0x40a028
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.0040835f
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 0x409ffb
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
test ebx, ebx
je 0x40a02d
cmp dword [ebp - 0x1a0], 0
je 0x40a02d
mov eax, dword [ebp - 0x110]
cmp eax, 0xc
jne 0x40a01b
mov dword [esi], 3
jmp 0x40a02d
cmp eax, 0xb
jne 0x40a02d
mov dword [esi], 2
jmp 0x40a02d
mov ebx, 1
cmp dword [ebp - 0x1b0], 0
je 0x40a046
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