Function at 0x407399
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x15c
mov dword [ebp - 0x13c], edx
mov dword [ebp - 0x130], ecx
test eax, eax
je 0x40769a
mov dword [esp], eax
mov ebx, eax
call sub.msvcrt.dll_strlen
cmp eax, 4
jbe 0x40769a
cmp byte [ebx], 0x5c
jne 0x40769a
cmp byte [ebx + 1], 0x5c
jne 0x40769a
cmp byte [ebx + 3], 0x5c
jne 0x40769a
mov eax, dword [str._GLOBALROOT]
test eax, eax
jne 0x4073f7
mov eax, 0x494f40
mov dword [esp + 8], 0xe
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll_strncmp
test eax, eax
jne 0x407432
lea esi, [ebx + 0xe]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov ecx, esi
mov edx, 0x104
inc eax
mov dword [esp], eax
lea eax, [ebp - 0x11c]
call fcn.0040735c
jmp 0x407467
lea eax, [ebx + 4]
lea esi, [ebp - 0x11c]
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_QueryDosDeviceA]
sub esp, 0xc
test eax, eax
jne 0x407467
mov dword [esp + 4], 0x494f58
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
cmp dword [ebp - 0x130], 1
mov byte [ebp - 0x129], 0
sbb eax, eax
xor edi, edi
mov dword [ebp - 0x138], eax
and dword [ebp - 0x138], 0xc0000000
sub dword [ebp - 0x138], 0x40000000
cmp dword [ebp + 8], 1
mov dword [esp + 0x14], pe_nt_image_headers32
sbb eax, eax
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x10], 3
and eax, 0xfffffffe
mov dword [esp + 0x18], edx
add eax, 3
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x138]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
jne 0x407583
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
cmp eax, 0x20
jne 0x407519
test edi, edi
jne 0x407525
lea eax, [ebp - 0x11c]
mov dword [esp], str.Notice:_Volume_Device_Path_is__s
mov dword [esp + 4], eax
call fcn.0043d9e0
mov dword [esp + 4], ebx
mov dword [esp], str.Waiting_for_access_on__s...
call fcn.0043d9e0
jmp 0x407563
call esi
cmp eax, 5
je 0x4074ed
jmp 0x4076fb
cmp dword [ebp + 8], 0
jne 0x407563
cmp edi, 0x32
jle 0x407563
mov dword [esp], str.Warning:_Could_not_obtain_exclusive_rights._Retrying_with_write_sharing_enabled...
call fcn.0043d9e0
xor eax, eax
mov dword [esp + 4], 7
mov dword [esp + 8], eax
mov dword [esp], 0x1388
call fcn.0042bb11
mov dword [ebp + 8], 1
mov byte [ebp - 0x129], al
mov dword [esp], 0x64
inc edi
call dword [sym.imp.KERNEL32.DLL_Sleep]
push eax
cmp edi, 0x96
jne 0x407493
jmp 0x4076fb
cmp dword [ebp - 0x130], 0
je 0x4075b1
cmp dword [ebp + 8], 0
mov eax, str.exclusive
mov edx, str.shared
mov dword [esp + 4], ebx
cmovne eax, edx
mov dword [esp], str.Opened__s_for__s_write_access
mov dword [esp + 8], eax
call fcn.0043d9e0
cmp dword [ebp - 0x13c], 0
je 0x407716
xor eax, eax
mov dword [esp + 4], 0x90083
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x4075fc
mov dword [esp], str.I_O_boundary_checks_disabled
call fcn.0043d9e0
call dword [sym.imp.KERNEL32.DLL_GetTickCount64]
add eax, 0x3a98
adc edx, 0
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x134], edx
xor edi, edi
mov dword [esp + 4], 0x90018
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edi
mov dword [esp + 8], edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
jne 0x407716
cmp dword [0x4dfd80], 0
jns 0x4076ca
call fcn.0043df77
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], str.Could_not_lock_access_to__s:__s
call fcn.0043d9e0
cmp dword [0x4dfd80], 0
jns 0x40769f
mov al, byte [ebp - 0x129]
and eax, 7
dec al
je 0x407716
lea eax, [esi - 1]
cmp eax, 0xfffffffd
ja 0x4076f7
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
or esi, 0xffffffff
jmp 0x407716
cmp byte [ebp - 0x129], 0
jne 0x407677
xor edx, edx
mov dword [esp + 4], 7
mov dword [esp + 8], edx
mov dword [esp], 0x1388
call fcn.0042bb11
mov byte [ebp - 0x129], al
jmp 0x407677
mov dword [esp], 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetTickCount64]
mov ecx, dword [ebp - 0x138]
cmp eax, ecx
sbb edx, dword [ebp - 0x134]
jb 0x407616
jmp 0x407655
xor esi, esi
jmp 0x407716
call fcn.0043df77
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], 0x495047
call fcn.0043d9e0
jmp 0x40769a
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret