Function at 0x405d70
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
mov eax, dword [0x4f22ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [str.:_autorun.inf]
mov dword [ebp - 0x14], eax
mov eax, dword [0x4ce914]
push ebx
mov dword [ebp - 0x10], eax
mov ebx, edx
mov eax, dword [0x4ce918]
push esi
mov dword [ebp - 0xc], eax
xor esi, esi
mov ax, word [0x4ce91c]
push edi
mov edi, dword [ebp + 8]
mov word [ebp - 8], ax
mov al, byte [0x4ce91e]
push 0x20a
mov byte [ebp - 6], al
lea eax, [ebp - 0x2a8]
push esi
push eax
mov dword [ebp - 0x2b8], ecx
mov dword [ebp - 0x2b0], edi
mov dword [ebp - 0x2ac], 0x5c3a23
call fcn.00493600
add esp, 0xc
mov dword [edi], str.NO_LABEL
mov edi, dword [ebp - 0x2b8]
mov edx, ebx
mov ecx, edi
push esi
call fcn.004056a0
add esp, 4
test eax, eax
jne 0x405e10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00491940
mov esp, ebp
pop ebp
ret
mov al, byte [ebx]
xor edx, edx
mov ecx, edi
test al, al
jne 0x405ee7
push edx
push edx
push edx
call fcn.00404230
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x405e40
push str.No_logical_drive_found__unpartitioned__
call fcn.004407e0
add esp, 4
xor esi, esi
jmp 0x405e58
push 0
push 0
xor edx, edx
mov ecx, edi
call fcn.00403dc0
push edi
mov esi, eax
call fcn.004998ec
add esp, 0xc
push 0x40
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x2bc]
push eax
lea eax, [ebp - 0x2c0]
push eax
lea eax, [ebp - 0x2c4]
push eax
push 0x40
lea eax, [ebp - 0x2a8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationByHandleW]
test eax, eax
je 0x405eca
push 0
push 0
push 0x105
push 0x52b988
push 0xffffffffffffffff
lea eax, [ebp - 0x2a8]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp byte [0x52b988], 0
mov eax, 0x52b988
mov edi, dword [ebp - 0x2b0]
mov ecx, str.NO_LABEL
cmove eax, ecx
mov dword [edi], eax
cmp esi, 0xffffffff
je 0x40616c
test esi, esi
je 0x40616c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40616c
push 1
push 0
mov byte [ebp - 0x14], al
mov byte [ebp - 0x2ac], al
call fcn.00404180
add esp, 8
mov edi, eax
lea eax, [ebp - 0x2c8]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x2d4800
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x405f35
push 1
lea edx, [ebp - 0x14]
mov ecx, str.label
call fcn.00420240
add esp, 4
mov esi, eax
jmp 0x405f5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x15
jne 0x405f5f
cmp dword [ebp + 0xc], esi
jne 0x405f5f
movsx eax, byte [ebx]
push eax
call fcn.0049f025
add esp, 4
push eax
push str.Ignoring_autorun.inf_label_for_drive__c:_No_media
call fcn.004407e0
add esp, 8
cmp edi, 0xffffffff
je 0x405f6f
test edi, edi
je 0x405f6f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40602b
cmp dword [ebp + 0xc], 0
jne 0x405f98
movsx eax, byte [ebx]
push esi
push eax
call fcn.0049f025
add esp, 4
push eax
push str.Using_autorun.inf_label_for_drive__c:__s
call fcn.004407e0
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405fa0
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x105
jae 0x405fc4
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405fb8
sub ecx, edx
inc ecx
jmp 0x405fc9
mov ecx, 0x105
push ecx
push esi
push 0x52b988
call fcn.00493080
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405fe0
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x105
jae 0x406009
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405ff8
sub ecx, edx
lea eax, [ecx + 0x52b988]
jmp 0x40600e
mov eax, 0x52ba8c
push esi
mov byte [eax], 0
call fcn.004998ec
add esp, 4
mov edi, dword [ebp - 0x2b0]
mov dword [edi], 0x52b988
jmp 0x40616c
cmp byte [ebp - 0x2ac], 0
jne 0x406044
push 2
push 1
call fcn.0049570f
add esp, 8
mov esi, eax
jmp 0x40609b
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x2ac]
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call ebx
mov edi, eax
cmp edi, 1
jle 0x406099
push 2
push edi
call fcn.0049570f
mov esi, eax
add esp, 8
test esi, esi
je 0x406099
push edi
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x2ac]
push eax
push 0
push 0xfde9
call ebx
cmp eax, edi
je 0x40609b
push esi
call fcn.004998ec
add esp, 4
xor esi, esi
push 2
push 0x105
call fcn.0049570f
add esp, 8
mov edi, eax
push 0
push 0
push 0
push 0
push 0
push 0x105
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b4], eax
test ebx, ebx
je 0x406105
push 0
push 0
push 0x105
push 0x52b988
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x406105
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b4], eax
xor ebx, ebx
test edi, edi
je 0x406112
push edi
call fcn.004998ec
add esp, 4
test esi, esi
je 0x40611f
push esi
call fcn.004998ec
add esp, 4
push dword [ebp - 0x2b4]
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
call esi
test ebx, ebx
je 0x40613e
cmp byte [0x52b988], 0
jne 0x40601a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x2b8]
sub esp, 8
mov ebx, eax
call fcn.00411140
mov edi, dword [ebp - 0x2b0]
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x40616c
push ebx
call esi
mov dword [edi], str.NO_LABEL
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00491940
mov esp, ebp
pop ebp
ret