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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1898
call fcn.00418af0
mov dword [ebp - 0x1898], ecx
mov byte [ebp - 0x1894], 0
push 0x1400
push 0x426620
push 0x425d0a
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
jne 0x4083fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x180c], eax
cmp dword [ebp - 0x180c], 2
jne 0x4083c9
push str.Device_
lea eax, [ebp - 0x1890]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 8
push 0x425d0a
lea ecx, [ebp - 0x1890]
push ecx
call sub.MSVCRT.dll_strcat
add esp, 8
lea edx, [ebp - 0x1890]
push edx
push 0x425d0a
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
test eax, eax
jne 0x4083c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DefineDosDevice_returned_an_error_creating_the_device___d_n
lea eax, [ebp - 0x1808]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0
lea ecx, [ebp - 0x1808]
push ecx
call sub.MFC42.DLL_AfxMessageBox
jmp 0x408695
mov byte [ebp - 0x1894], 1
jmp 0x4083fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryDosDevice_returned_an_error___d_n
lea edx, [ebp - 0x1808]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x1808]
push eax
call sub.MFC42.DLL_AfxMessageBox
jmp 0x408695
jmp 0x408403
mov byte [ebp - 0x1894], 0
push str.._
push 0x427a20
call sub.MSVCRT.dll_strcpy
add esp, 8
push 0x425d0a
push 0x427a20
call sub.MSVCRT.dll_strcat
add esp, 8
push 0xffffffffffffffff
push 0
push 3
push 0
push 3
push accept
push 0x427a20
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x408614
mov dword [ebp - 0x1810], 0x1010102
push 0
lea ecx, [ebp - 0x1008]
push ecx
push 0x1000
lea edx, [ebp - 0x1004]
push edx
push 4
lea eax, [ebp - 0x1810]
push eax
push 0x170002
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4085e1
cmp dword [ebp - 0x1008], 6
jne 0x4085ae
mov edx, dword [ebp - 0xfff]
and edx, 0xff
push edx
mov eax, dword [ebp - 0x1000]
and eax, 0xff
push eax
mov ecx, dword [ebp - 0x1001]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0x1002]
and edx, 0xff
push edx
mov eax, dword [ebp - 0x1003]
and eax, 0xff
push eax
mov ecx, dword [ebp - 0x1004]
and ecx, 0xff
push ecx
push str.Mac_address___02.2X__02.2X__02.2X__02.2X__02.2X__02.2X
lea edx, [ebp - 0x1808]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x20
lea eax, [ebp - 0x1808]
push eax
push 0x42650a
call sub.MSVCRT.dll_strcpy
add esp, 8
push 6
lea ecx, [ebp - 0x1004]
push ecx
push 0x4254fe
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
push 6
lea edx, [ebp - 0x1004]
push edx
push 0x4254f8
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
push 6
push 0xff
push 0x425504
call sub.MSVCRT.dll_memset
add esp, 0xc
push 6
push 0x4254fe
push 0x4254ea
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
push 6
push 0x4254f8
push 0x4254e4
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov word [0x4254f0], 0x6006
xor eax, eax
mov ax, word [0x4254f0]
sar eax, 8
and eax, 0xff
and eax, 0xff
xor ecx, ecx
mov cl, byte [0x4254f0]
shl ecx, 8
or eax, ecx
mov word [0x4254f0], ax
jmp 0x4085df
mov edx, dword [ebp - 0x1008]
push edx
push str.DeviceIoControl_returned_an_invalid_count___d_n
lea eax, [ebp - 0x1808]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0
lea ecx, [ebp - 0x1808]
push ecx
call sub.MFC42.DLL_AfxMessageBox
jmp 0x408695
jmp 0x408612
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl_returned_an_error___d_n
lea edx, [ebp - 0x1808]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x1808]
push eax
call sub.MFC42.DLL_AfxMessageBox
jmp 0x408695
jmp 0x408642
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateFile_returned_an_error___d_n
lea ecx, [ebp - 0x1808]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0
lea edx, [ebp - 0x1808]
push edx
call sub.MFC42.DLL_AfxMessageBox
jmp 0x408695
mov eax, dword [ebp - 0x1894]
and eax, 0xff
test eax, eax
je 0x408695
lea ecx, [ebp - 0x1890]
push ecx
push 0x42550a
push 7
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
test eax, eax
jne 0x408695
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DefineDosDevice_returned_an_error_removing_the_device___d_n
lea edx, [ebp - 0x1808]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x1808]
push eax
call sub.MFC42.DLL_AfxMessageBox
mov esp, ebp
pop ebp
ret