Function at 0x401700
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x409084
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2e8
push ebx
push ebp
push esi
push edi
push 0x58
call fcn.00402792
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0x300], ebx
je 0x40175c
push 0x20
push 0x40e0b8
call fcn.00402e50
add esp, 8
inc eax
mov ecx, esi
push eax
call fcn.00401fa0
mov edi, eax
mov dword [esp + 0x10], edi
jmp 0x401762
mov dword [esp + 0x10], ebx
mov edi, ebx
push str.upgres.dll
mov dword [esp + 0x304], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x14], esi
jne 0x40178d
push str.upgres.dll_could_not_be_loaded__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp edi, ebx
je 0x4019bb
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
test eax, eax
jne 0x40181c
mov ebp, dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp esi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x4017d5
push 0x400
push eax
call ebx
push eax
call ebp
mov edi, eax
test edi, edi
je 0x4017d5
push 0x400
push edi
push 0x855
push esi
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4017f3
push 0x100
push 8
call ebx
push eax
call ebp
mov edi, eax
test edi, edi
je 0x40180d
push str.Tape_device_not_ready_or_available._Please_make_sure_no_other_applications_are_using_your_tape_drive__check_your_tape_and_try_again._r_n
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push 0x40b638
call fcn.004026a7
add esp, 8
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x10]
push 1
mov edx, dword [ecx]
call dword [edx]
jmp 0x4019a0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
cmp eax, 0xffff
je 0x4019b3
add eax, 2
cmp eax, 3
ja case.default.0x40183a
jmp dword [eax*4 + 0x401b38]
mov ebp, dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp esi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401877
push 0x400
push 0
call ebx
push eax
call ebp
mov edi, eax
test edi, edi
je 0x401877
push 0x400
push edi
push 0x858
push esi
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x401899
push 0x100
push 8
call ebx
push eax
call ebp
mov edi, eax
test edi, edi
je 0x401994
push str.No_data_was_found_on_your_tape._Please_insert_the_tape_used_during_export_data__and_close_your_tape_drive_door_if_necessary_._r_n
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
push 0x40b638
call fcn.004026a7
add esp, 8
push edi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401994
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp esi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
je 0x4018f2
push 0x400
push 0
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x4018f2
mov ecx, dword [esp + 0x14]
push 0x400
push esi
push 0x163
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x401967
push 0x100
push 8
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401990
push str.An_unknown_error_occurred_while_accessing_your_tape_device._Please_insert_a_new_blank_tape_and_try_again._r_n
jmp 0x401960
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp esi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
je 0x401949
push 0x400
push 0
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401949
mov edx, dword [esp + 0x14]
push 0x400
push esi
push 0x164
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x401967
push 0x100
push 8
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x401990
push str.No_tape_was_found_in_your_tape_drive._Please_insert_a_blank_tape__and_close_your_tape_drive_door_if_necessary_._r_n
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push 0x40b638
call fcn.004026a7
push 0x40b140
push 0x40b638
call fcn.004026a7
add esp, 0x10
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
test esi, esi
je 0x4019ab
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or eax, 0xffffffff
jmp 0x401b1f
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
mov al, byte [0x40e5cc]
mov ecx, 0x12
mov byte [esp + 0x1c], al
xor eax, eax
lea edi, [esp + 0x1d]
push 0x20
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, 0x40e0b8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._DevicePath
mov dword [esp + 0x14], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
inc ebp
lea ebx, [ebp + 0x40e0b8]
push ebx
call fcn.00402e50
add esp, 8
sub eax, 0x40e0b8
mov dword [esp + 0x18], eax
jns 0x401b0f
mov edi, str._DevicePath
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x68]
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
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov ecx, 0x12
lea edi, [esp + 0x1c]
sub esi, ebp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
lea ecx, [esp + 0x20]
push ebx
push ecx
stosb byte es:[edi], al
call fcn.00402d40
lea edi, [esp + 0x28]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + esi + 0x28], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x74]
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 + 0x74]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x204]
push ecx
call fcn.00401620
add esp, 0x14
lea ecx, [esp + 0xcc]
call fcn.00401000
push 0
push 0
lea edx, [esp + 0x1fc]
push 0
push edx
lea ecx, [esp + 0xdc]
mov byte [esp + 0x310], 2
call fcn.00401100
push 0xffffffffffffffff
lea ecx, [esp + 0xd0]
call fcn.004013d0
mov esi, dword [esp + 0xd8]
lea ecx, [esp + 0xcc]
mov byte [esp + 0x300], 1
call fcn.004010d0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x401b0b
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x401b1f
test esi, esi
je 0x401b1a
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0xffff
mov ecx, dword [esp + 0x2f8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2f4
ret