Function at 0x401ac0
Capabilities:
Print debug messages
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x40b1cf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x450
mov eax, dword [0x40f040]
push ebx
push ebp
push esi
push edi
push 0x58
mov dword [esp + 0x460], eax
call fcn.00402fc6
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
test esi, esi
mov dword [esp + 0x468], 0
je 0x401b28
push 0x20
push 0x40f8e8
call fcn.00402f9f
add esp, 8
add eax, 2
push eax
mov ecx, esi
call fcn.004023f0
mov edi, eax
jmp 0x401b2a
xor edi, edi
push str.upgres.dll
mov dword [esp + 0x46c], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x14], ebp
jne 0x401b55
push str.upgres.dll_could_not_be_loaded__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test edi, edi
je 0x401caf
lea ecx, [esp + 0x18]
call fcn.00402510
push 0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x46c], 2
call fcn.00402530
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
test eax, eax
jne 0x401be6
test ebp, ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401bad
lea ecx, [esp + 0x10]
push ecx
push 0x855
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], eax
call fcn.00401900
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401bd3
push 0x200
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401e88
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_lstrcpyW]
push esi
push 0x40f088
call fcn.00402c68
add esp, 8
jmp 0x401e7c
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
test eax, eax
je 0x401c3f
test ebp, ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401c1e
lea ecx, [esp + 0x10]
push ecx
push 0x856
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 0
call fcn.00401900
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401bd3
push 0x200
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401e88
push str.Your_tape_is_write_protected._Please_clear_the_write_protection_and_try_again._r_n
jmp 0x401bcc
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
test eax, eax
je 0x401c96
cmp eax, 0xffff
jne 0x401db0
push 0x410108
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x401c96
push 0
lea ecx, [esp + 0x1c]
call fcn.00402650
test eax, eax
je 0x401d3e
push str..event.ini
push 0
push str.CancelExport
push str.TapeCheck
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x401e90
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
lea ecx, [esp + 0x18]
mov byte [esp + 0x468], 1
call fcn.004026e0
lea ecx, [esp + 0x254]
push 0x40fcf8
push ecx
call fcn.004014c0
add esp, 8
lea ecx, [esp + 0x28]
call fcn.00401120
push 0
push 0
push 0
lea edx, [esp + 0x260]
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0x478], 3
call fcn.00401220
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
call fcn.004010c0
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x28]
mov byte [esp + 0x468], 1
call fcn.00401050
test ebp, ebp
je 0x401d17
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
mov ecx, dword [esp + 0x460]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x450]
pop ebx
call fcn.00402b75
add esp, 0x45c
ret
test ebp, ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401d6b
lea ecx, [esp + 0x10]
push ecx
push 0x857
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 0
call fcn.00401900
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401d91
push 0x200
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401c96
push str.Tape_not_empty_timeout___The_existing_data_on_the_tape_will_be_overwritten._r_n
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push 0x40f068
call fcn.00402c68
add esp, 8
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401c96
cmp eax, 0xfffffffe
jl 0x401e88
test eax, eax
jl 0x401e10
cmp eax, 1
jne 0x401e88
test ebp, ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401df3
lea edx, [esp + 0x10]
push edx
push 0x164
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 0
call fcn.00401900
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401e5f
push 0x200
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401e88
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
jmp 0x401e58
test ebp, ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
je 0x401e3d
lea eax, [esp + 0x10]
push eax
push 0x163
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 0
call fcn.00401900
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x401e5f
push 0x200
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x401e88
push str.An_unknown_error_occurred_while_accessing_your_tape_device._Please_insert_a_new_blank_tape_and_try_again._r_n
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push 0x40f088
call fcn.00402c68
push 0x40c500
push 0x40f088
call fcn.00402c68
add esp, 0x10
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [edi]
push 1
mov ecx, edi
call dword [edx]
lea ecx, [esp + 0x18]
mov byte [esp + 0x468], 1
call fcn.004026e0
test ebp, ebp
je 0x401eac
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or eax, 0xffffffff
jmp 0x401d19