Function at 0x404f70
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov eax, dword [0x4d8300]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x100
mov dword [ebp - 0x194], eax
xor ebx, ebx
lea eax, [ebp - 0x184]
mov dword [ebp - 0x18c], edx
push ebx
push eax
mov dword [ebp - 0x198], ecx
call fcn.00478bc0
and dword [ebp - 0x190], ebx
lea edi, [ebp - 0x10]
and dword [ebp - 0x188], ebx
mov esi, str..:
add esp, 0xc
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
cmp dword [0x50ce40], ebx
jne 0x40503a
mov edi, str.Ntdll
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
jne 0x405029
cmp word [0x4dca14], 0x20
jb 0x404ffb
push str.Error:_MAX_LIBRARY_HANDLES_is_too_small_n
call fcn.0042ed57
pop ecx
jmp 0x405029
push 0x800
push 0
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov esi, eax
test esi, esi
je 0x405029
mov cx, word [0x4dca14]
movzx eax, cx
inc cx
mov word [0x4dca14], cx
mov dword [eax*4 + 0x5223e0], esi
push str.NtQueryVolumeInformationFile
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x50ce40], eax
mov eax, dword [ebp - 0x18c]
test eax, eax
je 0x405046
mov byte [eax], bl
mov edi, dword [ebp - 0x194]
test edi, edi
je 0x405052
and dword [edi], ebx
mov esi, dword [ebp - 0x198]
test esi, esi
js 0x405292
cmp esi, 0x80
jb 0x405070
cmp esi, 0xc0
jbe 0x405087
push 0x41f
push str.C:UsersGauravDownloads_formatusb_master_1__formatusb_master_srcdrive.c
push str._DriveIndex___DRIVE_INDEX_MIN____DriveIndex___DRIVE_INDEX_MAX_
call fcn.00486ba7
add esp, 0xc
lea eax, [esi - 0x80]
mov dword [ebp - 0x1a0], eax
cmp eax, 0x40
ja 0x405292
lea eax, [ebp - 0x84]
push eax
push 0x69
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
mov dword [ebp - 0x19c], eax
test eax, eax
jne 0x4050c9
call fcn.0042fc51
push eax
push str.GetLogicalDriveStrings_failed:__s
call fcn.0042ed57
pop ecx
pop ecx
jmp 0x405292
cmp eax, 0x69
jbe 0x4050e3
push 0x69
push eax
push str.GetLogicalDriveStrings:_Buffer_too_small__required__d_vs.__d_
call fcn.0042ed57
add esp, 0xc
jmp 0x405292
mov al, byte [ebp - 0x84]
lea esi, [ebp - 0x84]
jmp 0x405204
movsx eax, al
push eax
call fcn.00487160
pop ecx
test eax, eax
je 0x4051f0
movsx eax, byte [esi]
push eax
call fcn.00486f54
pop ecx
push esi
mov byte [esi], al
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [ebp - 0x1a4], eax
cmp eax, 2
je 0x40512d
cmp eax, 3
jne 0x4051f0
movsx eax, byte [esi]
push eax
push str.._c:
lea eax, [ebp - 0x10]
push 7
push eax
call fcn.00403163
add esp, 0x10
xor eax, eax
mov byte [ebp - 0xa], al
push eax
push 0x80
push 3
push eax
push 3
push SHChangeNotifyRegister
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4051f0
mov eax, dword [0x50ce40]
test eax, eax
je 0x405199
push 4
push 8
lea ecx, [ebp - 0x1ac]
push ecx
lea ecx, [ebp - 0x1b4]
push ecx
push ebx
call eax
test eax, eax
jne 0x405199
test byte [ebp - 0x1a8], 4
jne 0x4051f0
lea edx, [ebp - 0x10]
mov ecx, ebx
call fcn.00404e9c
mov dword [ebp - 0x194], eax
test ebx, ebx
je 0x4051ba
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x194]
cmp eax, dword [ebp - 0x1a0]
jne 0x4051f0
inc dword [ebp - 0x188]
mov ecx, dword [ebp - 0x18c]
test ecx, ecx
je 0x4051e4
mov edx, dword [ebp - 0x190]
mov al, byte [esi]
mov byte [ecx + edx], al
inc edx
mov dword [ebp - 0x190], edx
test edi, edi
je 0x4051f0
mov eax, dword [ebp - 0x1a4]
mov dword [edi], eax
test esi, esi
jne 0x4051f8
xor eax, eax
jmp 0x4051ff
push esi
call fcn.004816f0
pop ecx
inc esi
add esi, eax
mov al, byte [esi]
test al, al
jne 0x4050f4
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x188], 0
jne 0x405292
test edi, edi
je 0x405292
mov ecx, dword [ebp - 0x198]
xor ebx, ebx
push ebx
push ebx
xor edx, edx
call fcn.00403d18
pop ecx
pop ecx
push ebx
mov esi, eax
lea eax, [ebp - 0x19c]
push eax
push 0x100
lea eax, [ebp - 0x184]
push eax
push ebx
push ebx
push 0x700a0
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ebx, eax
cmp esi, 0xffffffff
je 0x405265
test esi, esi
je 0x405265
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x405292
cmp dword [ebp - 0x19c], 0
jbe 0x405292
cmp dword [ebp - 0x17c], 0xc
jne 0x405283
mov dword [edi], 3
jmp 0x405292
cmp dword [ebp - 0x17c], 0xb
jne 0x405292
mov dword [edi], 2
mov eax, dword [ebp - 0x18c]
test eax, eax
je 0x4052a6
mov ecx, dword [ebp - 0x190]
mov byte [eax + ecx], 0
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475c80
leave
ret