Function at 0x401ef0
Capabilities:
Get common file path
Terminate process

Disassembly:
sub esp, 0x3e8
push ebx
push ebp
push esi
push edi
mov ecx, 0x4a
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor esi, esi
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x160]
mov dword [esp + 0x15c], esi
push str._________________Lattice_Semiconductor_Corp._n
rep stosd dword es:[edi], eax
mov eax, dword [str.isp.sys]
mov ecx, dword [0x40e048]
mov byte [esp + 0x14], 0
mov dword [esp + 0x15], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x28], esi
mov dword [0x411948], esi
mov dword [0x41194c], esi
call fcn.004017f0
push str._n_____________ispVME_tm__V
call fcn.004017f0
push str.12.2
call fcn.004017f0
push str._Copyright_1998_2011._n
call fcn.004017f0
push str._nFor_daisy_chain_programming_of_all_in_system_programmable_devices_n_n
call fcn.004017f0
mov ebp, dword [esp + 0x410]
add esp, 0x14
cmp ebp, 2
jge 0x401ff3
push str._nUsage:_vme__option__vme_file__vme_file__n
call fcn.004017f0
push str.Example:_vme_vme_file1.vme_vme_file2.vme_n
call fcn.004017f0
push str.option____c:___do_the_calibration._n
call fcn.004017f0
push str.Example:_vme__c_n
call fcn.004017f0
push str.Example:_vme__c_vme_file1.vme_vme_file2.vme_n
call fcn.004017f0
push 0x40e4fc
call fcn.004017f0
push str.option____nc:_______Disable_LSC_Download_Cable_Checking_n
call fcn.004017f0
push 0x40e4fc
call fcn.004017f0
add esp, 0x20
push 1
call fcn.00404f91
mov ebx, 1
cmp ebp, ebx
jle 0x40222c
mov eax, ebx
mov ecx, dword [esp + 0x400]
lea edx, [esp + 0x30]
mov edi, dword [ecx + eax*4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
mov esi, 0x40e4bc
push ecx
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402063
test cl, cl
je 0x40205f
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402063
add eax, 2
add esi, 2
test cl, cl
jne 0x40203f
xor eax, eax
jmp 0x402068
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40207f
cmp bx, 1
jne 0x40207f
mov dword [esp + 0x18], 1
jmp 0x40221a
lea eax, [esp + 0x30]
mov esi, 0x40e4bc
push eax
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4020b5
test cl, cl
je 0x4020b1
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4020b5
add eax, 2
add esi, 2
test cl, cl
jne 0x402091
xor eax, eax
jmp 0x4020ba
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4020c8
cmp bx, 1
jne 0x402274
lea eax, [esp + 0x30]
mov esi, 0x40e4b8
push eax
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4020fe
test cl, cl
je 0x4020fa
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4020fe
add eax, 2
add esi, 2
test cl, cl
jne 0x4020da
xor eax, eax
jmp 0x402103
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402115
mov word [0x41192a], 1
jmp 0x40221a
lea eax, [esp + 0x30]
mov esi, 0x40e4b4
push eax
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40214b
test cl, cl
je 0x402147
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40214b
add eax, 2
add esi, 2
test cl, cl
jne 0x402127
xor eax, eax
jmp 0x402150
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40219b
inc ebx
mov eax, ebx
and eax, 0xffff
cmp eax, ebp
jge 0x402288
mov ecx, dword [esp + 0x400]
mov edx, dword [ecx + eax*4]
push edx
call fcn.00404f59
add esp, 4
mov word [0x411920], ax
test ax, ax
je 0x40229c
xor ecx, ecx
mov cx, ax
push ecx
push str.CPU_Frequency:__d_MHz_n
call fcn.00404ab0
add esp, 8
jmp 0x40221a
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
dec ecx
sub edx, 4
mov edi, ecx
or ecx, 0xffffffff
add edi, edx
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
call fcn.0040cbf6
add esp, 4
mov esi, str..vme
lea eax, [esp + 0x10]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40220d
test cl, cl
je 0x402209
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40220d
add eax, 2
add esi, 2
test cl, cl
jne 0x4021e9
xor eax, eax
jmp 0x402212
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4022b0
inc ebx
mov eax, ebx
and eax, 0xffff
cmp eax, ebp
jl 0x402002
xor esi, esi
cmp word [0x41192a], si
jne 0x40244c
lea eax, [esp + 0x15c]
mov dword [0x411c8c], 0
push eax
mov dword [esp + 0x160], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4022c4
push str.Error:_cannot_check_the_operating_system_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
push str.Error:_calibrate_option__c_must_be_the_first_argument_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
push str.Error:_frequency_value_not_given_n_n
call fcn.004017f0
add esp, 4
push 0xfffffffffffffffb
call fcn.00404f91
push str.Error:_frequency_value_must_be_a_number_greater_than_zero_n_n
call fcn.004017f0
add esp, 4
push 0xfffffffffffffffb
call fcn.00404f91
push str.Error:_VME_files_must_end_with_the_extension_.vme_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
cmp dword [esp + 0x16c], 2
jne 0x40244c
lea ecx, [esp + 0x1f0]
xor ebx, ebx
push 0x104
push ecx
mov dword [0x411c8c], 1
mov dword [0x411c84], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.drivers
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1f0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2f8]
lea edx, [esp + 0x2c]
push ecx
push 0x109
push ebx
lea eax, [esp + 0x200]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SearchPathA]
mov al, byte [esp + 0x2f4]
test al, al
jne 0x40236d
push str.Error:_cannot_find_Windows_driver_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
push ebx
push str.ispDev
push 0x411c84
call fcn.004044a0
add esp, 0xc
test ax, ax
je 0x402399
push str.Error:_fail_to_load_Windows_driver_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
push 0x3e8
push 0x411c90
call fcn.00404630
add esp, 8
cmp ax, bx
mov dword [0x411c94], ebx
jne 0x4023ca
push str.Error:_fail_to_load_Windows_driver_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
mov ecx, dword [0x411c84]
push 0x378
push ecx
call fcn.00404a20
add esp, 8
test ax, ax
jne 0x4023f7
push str.Error:_fail_to_setup_Windows_driver_to_parallel_port_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
call fcn.004010a0
test ax, ax
je 0x402415
push str.Error:_download_cable_not_detected_n_n
call fcn.00404ab0
add esp, 4
push 1
call fcn.00404f91
mov edx, dword [0x411c84]
push 0x378
push edx
call fcn.00404a20
mov eax, dword [0x411c84]
push eax
call fcn.00404560
add esp, 0xc
test eax, eax
je 0x40244c
push str.Error:_the_power_is_not_on_n_n
call fcn.004017f0
add esp, 4
push 1
call fcn.00404f91
lea ecx, [esp + 0x20]
push ecx
call fcn.00404df2
xor ebx, ebx
add esp, 4
cmp word [esp + 0x18], bx
je 0x402467
call fcn.00401650
mov eax, dword [esp + 0x3fc]
mov ebp, 1
cmp eax, ebp
jle 0x4025c3
mov ecx, dword [esp + 0x400]
mov eax, ebp
and eax, 0xffff
lea edx, [esp + 0x30]
mov edi, dword [ecx + eax*4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
mov esi, 0x40e4bc
push ecx
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4024e3
test cl, cl
je 0x4024df
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4024e3
add eax, 2
add esi, 2
test cl, cl
jne 0x4024bf
xor eax, eax
jmp 0x4024e8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4024f6
cmp bp, 1
je 0x4025ab
lea eax, [esp + 0x30]
mov esi, 0x40e4b8
push eax
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40252c
test cl, cl
je 0x402528
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40252c
add eax, 2
add esi, 2
test cl, cl
jne 0x402508
xor eax, eax
jmp 0x402531
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4025ab
lea eax, [esp + 0x30]
mov esi, 0x40e4b4
push eax
call fcn.0040cbf6
add esp, 4
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40256b
test cl, cl
je 0x402567
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40256b
add eax, 2
add esi, 2
test cl, cl
jne 0x402547
xor eax, eax
jmp 0x402570
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402577
inc ebp
jmp 0x4025ab
push str.Processing_virtual_machine_file__
call fcn.004017f0
lea eax, [esp + 0x34]
push eax
call fcn.004017f0
push str._......_n_n
call fcn.004017f0
lea ecx, [esp + 0x3c]
push ecx
call fcn.00401d40
movsx bx, al
add esp, 0x10
test bx, bx
jl 0x4025c3
mov eax, dword [esp + 0x3fc]
inc ebp
mov edx, ebp
and edx, 0xffff
cmp edx, eax
jl 0x40247b
lea eax, [esp + 0x1c]
push eax
call fcn.00404df2
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
sub ecx, esi
lea edx, [esp + 0x34]
and ecx, 0xffff
push ecx
push str.Processing_time:__d_secs_n_n
push edx
call fcn.00404da0
lea eax, [esp + 0x40]
push eax
call fcn.004017f0
xor esi, esi
add esp, 0x14
cmp bx, si
jge 0x40264d
lea ecx, [esp + 0x30]
push ecx
push ebx
call fcn.00401cc0
push str.Failed_due_to
call fcn.004017f0
lea edx, [esp + 0x3c]
push edx
call fcn.004017f0
push 0x40e4fc
call fcn.004017f0
push str._n
call fcn.004017f0
push str._FAIL___n
call fcn.004017f0
push str._n_n
call fcn.004017f0
add esp, 0x20
jmp 0x402695
push str._n
call fcn.004017f0
push str._PASS___n
call fcn.004017f0
push str._n_n
call fcn.004017f0
mov eax, dword [0x411948]
add esp, 0xc
cmp eax, esi
je 0x402695
and eax, 0xffff
push eax
push str.Data_Checksum:__.4X_n_n
mov dword [0x411948], eax
call fcn.00404ab0
add esp, 8
mov dword [0x411948], esi
cmp word [0x41192a], si
jne 0x4026ce
cmp dword [esp + 0x16c], 2
jne 0x4026ce
cmp dword [0x411c84], esi
je 0x4026ce
push str.ispDev
push 0x411c84
call fcn.00404510
add esp, 8
mov dword [0x411c8c], esi
mov dword [0x411c84], esi
movsx eax, bx
push eax
call fcn.00404f91
nop
nop
nop
nop
nop
nop
nop
nop
nop