Function at 0x405c70
Capabilities:
Check if file exists
Get disk information

Disassembly:
mov eax, 0x10bc
call fcn.00412f70
push ebx
push ebp
push esi
push edi
push 0x1400
push 0x41dc44
push 0x41fdd4
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
jne 0x405d30
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
cmp eax, 2
jne 0x405d23
mov edi, str.Device_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x7c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41fdd4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x7c]
and ecx, 3
push eax
push 0x41fdd4
push 1
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
test eax, eax
jne 0x405d1f
call ebp
push eax
push str.DefineDosDevice_returned_an_error_creating_the_device___d_n
jmp 0x405f15
mov bl, 1
jmp 0x405d38
call ebp
push eax
push str.QueryDosDevice_returned_an_error___d_n
jmp 0x405f44
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
mov edi, str.._
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov edx, ecx
mov esi, edi
mov edi, 0x41f0c4
push 0x40000000
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 3
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41fdd4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edx, ecx
mov edi, 0x41f0c4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0xc0000000
and ecx, 3
push 0x41f0c4
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x405f6b
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0xd4]
push 0x1000
push edx
lea ecx, [esp + 0x24]
push 4
push ecx
push 0x170002
push eax
mov dword [esp + 0x34], 0x1010102
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x405f3c
mov eax, dword [esp + 0x10]
cmp eax, 6
jne 0x405f0f
mov edx, dword [esp + 0xd1]
mov eax, dword [esp + 0xd0]
mov ecx, dword [esp + 0xcf]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0xd2]
and ecx, 0xff
push eax
mov eax, dword [esp + 0xd5]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push ecx
mov ecx, dword [esp + 0xd8]
and edx, 0xff
and eax, 0xff
push edx
and ecx, 0xff
push eax
push ecx
lea edx, [esp + 0x30]
push str.Mac_address___02.2X__02.2X__02.2X__02.2X__02.2X__02.2X
push edx
call ebp
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
push 6
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x41fe9c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_memmove]
lea ecx, [esp + 0xf0]
push ecx
push 0x41f0b6
call esi
lea edx, [esp + 0xf8]
push 6
push edx
push 0x41f0b0
call esi
or eax, 0xffffffff
push 6
mov dword [0x41f0bc], eax
push 0x41f0b6
push 0x41f0a2
mov word [0x41f0c0], ax
call esi
add esp, 0x44
push 6
push 0x41f0b0
push 0x41f09c
call esi
add esp, 0xc
mov word [0x41f0a8], 0x660
test bl, bl
je 0x405f8f
lea ecx, [esp + 0x7c]
push ecx
push 0x41fd0c
push 7
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
test eax, eax
jne 0x405f8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1c]
push str.DefineDosDevice_returned_an_error_removing_the_device___d_n
push edx
call ebp
jmp 0x405f7e
push eax
push str.DeviceIoControl_returned_an_invalid_count___d_n
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x18]
push 0
push 0
push edx
call sub.MFC42.DLL_AfxMessageBox
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10bc
ret
call ebp
push eax
push str.DeviceIoControl_returned_an_error___d_n
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x18]
push 0
push 0
push ecx
call sub.MFC42.DLL_AfxMessageBox
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10bc
ret
call ebp
push eax
lea edx, [esp + 0x1c]
push str.CreateFile_returned_an_error___d_n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x18]
push 0
push 0
push eax
call sub.MFC42.DLL_AfxMessageBox
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10bc
ret