Function at 0x4077f0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14c
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x138], edx
mov dword [ebp - 0x134], ecx
test eax, eax
je 0x407b3f
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp eax, 4
jbe 0x407b3f
mov eax, dword [ebp - 0x12c]
cmp byte [eax], 0x5c
jne 0x407b3f
cmp byte [eax + 1], 0x5c
jne 0x407b3f
cmp byte [eax + 3], 0x5c
jne 0x407b3f
mov eax, dword [str._GLOBALROOT]
test eax, eax
jne 0x407858
mov eax, 0x497f20
mov dword [esp + 8], 0xe
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x4078c1
mov eax, dword [ebp - 0x12c]
lea edi, [ebp - 0x11c]
lea ebx, [eax + 0xe]
mov dword [esp], ebx
mov esi, ebx
call sub.msvcrt.dll_strlen
mov edx, 0x104
lea ecx, [eax + 1]
cmp ecx, edx
cmova ecx, edx
rep movsb byte es:[edi], byte [esi]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
lea edx, [eax + 1]
cmp edx, 0x104
mov edx, 0x103
cmovae eax, edx
mov byte [ebp + eax - 0x11c], 0
jmp 0x4078fc
lea ebx, [ebp - 0x11c]
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x12c]
add eax, 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_QueryDosDeviceA]
sub esp, 0xc
test eax, eax
jne 0x4078fc
mov dword [esp + 4], 0x497f38
mov dword [esp], ebx
call sub.msvcrt.dll_strcpy
cmp dword [ebp - 0x134], 1
mov byte [ebp - 0x12d], 0
sbb esi, esi
xor edi, edi
and esi, 0xc0000000
sub esi, 0x40000000
cmp dword [ebp + 8], 1
mov dword [esp + 0x14], pe_nt_image_headers32
sbb eax, eax
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x10], 3
and eax, 0xfffffffe
mov dword [esp + 0xc], ebx
add eax, 3
mov dword [esp + 0x18], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
jne 0x407a10
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
call ebx
cmp eax, 0x20
jne 0x4079a6
test edi, edi
jne 0x4079b2
lea eax, [ebp - 0x11c]
mov dword [esp], str.Notice:_Volume_Device_Path_is__s
mov dword [esp + 4], eax
call fcn.0043efa9
mov eax, dword [ebp - 0x12c]
mov dword [esp], str.Waiting_for_access_on__s...
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x4079f0
call ebx
cmp eax, 5
je 0x407974
jmp 0x407b44
cmp dword [ebp + 8], 0
jne 0x4079f0
cmp edi, 0x32
jle 0x4079f0
mov dword [esp], str.Warning:_Could_not_obtain_exclusive_rights._Retrying_with_write_sharing_enabled...
call fcn.0043efa9
xor edx, edx
mov dword [esp + 4], 7
mov dword [esp + 8], edx
mov dword [esp], 0x1388
call fcn.0042cbc1
mov dword [ebp + 8], 1
mov byte [ebp - 0x12d], al
mov dword [esp], 0x64
inc edi
call dword [sym.imp.KERNEL32.DLL_Sleep]
push eax
cmp edi, 0x96
jne 0x40791a
jmp 0x407b44
cmp dword [ebp - 0x134], 0
je 0x407a44
cmp dword [ebp + 8], 0
mov eax, str.exclusive
mov edx, str.shared
cmovne eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], str.Opened__s_for__s_write_access
mov dword [esp + 4], eax
call fcn.0043efa9
cmp dword [ebp - 0x138], 0
je 0x407bb5
xor eax, eax
mov dword [esp + 4], 0x90083
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x120]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x407a97
mov dword [esp], str.I_O_boundary_checks_disabled
call fcn.0043efa9
call dword [sym.imp.KERNEL32.DLL_GetTickCount64]
add eax, 0x3a98
adc edx, 0
mov esi, eax
mov edi, edx
xor eax, eax
mov dword [esp + 4], 0x90018
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x120]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
jne 0x407bb5
cmp dword [0x4e2900], 0
jns 0x407b90
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], str.Could_not_lock_access_to__s:__s
mov dword [esp + 4], eax
call fcn.0043efa9
cmp dword [0x4e2900], 0
jns 0x407b65
mov al, byte [ebp - 0x12d]
and eax, 7
dec al
je 0x407bb5
lea eax, [ebx - 1]
cmp eax, 0xfffffffd
ja 0x407bb3
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
or ebx, 0xffffffff
jmp 0x407bb5
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], 0x498027
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x407b3f
cmp byte [ebp - 0x12d], 0
jne 0x407b1c
xor edx, edx
mov dword [esp + 4], 7
mov dword [esp + 8], edx
mov dword [esp], 0x1388
call fcn.0042cbc1
mov byte [ebp - 0x12d], al
jmp 0x407b1c
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetTickCount64]
cmp eax, esi
sbb edx, edi
jb 0x407aa9
jmp 0x407af4
xor ebx, ebx
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret