Function at 0x416030
Capabilities:
Check if file exists
Create a process with modified i/o handles and window
Create directory
Create process on windows
Delete directory
Delete file
Get common file path
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x420c5a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x200
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
mov dword [esp + 0x218], 0
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x10]
mov byte [esp + 0x218], 1
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x3c]
mov byte [esp + 0x218], 2
call sub.MFC42.DLL_CFile::CFile
mov eax, dword [esp + 0x220]
mov byte [esp + 0x218], 3
test eax, eax
jne 0x4160c9
mov ebp, str.stcusb.inf
mov dword [esp + 0x50], 0x1f8
mov dword [esp + 0x54], 0x1f9
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], str.stcusb.cat
mov edi, str.usbscan.sys
jmp 0x41611b
mov dword [esp + 0x50], 0x1fa
mov dword [esp + 0x54], 0x1fb
mov dword [esp + 0x34], str.stcser.inf
mov dword [esp + 0x38], str.stcser.cat
mov edi, str.usbser.sys
call fcn.0041f210
test eax, eax
je 0x416117
push 0
push 0x24
push 0x4e2e
call fcn.0041d480
add esp, 4
push eax
call sub.MFC42.DLL_AfxMessageBox
cmp eax, 7
je 0x416918
mov ebp, dword [esp + 0x34]
call fcn.0041f240
test eax, eax
je 0x41613e
mov esi, dword [0x436cb8]
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffffe
add esi, 0x1f6
mov dword [esp + 0x1c], esi
jmp 0x416155
mov eax, dword [0x436cb8]
dec eax
neg eax
sbb eax, eax
and al, 0xfe
add eax, 0x1f7
mov dword [esp + 0x1c], eax
mov esi, eax
push 0x104
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov eax, dword [esp + 0x228]
test eax, eax
je 0x416491
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x2c]
mov byte [esp + 0x218], 4
call sub.MFC42.DLL_CString::CString_2
mov bl, 5
xor ebp, ebp
push 0x104
lea ecx, [esp + 0x24]
mov byte [esp + 0x21c], bl
mov dword [esp + 0x50], ebp
call sub.MFC42.DLL_CString::GetBuffer
mov esi, eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push 0xffffffffffffffff
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0x104
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::GetBuffer
mov esi, eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
push 0xffffffffffffffff
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea eax, [esp + 0x4c]
push eax
call fcn.0041f2d0
add esp, 4
lea ecx, [esp + 0x20]
lea edx, [esp + 0x24]
push str.drivers_
push ecx
push edx
call sub.MFC42.DLL_operator
push edi
push eax
lea eax, [esp + 0x38]
mov byte [esp + 0x220], 6
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea ecx, [esp + 0x30]
mov esi, eax
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x218], bl
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.0041f310
add esp, 4
test esi, esi
push edi
jne 0x4162ab
push 0x4e2c
call fcn.0041d480
add esp, 4
lea edx, [esp + 0x14]
push eax
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x1c]
add esp, 0xc
push ebp
push 0x24
push eax
call sub.MFC42.DLL_AfxMessageBox
cmp eax, 6
je 0x4162e2
jmp 0x41639f
push 0x4e2d
call fcn.0041d480
add esp, 4
lea ecx, [esp + 0x14]
push eax
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0x24
push edx
call sub.MFC42.DLL_AfxMessageBox
cmp eax, 6
jne 0x416429
mov ebp, 1
lea eax, [esp + 0x20]
push str.drivers
lea ecx, [esp + 0x28]
push eax
push ecx
call sub.MFC42.DLL_operator
mov edx, dword [esp + 0x2c]
mov eax, dword [eax]
push 0
push ebp
push edx
push eax
push edi
lea ecx, [esp + 0xf8]
mov byte [esp + 0x22c], 7
call fcn.00417400
lea ecx, [esp + 0x24]
mov byte [esp + 0x218], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xe4]
call sub.MFC42.DLL_CDialog::DoModal
cmp eax, 1
je 0x4163c6
lea ecx, [esp + 0x20c]
mov byte [esp + 0x218], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x208]
mov byte [esp + 0x218], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x204]
mov byte [esp + 0x218], 0xb
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1b8]
mov byte [esp + 0x218], 0xa
call sub.MFC42.DLL_CListCtrl::CListCtrl
lea ecx, [esp + 0xe4]
mov byte [esp + 0x218], bl
call fcn.004010c0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x218], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x218], 3
call sub.MFC42.DLL_CString::CString
jmp 0x416918
lea ecx, [esp + 0x20c]
mov byte [esp + 0x218], 0x11
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x208]
mov byte [esp + 0x218], 0x10
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x204]
mov byte [esp + 0x218], 0xf
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1b8]
mov byte [esp + 0x218], 0xe
call sub.MFC42.DLL_CListCtrl::CListCtrl
lea ecx, [esp + 0xe4]
mov byte [esp + 0x218], bl
call fcn.004010c0
push 0x104
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ebx, str.stc.tmp
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], ebx
mov byte [esp + 0x218], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x218], 3
call sub.MFC42.DLL_CString::CString
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x34]
jmp 0x41653d
push 0
push 0
lea ecx, [esp + 0x80]
call fcn.00415bd0
mov bl, 0x12
push 0x4e2a
mov byte [esp + 0x21c], bl
call fcn.0041d480
add esp, 4
lea ecx, [esp + 0x78]
push eax
call fcn.00415d90
lea ecx, [esp + 0x78]
call fcn.00415cb0
cmp eax, 1
je 0x4164e5
lea ecx, [esp + 0x78]
mov byte [esp + 0x218], 3
call fcn.00415ca0
jmp 0x416918
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x7c]
call fcn.00415da0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x21c], 0x13
call fcn.0041fede
lea ecx, [esp + 0x24]
mov byte [esp + 0x218], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x78]
mov dword [esp + 0x30], str.stc.drv
mov byte [esp + 0x218], 3
call fcn.00415ca0
mov ebx, dword [esp + 0x30]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
push esi
call fcn.004197d0
mov esi, eax
add esp, 8
test esi, esi
je 0x4168c2
push 0
push 0x1001
push str.dpinst.exe
lea ecx, [esp + 0x48]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x416897
mov ecx, dword [esp + 0x28]
push ecx
push esi
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFile::Close
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.004197d0
mov esi, eax
add esp, 8
test esi, esi
je 0x41684d
mov edi, dword [esp + 0x38]
push 0
push 0x1001
push edi
lea ecx, [esp + 0x48]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x416845
mov ecx, dword [esp + 0x28]
push ecx
push esi
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFile::Close
mov eax, dword [esp + 0x50]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.004197d0
mov esi, eax
add esp, 8
test esi, esi
je 0x416803
push 0
push 0x1001
push ebp
lea ecx, [esp + 0x48]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x4167dc
mov ecx, dword [esp + 0x28]
push ecx
push esi
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_2
xor edx, edx
mov ecx, 0x11
mov dword [esp + 0x58], edx
xor eax, eax
lea edi, [esp + 0xa0]
mov dword [esp + 0x5c], edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x224]
mov dword [esp + 0x60], edx
test eax, eax
mov byte [esp + 0x218], 0x14
mov dword [esp + 0x64], edx
mov dword [esp + 0xa0], 0x44
mov word [esp + 0xd0], 1
mov dword [esp + 0xcc], 0x101
je 0x4166b7
push str._LM__P
lea eax, [esp + 0x20]
push str.dpinst.exe__s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x4166cf
push ebp
push 0x436bdc
lea ecx, [esp + 0x24]
push str.dpinst.exe__s__s
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov eax, dword [esp + 0x228]
test eax, eax
je 0x4167c5
mov edi, dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea edx, [esp + 0x68]
push edx
call edi
lea eax, [esp + 0x58]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0xa0]
push eax
mov ebx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x6e]
push ecx
push 0
push 0
push 0
push 1
push 0
push 0
push edx
push 0
mov word [esp + 0x90], 0x7e6
mov word [esp + 0x92], 0xa
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x416777
mov eax, dword [esp + 0x58]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push eax
call esi
test eax, eax
je 0x416751
mov ecx, dword [esp + 0x58]
push 0
push ecx
call esi
test eax, eax
jne 0x416744
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x58]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x5c]
push edx
call esi
jmp 0x4167a5
push str.dpinst.exe
push 0x4e24
call fcn.0041d480
add esp, 4
push eax
lea eax, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push ecx
call sub.MFC42.DLL_AfxMessageBox
lea edx, [esp + 0x68]
push edx
call edi
mov eax, dword [esp + 0x34]
mov word [esp + 0x68], bx
push eax
mov word [esp + 0x6e], bp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [esp + 0x30]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x218], 3
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x38]
jmp 0x41682d
push ebp
push 0x4e25
call fcn.0041d480
add esp, 4
lea ecx, [esp + 0x14]
push eax
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push edx
jmp 0x416828
push ebp
push 0x4e2b
call fcn.0041d480
add esp, 4
push eax
lea eax, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push ecx
call sub.MFC42.DLL_AfxMessageBox
mov eax, dword [esp + 0x228]
test eax, eax
je 0x41690d
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x41687b
push edi
push 0x4e25
jmp 0x416857
mov ecx, dword [esp + 0x38]
push ecx
push 0x4e2b
call fcn.0041d480
add esp, 4
lea edx, [esp + 0x14]
push eax
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push eax
call sub.MFC42.DLL_AfxMessageBox
mov eax, dword [esp + 0x228]
test eax, eax
je 0x41690d
push str.dpinst.exe
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x4168f0
push str.dpinst.exe
push 0x4e25
call fcn.0041d480
add esp, 4
lea ecx, [esp + 0x14]
push eax
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push edx
jmp 0x4168eb
push str.dpinst.exe
push 0x4e2b
call fcn.0041d480
add esp, 4
push eax
lea eax, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push ecx
call sub.MFC42.DLL_AfxMessageBox
mov eax, dword [esp + 0x228]
test eax, eax
je 0x41690d
push 0x436bc4
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x3c]
mov byte [esp + 0x218], 2
call fcn.0041ff50
lea ecx, [esp + 0x10]
mov byte [esp + 0x218], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x218], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x218], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x210]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20c
ret