Function at 0x407e10
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
mov eax, dword [0x5512ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x52b1e0]
movq xmm0, qword [str.:_autorun.inf]
push ebx
push esi
mov dword [ebp - 0xc], eax
xor esi, esi
mov ax, word [0x52b1e4]
mov ebx, edx
push edi
mov edi, dword [ebp + 8]
mov word [ebp - 8], ax
mov al, byte [0x52b1e6]
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
movq qword [ebp - 0x14], xmm0
call fcn.004ab0f0
add esp, 0xc
mov dword [edi], str.NO_LABEL
mov edi, dword [ebp - 0x2b8]
mov edx, ebx
mov ecx, edi
push esi
call fcn.004076a0
add esp, 4
test eax, eax
jne 0x407ead
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
mov al, byte [ebx]
xor edx, edx
mov ecx, edi
test al, al
jne 0x407f84
push edx
push edx
push edx
call fcn.00406080
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x407edd
push str.No_logical_drive_found__unpartitioned__
call fcn.0044b0b0
add esp, 4
xor esi, esi
jmp 0x407ef5
push 0
push 0
xor edx, edx
mov ecx, edi
call fcn.00405b80
push edi
mov esi, eax
call fcn.004d1211
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 0x407f67
push 0
push 0
push 0x105
push 0x58b340
push 0xffffffffffffffff
lea eax, [ebp - 0x2a8]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp byte [0x58b340], 0
mov eax, 0x58b340
mov edi, dword [ebp - 0x2b0]
mov ecx, str.NO_LABEL
cmove eax, ecx
mov dword [edi], eax
cmp esi, 0xffffffff
je 0x40820b
test esi, esi
je 0x40820b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40820b
push 1
push 0
mov byte [ebp - 0x14], al
mov byte [ebp - 0x2ac], al
call fcn.00405fd0
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 0x407fd2
push 1
lea edx, [ebp - 0x14]
mov ecx, str.label
call fcn.004249f0
add esp, 4
mov esi, eax
jmp 0x407ffc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x15
jne 0x407ffc
cmp dword [ebp + 0xc], esi
jne 0x407ffc
movsx eax, byte [ebx]
push eax
call fcn.004e01e0
add esp, 4
push eax
push str.Ignoring_autorun.inf_label_for_drive__c:_No_media
call fcn.0044b0b0
add esp, 8
cmp edi, 0xffffffff
je 0x40800c
test edi, edi
je 0x40800c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4080ca
cmp dword [ebp + 0xc], 0
jne 0x408035
movsx eax, byte [ebx]
push esi
push eax
call fcn.004e01e0
add esp, 4
push eax
push str.Using_autorun.inf_label_for_drive__c:__s
call fcn.0044b0b0
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408040
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x105
jae 0x408064
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408058
sub ecx, edx
inc ecx
jmp 0x408069
mov ecx, 0x105
push ecx
push esi
push 0x58b340
call fcn.004aab70
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408080
sub ecx, edx
lea eax, [ecx + 1]
cmp eax, 0x105
jae 0x4080a4
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408098
sub ecx, edx
inc ecx
jmp 0x4080a9
mov ecx, 0x105
push esi
mov byte [ecx + 0x58b33f], 0
call fcn.004d1211
add esp, 4
mov edi, dword [ebp - 0x2b0]
mov dword [edi], 0x58b340
jmp 0x40820b
cmp byte [ebp - 0x2ac], 0
jne 0x4080e3
push 2
push 1
call fcn.004b6706
add esp, 8
mov esi, eax
jmp 0x40813a
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 0x408138
push 2
push edi
call fcn.004b6706
mov esi, eax
add esp, 8
test esi, esi
je 0x408138
push edi
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x2ac]
push eax
push 0
push 0xfde9
call ebx
cmp eax, edi
je 0x40813a
push esi
call fcn.004d1211
add esp, 4
xor esi, esi
push 2
push 0x105
call fcn.004b6706
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 0x4081a4
push 0
push 0
push 0x105
push 0x58b340
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4081a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2b4], eax
xor ebx, ebx
test edi, edi
je 0x4081b1
push edi
call fcn.004d1211
add esp, 4
test esi, esi
je 0x4081be
push esi
call fcn.004d1211
add esp, 4
push dword [ebp - 0x2b4]
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
call esi
test ebx, ebx
je 0x4081dd
cmp byte [0x58b340], 0
jne 0x4080b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x2b8]
sub esp, 8
mov ebx, eax
call fcn.00413d20
mov edi, dword [ebp - 0x2b0]
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x40820b
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.004a8b60
mov esp, ebp
pop ebp
ret