Function at 0x403dc0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x4f22ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x118], eax
xor al, al
mov dword [ebp - 0x11c], edx
mov dword [ebp - 0x12c], ebx
mov byte [ebp - 0x111], al
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x124], edi
test ebx, ebx
je 0x404168
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403e10
sub ecx, edx
cmp ecx, 5
jb 0x404168
cmp byte [ebx], 0x5c
jne 0x404168
cmp byte [ebx + 1], 0x5c
jne 0x404168
cmp byte [ebx + 3], 0x5c
jne 0x404168
push 0xe
push str._GLOBALROOT
push ebx
call fcn.0049f5e0
add esp, 0xc
test eax, eax
jne 0x403eee
lea esi, [ebx + 0xe]
test esi, esi
jne 0x403e63
xor ecx, ecx
inc ecx
jmp 0x403e91
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403e68
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x403e8c
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403e80
sub ecx, edx
inc ecx
jmp 0x403e91
mov ecx, 0x104
push ecx
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.00493080
add esp, 0xc
test esi, esi
jne 0x403eb3
lea eax, [ebp - 0x110]
add eax, esi
mov byte [eax], 0
jmp 0x403f1a
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403eb8
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x104
jae 0x403ee6
lea ecx, [esi + 1]
mov edi, edi
mov al, byte [esi]
inc esi
test al, al
jne 0x403ed0
sub esi, ecx
lea eax, [ebp - 0x110]
add eax, esi
mov byte [eax], 0
jmp 0x403f1a
lea eax, [ebp - 0xd]
mov byte [eax], 0
jmp 0x403f1a
push 0x104
lea eax, [ebp - 0x110]
push eax
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
mov ecx, dword [ebp - 0x110]
test eax, eax
mov edx, 0x3f3f3f
cmove ecx, edx
mov dword [ebp - 0x110], ecx
xor esi, esi
mov ecx, 0x80000000
test edi, edi
mov eax, 0xc0000000
cmovne ecx, eax
mov dword [ebp - 0x120], ecx
xor eax, eax
cmp dword [ebp - 0x118], eax
push 0
push 0x80
push 3
setne al
push 0
lea eax, [eax*2 + 1]
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40402e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x403f7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x404007
test esi, esi
jne 0x403fb0
lea eax, [ebp - 0x110]
push eax
push str.Notice:_Volume_Device_Path_is__s
call fcn.004407e0
push ebx
push str.Waiting_for_access_on__s...
call fcn.004407e0
add esp, 0x10
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x120]
inc esi
jmp 0x403f31
cmp dword [ebp - 0x118], 0
jne 0x403fec
cmp esi, 0x32
jle 0x403fec
push str.Warning:_Could_not_obtain_exclusive_rights._Retrying_with_write_sharing_enabled...
call fcn.004407e0
add esp, 4
mov dword [ebp - 0x118], 1
mov dl, 7
mov ecx, 0x1388
push 0
call fcn.00425ca0
add esp, 4
mov byte [ebp - 0x111], al
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x120]
inc esi
cmp esi, 0x96
jl 0x403f31
call fcn.00440bb0
push eax
push ebx
push 0x4cdde4
call fcn.004407e0
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00491940
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x124], 0
je 0x40405a
cmp dword [ebp - 0x118], 0
mov ecx, str.exclusive
mov eax, str.shared
cmove eax, ecx
push eax
push ebx
push str.Opened__s_for__s_write_access
call fcn.004407e0
add esp, 0xc
cmp dword [ebp - 0x11c], 0
je 0x40401b
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x128]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x90083
push edi
call esi
test eax, eax
je 0x404093
push str.I_O_boundary_checks_disabled
call fcn.004407e0
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ebx, eax
add ebx, 0x3a98
adc edx, 0
mov dword [ebp - 0x11c], edx
lea ebx, [ebx]
push 0
lea eax, [ebp - 0x128]
push eax
push 0
push 0
push 0
push 0
push 0x90018
push edi
call esi
test eax, eax
jne 0x40401b
test dword [0x4fa958], 0x80000000
jne 0x4040f9
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
cmp edx, dword [ebp - 0x11c]
jb 0x4040b0
ja 0x4040f9
cmp eax, ebx
jb 0x4040b0
call fcn.00440bb0
push eax
push dword [ebp - 0x12c]
push str.Could_not_lock_access_to__s:__s
call fcn.004407e0
mov al, byte [ebp - 0x111]
add esp, 0xc
test dword [0x4fa958], 0x80000000
jne 0x404139
test al, al
jne 0x404139
push 0
mov dl, 7
mov ecx, 0x1388
call fcn.00425ca0
add esp, 4
and al, 7
cmp al, 1
je 0x40401b
test edi, edi
je 0x40401b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or edi, 0xffffffff
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00491940
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00491940
mov esp, ebp
pop ebp
ret