Function at 0x401be0
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40a0b4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x300
mov eax, dword [0x40d040]
push ebx
push esi
push edi
push 0x58
mov dword [esp + 0x308], eax
call fcn.00402a97
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
xor edi, edi
cmp esi, edi
mov dword [esp + 0x314], edi
je 0x401c49
push 0x20
push 0x40d8e8
call fcn.00403560
add esp, 8
inc eax
push eax
mov ecx, esi
call fcn.00402580
mov edi, eax
push str.upgres.dll
mov dword [esp + 0x318], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
xor esi, esi
cmp ebx, esi
mov dword [esp + 0x14], ebx
jne 0x401c76
push str.upgres.dll_could_not_be_loaded__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp edi, esi
je 0x401e52
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
test eax, eax
jne 0x401cf9
cmp ebx, esi
je 0x401cac
lea ecx, [esp + 0x10]
push ecx
push 0x855
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], esi
call fcn.00401aa0
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401cd6
push 0x100
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je case.default.0x401d17
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 esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push 0x40d088
call fcn.00402991
add esp, 8
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp case.default.0x401d17
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
cmp eax, 0xffff
je 0x401e4a
add eax, 2
cmp eax, 3
ja case.default.0x401d17
jmp dword [eax*4 + 0x401fcc]
cmp ebx, esi
je 0x401d41
lea ecx, [esp + 0x10]
push ecx
push 0x858
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], esi
call fcn.00401aa0
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401cd6
push 0x100
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je case.default.0x401d17
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
jmp 0x401ccf
cmp ebx, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401d96
lea edx, [esp + 0x10]
push edx
push 0x163
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 0
call fcn.00401aa0
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401e02
push 0x100
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401e2b
push str.An_unknown_error_occurred_while_accessing_your_tape_device._Please_insert_a_new_blank_tape_and_try_again._r_n
jmp 0x401dfb
cmp ebx, esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401de0
lea eax, [esp + 0x10]
push eax
push 0x164
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 0
call fcn.00401aa0
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401e02
push 0x100
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401e2b
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 0x40d088
call fcn.00402991
push 0x40b470
push 0x40d088
call fcn.00402991
add esp, 0x10
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0x14]
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
test ebx, ebx
je 0x401e42
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or eax, 0xffffffff
jmp 0x401fa8
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
xor eax, eax
mov byte [esp + 0x140], 0
mov ecx, 0x12
lea edi, [esp + 0x141]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, 0x40d8e8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401e74
sub eax, edx
push 0x20
push 0x40d8f4
mov esi, eax
call fcn.00403560
add esp, 8
sub eax, 0x40d8e8
mov dword [esp + 0x10], eax
jns 0x401f98
mov ecx, dword [str._DevicePath]
mov eax, dword [0x40b280]
mov edx, dword [0x40b27c]
mov dword [esp + 0x190], ecx
mov dword [esp + 0x198], eax
xor eax, eax
mov ecx, 0x12
lea edi, [esp + 0x140]
rep stosd dword es:[edi], eax
lea ecx, [esi - 0xc]
push ecx
mov dword [esp + 0x198], edx
stosw word es:[edi], ax
lea edx, [esp + 0x144]
push 0x40d8f4
push edx
stosb byte es:[edi], al
call fcn.00403420
lea eax, [esp + 0x14c]
add esp, 0xc
mov byte [esp + esi + 0x134], 0
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401f00
lea edi, [esp + 0x190]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401f13
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x190]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [esp + 0x1fc]
push ecx
call fcn.00401620
add esp, 8
lea ecx, [esp + 0x18]
call fcn.00401130
push 0
push 0
push 0
lea edx, [esp + 0x204]
push edx
lea ecx, [esp + 0x28]
mov byte [esp + 0x324], 2
call fcn.00401240
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call fcn.004010c0
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x18]
mov byte [esp + 0x314], 1
call fcn.00401050
test ebx, ebx
je 0x401f94
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x401fa8
test ebx, ebx
je 0x401fa3
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0xffff
mov ecx, dword [esp + 0x30c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x304]
call fcn.0040297e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret