Function at 0x405740
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], edx
test ecx, ecx
je 0x405786
mov eax, dword [ebp + 0x10]
mov ebx, dword [eax]
cmp ebx, 0x1c
jbe switch.0x00405791
call sub.cygwin1.dll___getreent
mov dword [esp + 8], ebx
mov dword [esp + 4], str.ERR:__Unsupported_VM_opcode__d_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
jmp dword [ebx*4 + 0x418ba8]
mov eax, dword [ebp + 0x10]
mov edx, ebx
mov ecx, dword [eax + 0x24]
mov eax, dword [ebp - 0x38]
call fcn.00405090
mov dword [ebp - 0x38], eax
xor eax, eax
lea esi, [esi]
mov edx, dword [ebp + 0x10]
mov edx, dword [edx + 0x28]
test edx, edx
mov dword [ebp + 0x10], edx
jne 0x405759
test eax, eax
je 0x405786
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
add dword [ebp - 0x38], 8
jmp 0x405786
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x38]
mov dword [esp], edx
call fcn.00401380
add dword [ebp - 0x38], 8
xor eax, eax
jmp 0x4057b0
mov esi, dword [0x441cc0]
test esi, esi
jle 0x405d20
mov edx, dword [ebp + 0x10]
xor ebx, ebx
mov edi, dword [edx + 0x14]
jmp 0x405893
add ebx, 1
cmp ebx, esi
jge 0x405d20
mov eax, dword [ebx*8 + 0x441ce0]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.cygwin1.dll_strcasecmp
test eax, eax
jne 0x405888
call sub.cygwin1.dll___getreent
mov dword [esp + 8], edi
mov dword [esp + 4], str.ERR:__Duplicate_label__s_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0x441cd0]
cmp edx, 0xc8
je 0x4066d3
mov ecx, dword [ebp + 0x10]
add dword [0x441cd0], 1
mov eax, dword [ecx + 0x14]
mov dword [edx*8 + 0x442320], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [edx*8 + 0x442324], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00401380
jmp 0x405860
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
add eax, 8
add edx, 0x10
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
jmp 0x405973
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0xc], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x24]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 0x24]
mov dword [esp + 8], eax
mov ecx, dword [ebp + 0xc]
mov dword [esp + 4], ecx
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x34]
call fcn.00405740
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx + 0x24]
mov esi, eax
mov edi, esi
mov eax, dword [ecx + 0x28]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x405a47
mov ecx, dword [ebp + 0x14]
lea ebx, [esi + 8]
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov edx, dword [ebp + 8]
mov dword [esp], edx
mov ecx, dword [ebp - 0x3c]
mov edx, ebx
mov eax, dword [ebp - 0x34]
call fcn.00405740
mov edi, eax
sub eax, dword [ebp - 0x34]
mov dword [esp], esi
mov esi, ebx
mov dword [esp + 0x1c], 0
test eax, eax
lea edx, [eax + 7]
cmovs eax, edx
sar eax, 3
add eax, 1
movzx eax, al
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
call fcn.00401380
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x34]
call fcn.00405480
test esi, esi
mov ecx, eax
je 0x4058c6
cmp dword [ebp - 0x24], eax
mov dword [ebp - 0x24], ecx
sete dl
cmp esi, dword [ebp - 0x20]
mov dword [ebp - 0x20], esi
sete al
test dl, al
je 0x405970
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x38], eax
mov eax, 1
jmp 0x4057b0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x30
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
xor eax, eax
add dword [ebp - 0x38], 8
jmp 0x4057b0
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x10]
mov eax, dword [eax + 8]
mov edx, dword [edx + 0x10]
mov dword [ebp - 0x44], eax
mov eax, 1
test edx, edx
cmovne eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x40669f
mov edi, dword [ebp - 0x44]
test edi, edi
jne 0x405e00
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x36
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_call_another_title__use_jump_instead_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
mov edx, dword [ebp + 0x10]
cmp dword [ebp + 0x14], 2
mov ecx, dword [edx + 4]
sete byte [ebp - 0x2d]
mov ebx, dword [edx + 8]
cmp ecx, 1
je 0x4062f1
lea eax, [ebx - 1]
cmp eax, 0x7e
jbe 0x405cb5
test ebx, ebx
sete dl
je 0x405cb0
mov edi, ecx
or edi, ebx
jne 0x405f33
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x406510
cmp ecx, 1
jle 0x406410
cmp ebx, 0x77
jle 0x406120
cmp ebx, 0x7f
jg 0x406120
cmp ebx, 0x78
mov eax, 0x83
je 0x405bca
lea eax, [ebx + 8]
movzx eax, al
mov dword [esp + 0x18], eax
lea eax, [ecx - 1]
movzx eax, al
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [esp + 4], 0x30
jmp 0x405855
mov edx, dword [ebp + 0x10]
mov ebx, dword [edx + 4]
cmp ebx, 0x2f
jg 0x405d54
cmp ebx, 0x20
jge 0x405f90
cmp ebx, 0xf
jbe 0x405798
call sub.cygwin1.dll___getreent
lea edx, [ebx - 0x80]
mov dword [esp + 8], edx
mov dword [esp + 4], str.ERR:__Cannot_set_SPRM__d_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
jmp 0x405786
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00401380
jmp 0x405860
cmp ecx, 1
jne 0x405cd8
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x4067fb
cmp eax, 0x7e
ja 0x405cd3
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0xc]
test eax, eax
jne 0x4069c5
test ebx, ebx
sete dl
test dl, dl
je 0x405b87
test ecx, ecx
je 0x405b87
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x39
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_omit_menu_title_if_specifying_vmgm_titleset_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
cmp esi, 0xc8
je 0x4069f9
mov ecx, dword [ebp + 0x10]
add dword [0x441cc0], 1
mov eax, dword [ecx + 0x14]
mov dword [esi*8 + 0x441ce0], eax
mov eax, dword [ebp - 0x38]
mov dword [esi*8 + 0x441ce4], eax
mov eax, 1
jmp 0x4057b0
cmp ebx, 0x81
jl 0x405c31
cmp ebx, 0x83
jle 0x406302
cmp ebx, 0x88
jne 0x405c31
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x24]
cmp dword [eax], 0xf
jne 0x406094
mov ebx, dword [eax + 4]
lea eax, [ebx + 0x80]
cmp eax, 0x7f
jbe 0x406094
cmp ebx, 0
jle 0x4067a6
test ebx, 0x3ff
jne 0x4069a4
movzx eax, bl
mov dword [esp + 0x18], eax
movzx eax, bh
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x56
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00401380
jmp 0x405860
cmp dword [ebp - 0x44], 0x7f
jg 0x405b22
mov ecx, dword [ebp + 0x10]
mov esi, dword [ecx + 0xc]
test esi, esi
jne 0x406707
cmp dword [ebp - 0x44], 0x79
je 0x406220
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 4]
cmp eax, 1
jle 0x406c73
mov ebx, dword [0x41f028]
test ebx, ebx
je 0x406970
movzx eax, al
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
movzx eax, byte [ebp - 0x44]
mov dword [esp + 0x10], 0xf
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x71
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00401380
mov edx, dword [ebp - 0x38]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov ecx, dword [ebp + 0x10]
add edx, 8
movzx eax, byte [ecx + 0xc]
mov dword [esp], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0xe
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x71
call fcn.00401380
mov edx, dword [ebp - 0x38]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x42
movzx eax, byte [ebp - 0x18]
add edx, 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov dword [esp + 8], 8
mov dword [esp + 4], 0x30
mov dword [esp], edx
call fcn.00401380
xor eax, eax
add dword [ebp - 0x38], 0x18
jmp 0x4057b0
cmp ebx, 0x79
jne 0x405b9f
cmp ecx, 1
nop
jg 0x405f56
test ecx, ecx
jne 0x406000
cmp dword [ebp + 0x14], 2
nop
je 0x406000
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x26
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__VMGM_must_be_specified_with_FPC_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x24]
cmp dword [eax], 0xf
jne 0x406436
mov ecx, dword [eax + 4]
test ecx, ecx
js 0x4065fa
lea eax, [ebx - 0x20]
or eax, 0xffffff80
movzx eax, al
mov dword [esp + 0x18], eax
movzx eax, cl
mov dword [esp + 0x10], eax
movzx eax, ch
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x53
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00401380
jmp 0x405860
cmp ecx, 1
sete al
mov esi, eax
mov byte [ebp - 0x45], 0
cmp byte [ebp - 0x2d], 0
jne 0x406105
mov eax, esi
test al, al
jne 0x40659a
cmp ebx, 0x79
je 0x40659a
test edi, edi
jne 0x40673b
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x40682f
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x406bdd
cmp eax, 0xffff
jg 0x406a2d
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x406a2d
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x21
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Menus_do_not_have_chapters_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
xor eax, eax
call fcn.00404ff0
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx + 0x24]
mov esi, eax
mov edx, eax
mov eax, dword [ebp - 0x38]
call fcn.00405090
mov ecx, esi
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov ebx, eax
movzx eax, cl
mov dword [esp + 0x18], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x46
mov dword [esp], ebx
add ebx, 8
call fcn.00401380
xor eax, eax
mov dword [ebp - 0x38], ebx
jmp 0x4057b0
cmp byte [ebp - 0x45], 0
je 0x406016
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x406016
lea esi, [esi]
mov esi, dword [0x41f028]
test esi, esi
je 0x40693c
test ecx, ecx
movzx edx, cl
mov eax, 1
cmovne eax, edx
mov dword [esp + 0x18], eax
movzx eax, bl
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], 0xf
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x71
mov edx, dword [ebp - 0x38]
mov dword [esp], edx
call fcn.00401380
mov edx, dword [ebp - 0x38]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov ecx, dword [ebp + 0x10]
add edx, 8
movzx eax, byte [ecx + 0xc]
mov dword [esp], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0xe
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x71
call fcn.00401380
mov edx, dword [ebp - 0x38]
add edx, 0x10
cmp dword [ebp + 0x14], 1
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
sbb eax, eax
and eax, 2
add eax, 6
mov dword [esp + 0x18], 0x42
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
jmp 0x405f18
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
cmp eax, 1
jg 0x405f56
test eax, eax
je 0x405f56
xor edx, edx
cmp eax, 1
je 0x4064a2
mov edx, dword [ebp - 0x3c]
mov eax, 0x7f
cmp dword [ebp - 0x44], 0x78
cmovne eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], eax
mov eax, dword [edx + 4]
mov ecx, dword [eax]
test ecx, ecx
mov dword [ebp - 0x28], ecx
jle 0x406b00
mov edx, dword [ebp - 0x44]
mov ebx, 1
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], 0
sub edx, 0x78
mov ecx, edx
mov dword [ebp - 0x10], eax
shl ebx, cl
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + edx*8 + 4]
mov edi, dword [eax + 8]
test edi, edi
jle 0x4062ba
mov esi, dword [eax + 4]
mov eax, dword [esi]
test dword [eax + 0x14], ebx
jne 0x406544
xor edx, edx
jmp 0x4062b3
mov eax, dword [esi + edx*4]
test dword [eax + 0x14], ebx
jne 0x406544
add edx, 1
cmp edi, edx
jg 0x4062a7
add dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x28], eax
jg 0x406284
mov edx, dword [ebp - 0x40]
mov ebx, dword [edx*4 + 0x417020]
call sub.cygwin1.dll___getreent
mov dword [esp + 8], ebx
mov dword [esp + 4], str.ERR:__Cannot_find_PGC_with_entry__s_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x4058c6
cmp byte [ebp - 0x2d], 0
mov eax, 0
cmovne ecx, eax
jmp 0x405b70
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x24]
cmp dword [eax], 0xf
jne 0x406390
mov ebx, dword [eax + 4]
lea eax, [ebx + 0x80]
cmp eax, 0x7f
jbe 0x406390
mov eax, ebx
sar eax, 0x1f
and eax, 0xfffffff0
add eax, 0x51
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00401380
mov ecx, dword [ebp + 0x10]
mov eax, ebx
or eax, 0xffffff80
mov edx, dword [ecx + 4]
mov ecx, dword [ebp - 0x38]
mov byte [ecx + edx - 0x7e], al
add ecx, 8
xor eax, eax
mov dword [ebp - 0x38], ecx
jmp 0x4057b0
xor eax, eax
call fcn.00404ff0
mov esi, eax
mov eax, dword [ebp + 0x10]
mov edx, esi
or esi, 0xffffff80
mov ecx, dword [eax + 0x24]
mov eax, dword [ebp - 0x38]
call fcn.00405090
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov ebx, eax
mov dword [esp], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x41
call fcn.00401380
mov edx, dword [ebp + 0x10]
mov ecx, esi
mov eax, dword [edx + 4]
mov byte [ebx + eax - 0x7e], cl
add ebx, 8
xor eax, eax
mov dword [ebp - 0x38], ebx
jmp 0x4057b0
cmp ecx, 1
sete al
cmp ebx, 0x7f
setg byte [ebp - 0x45]
test al, al
mov esi, eax
je 0x40600c
cmp byte [ebp - 0x45], 0
jne 0x406120
jmp 0x40600c
xor eax, eax
call fcn.00404ff0
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx + 0x24]
mov esi, eax
mov edx, eax
mov eax, dword [ebp - 0x38]
call fcn.00405090
mov edx, esi
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov ecx, dword [ebp + 0x10]
mov ebx, eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
sub eax, 0x20
or eax, 0xffffff80
movzx eax, al
mov dword [esp + 0x18], eax
movzx eax, dl
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x43
jmp 0x4060f0
cmp dword [ebp - 0x44], 0x78
mov al, 0x42
je 0x4064c4
test dl, dl
jne 0x4068ec
xor eax, eax
cmp dword [ebp - 0x44], 0x79
je 0x4064c4
movzx eax, byte [ebp - 0x44]
sub eax, 0x38
movzx eax, al
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
movzx eax, byte [ebp - 0x18]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 8
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x30
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
jmp 0x405860
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x19
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Nop_jump_statement_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
movzx eax, byte [ebp - 0x44]
add eax, 8
movzx eax, al
mov dword [esp + 0x18], eax
movzx eax, byte [ebp - 0x18]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 8
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x30
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
jmp 0x405860
test dl, dl
jne 0x40664e
cmp ebx, 0x78
je 0x40664e
cmp ebx, 0x77
nop
jg 0x406aa3
movzx eax, bl
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0xc0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [esp + 4], 0x30
jmp 0x405855
lea eax, [ebx - 0x20]
or eax, 0xffffff80
movzx eax, al
mov dword [esp + 0x18], eax
movzx eax, cl
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x43
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
jmp 0x405860
mov eax, 0x42
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [esp + 4], 0x30
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
jmp 0x405860
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x41
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_call_a_menu_from_another_menu__use_jump_instead_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x15
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Too_many_gotos_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x2c
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_call_a_chapter_within_a_menu_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
cmp ebx, 0x7f
jle 0x40682f
cmp dword [ebp + 0x14], 1
jle 0x406b0e
mov edx, dword [ebp + 0x10]
lea eax, [ebx - 0x80]
cmp dword [ebp + 0x14], 2
movzx eax, al
mov esi, dword [edx + 0xc]
mov edx, esi
movzx ecx, dl
mov edx, 2
je 0x406775
cmp esi, 1
sbb edx, edx
and edx, 0xfffffffe
add edx, 5
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
jmp 0x406582
je 0x405dae
movzx eax, bl
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x46
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
jmp 0x405860
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x3d
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_jump_to_a_menu_from_a_title__use_call_instead_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
mov eax, dword [ebp + 8]
test eax, eax
je 0x406ba9
lea edx, [ebx - 0x78]
cmp edx, 7
ja 0x406ac0
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 8]
test edi, edi
jle 0x40688a
mov esi, dword [ecx + 4]
mov ecx, edx
mov eax, dword [esi]
mov eax, dword [eax + 0x14]
sar eax, cl
test al, 1
jne 0x406dae
mov ecx, edx
xor edx, edx
mov dword [ebp - 0x44], 1
shl dword [ebp - 0x44], cl
jmp 0x406883
mov eax, dword [esi + edx*4]
mov ecx, dword [ebp - 0x44]
test dword [eax + 0x14], ecx
jne 0x406b81
add edx, 1
cmp edi, edx
jg 0x406874
cmp ebx, 0x77
jg 0x406da2
cmp byte [ebp - 0x2d], 0
jne 0x406b55
and ebx, 0x7f
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0x20
mov ecx, dword [ebp - 0x38]
mov dword [esp], ecx
call fcn.00401380
jmp 0x405860
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0xc0
movzx eax, byte [ebp - 0x18]
mov dword [esp + 0x14], eax
movzx eax, byte [ebp - 0x44]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 8
mov dword [esp + 4], 0x30
mov dword [esp + 0x10], eax
mov edx, dword [ebp - 0x38]
mov dword [esp], edx
call fcn.00401380
jmp 0x405860
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x2a
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__That_form_of_jumping_is_not_allowed_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x30
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_call_to_a_menu_in_another_titleset_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov dword [esp + 8], ebx
mov dword [esp + 4], str.WARN:_Button_value_is__d__but_it_should_be_a_multiple_of_1024_nWARN:__button_11024__22048__etc__n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x405dae
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x3a
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_specify_chapter_when_jumping_to_another_menu_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x16
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Too_many_labels_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
mov edx, eax
sar edx, 0x10
cmp edx, 1
je 0x406b99
cmp edx, 2
je 0x406b89
xor esi, esi
test edx, edx
mov ebx, str._err_
jne 0x406a5a
mov ecx, dword [ebp + 0xc]
mov ebx, 0x418938
mov esi, dword [ecx + 8]
movzx edi, ax
cmp esi, edi
jl 0x406d72
movzx eax, al
mov dword [esp + 0x20], eax
lea eax, [edx + 5]
movzx eax, al
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
jmp 0x405c98
xor eax, eax
cmp ebx, 0x79
je 0x406653
lea eax, [ebx - 0x38]
movzx eax, al
jmp 0x406653
mov eax, dword [ebp + 8]
mov esi, dword [eax + 8]
cmp ebx, esi
jle 0x406893
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.ERR:__Cannot_jump_to_menu_PGC__d__only__d_exist_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
jmp 0x405786
mov eax, dword [ebp - 0x44]
sub eax, 0x78
mov dword [ebp - 0x40], eax
jmp 0x4062c6
mov edx, dword [ebp - 0x3c]
lea eax, [ebx - 0x80]
mov dword [ebp - 0x2c], eax
mov eax, dword [edx + 8]
mov esi, dword [eax + 8]
cmp dword [ebp - 0x2c], esi
jg 0x406c11
mov edx, dword [ebp + 0x10]
mov esi, dword [edx + 0xc]
test esi, esi
je 0x406b45
mov eax, dword [eax + 4]
mov eax, dword [eax + ebx*4 - 0x204]
mov edi, dword [eax + 8]
cmp esi, edi
jg 0x406c40
lea eax, [ebx - 0x80]
mov edx, esi
movzx eax, al
movzx ecx, dl
jmp 0x40676a
and ebx, 0x7f
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0xc0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
jmp 0x4065dd
lea ebx, [edx + 1]
jmp 0x40688a
mov ecx, dword [ebp + 0xc]
mov ebx, 0x418948
mov esi, dword [ecx + 0x10]
jmp 0x406a5a
mov ecx, dword [ebp + 0xc]
mov ebx, 0x418940
mov esi, dword [ecx + 0xc]
jmp 0x406a5a
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x26
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_jump_to_menu__none_exist_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x2a
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_jump_to_a_chapter_from_a_FPC_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], esi
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 4], str.ERR:__Cannot_jump_to_title__d__only__d_exist_n
mov dword [esp + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov dword [esp + 0x10], edi
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 8], esi
mov dword [esp + 4], str.ERR:__Cannot_jump_to_chapter__d_of_title__d__only__d_exist_n
mov dword [esp + 0xc], ecx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
jmp 0x405786
cmp dword [ebp - 0x44], 0x77
setle bl
test eax, eax
mov edx, ebx
jne 0x406239
test bl, bl
je 0x406242
mov ecx, dword [0x41f028]
test ecx, ecx
je 0x406d3e
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
movzx eax, byte [ebp - 0x44]
mov dword [esp + 0x10], 0xf
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x71
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call fcn.00401380
mov edx, dword [ebp - 0x38]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x87
movzx eax, byte [ebp - 0x18]
add edx, 8
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov dword [esp + 8], 8
mov dword [esp + 4], 0x30
mov dword [esp], edx
call fcn.00401380
xor eax, eax
add dword [ebp - 0x38], 0x10
jmp 0x4057b0
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x38
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Cannot_call_to_a_specific_menu_PGC__only_an_entry_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [ebp - 0x38], 0
jmp 0x405786
call sub.cygwin1.dll___getreent
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.ERR:__Cannot_jump_to__s__d__only__d_exist_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [ebp - 0x38], 0
jmp 0x405786
mov ebx, dword [ebx*4 + 0x416e40]
jmp 0x4062d0
mov ebx, 1
jmp 0x406893