Function at 0x403d00
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40401a
mov eax, dword [ebp + 0xc]
mov edx, 2
mov dword [ebp - 0x18], 0x420580
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
call fcn.00403940
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
test eax, eax
jle 0x403da7
mov esi, dword [edx + 4]
xor edi, edi
lea ebx, [edi*8]
mov eax, dword [esi + ebx + 4]
call fcn.00401940
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 8]
mov eax, dword [eax + ebx + 4]
call fcn.00401fd0
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 4]
mov edx, dword [esi + ebx + 4]
mov ecx, dword [edx + 8]
test ecx, ecx
jne 0x403d7c
mov eax, dword [0x41f028]
test eax, eax
je 0x403d9d
mov eax, dword [edx + 0xc]
test al, 4
jne 0x403d9d
test ecx, ecx
je 0x403d93
mov eax, dword [edx + 4]
mov eax, dword [eax]
or dword [eax + 0x14], 4
mov eax, dword [edx + 0xc]
add dword [edx + 0x10], 1
or eax, 4
mov dword [edx + 0xc], eax
mov edx, dword [ebp + 0xc]
add edi, 1
cmp dword [edx], edi
jg 0x403d40
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x2b
mov dword [esp + 4], 1
mov dword [esp], str.INFO:_dvdauthor_creating_table_of_contents_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov eax, dword [ebp + 0x10]
call fcn.00401810
mov dword [esp + 8], 0x20b4c
mov dword [esp + 4], 0
mov dword [esp], 0x420580
call sub.cygwin1.dll_memset
mov ecx, dword [ebp + 0x10]
mov dword [esp], 0x4410d0
mov dword [esp + 4], ecx
call sub.cygwin1.dll_strcpy
mov ecx, 0x4410d0
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x403e0b
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea eax, [ecx + 2]
cmove ecx, eax
add dl, dl
sbb ecx, 3
sub ecx, 0x4410d0
lea eax, [ecx + 0x4410d0]
mov dword [ecx + 0x4410d0], 0x4449562f
mov dword [eax + 4], 0x545f4f45
mov word [eax + 8], 0x53
mov dword [esp], 0x4410d0
call sub.cygwin1.dll_strdup
mov dword [ebp - 0x30], eax
mov eax, 0x41fc00
mov byte [eax], 0
add eax, 0xe
cmp eax, 0x420186
jne 0x403e72
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_opendir
mov edi, eax
lea esi, [esi]
mov dword [esp], edi
call sub.cygwin1.dll_readdir
test eax, eax
mov ebx, eax
je 0x404022
lea esi, [ebx + 0x14]
mov dword [esp], esi
call sub.cygwin1.dll_strlen
cmp eax, 0xc
jne 0x403e90
lea eax, [ebx + 0x1a]
mov dword [esp + 4], str._0.IFO
mov dword [esp], eax
call sub.cygwin1.dll_strcasecmp
test eax, eax
jne 0x403e90
mov dword [esp + 8], 4
mov dword [esp + 4], str.VTS_
mov dword [esp], esi
call sub.cygwin1.dll_strncasecmp
test eax, eax
jne 0x403e90
movsx eax, byte [ebx + 0x18]
movsx edx, byte [ebx + 0x19]
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x210]
imul ebx, eax, 0xe
cmp byte [ebx + 0x41fc00], 0
jne 0x40442e
test eax, eax
je 0x404482
lea eax, [ebx + 0x41fc00]
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.cygwin1.dll_strcpy
jmp 0x403e90
cmp dword [ebp - 0x20], 0x63
jg 0x403f56
mov ebx, dword [ebp - 0x20]
add ebx, 1
imul eax, ebx, 0xe
lea edx, [eax + 0x41fc00]
jmp 0x403f51
movzx eax, byte [edx]
add edx, 0xe
test al, al
jne 0x404399
add ebx, 1
cmp ebx, 0x63
jle 0x403f40
mov eax, dword [0x4410c8]
test eax, eax
je 0x40444e
mov edx, dword [ebp + 0xc]
lea ebx, [ebp - 0x18]
mov eax, dword [edx + 8]
mov edi, dword [eax + 8]
test edi, edi
jne 0x4042db
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str._s_VIDEO_TS.IFO
mov dword [esp], 0x420190
mov dword [esp + 8], eax
call sub.cygwin1.dll_sprintf
mov edx, dword [ebp + 8]
mov dword [esp + 8], 0x420190
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0040a210
mov ecx, dword [ebp - 0x30]
mov dword [esp + 4], str._s_VIDEO_TS.BUP
mov dword [esp], 0x420190
mov dword [esp + 8], ecx
call sub.cygwin1.dll_sprintf
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x420190
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0040a210
mov esi, dword [0x4410c8]
test esi, esi
jle 0x40400f
mov esi, 0x420588
xor ebx, ebx
lea esi, [esi]
mov eax, dword [esi]
test eax, eax
je 0x403ffe
mov dword [esp], eax
call sub.cygwin1.dll_free
add ebx, 1
add esi, 0x314
cmp dword [0x4410c8], ebx
jg 0x403ff0
mov edx, dword [ebp - 0x30]
mov dword [esp], edx
call sub.cygwin1.dll_free
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call sub.cygwin1.dll_closedir
mov dword [ebp - 0x24], 0x41fc0e
mov dword [ebp - 0x20], 1
mov edx, dword [ebp - 0x24]
cmp byte [edx], 0
je 0x403f26
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str._s__s
mov dword [esp], 0x420190
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
call sub.cygwin1.dll_sprintf
call sub.cygwin1.dll___getreent
mov dword [esp + 8], 0x420190
mov dword [esp + 4], str.INFO:_Scanning__s_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp + 4], 0x417f56
mov dword [esp], 0x420190
call sub.cygwin1.dll__fopen64
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x404402
cmp dword [0x4410c8], 0xa8
jg 0x4043ce
mov edx, dword [ebp - 0x2c]
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
mov dword [esp], 0x4414c0
mov dword [esp + 0xc], edx
call sub.cygwin1.dll_fread
movzx edx, byte [0x441580]
movzx eax, byte [0x441581]
mov ecx, dword [0x4410c8]
shl edx, 0x18
shl eax, 0x10
or edx, eax
movzx eax, byte [0x441583]
mov dword [ebp - 0x28], ecx
or edx, eax
movzx eax, byte [0x441582]
shl eax, 8
or edx, eax
je 0x4042c0
imul eax, ecx, 0x314
mov ebx, 0x420580
mov dword [eax + 0x420580], 1
imul eax, dword [ebp - 0x28], 0x314
mov esi, 0x4415c0
movzx edx, byte [0x4414cc]
mov dword [ebp - 0x34], eax
movzx eax, byte [0x4414cd]
shl edx, 0x18
mov ecx, dword [ebp - 0x34]
shl eax, 0x10
or edx, eax
movzx eax, byte [0x4414cf]
mov edi, ecx
add edi, 0x420590
or edx, eax
movzx eax, byte [0x4414ce]
shl eax, 8
or edx, eax
add edx, 1
mov dword [ebx + ecx + 0xc], edx
mov eax, dword [0x4414e2]
mov dword [ecx + 0x420890], eax
mov ecx, 0xc0
rep movsd dword es:[edi], dword [esi]
xor edi, edi
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x2c]
mov dword [esp], 0x4414c0
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fread
movzx eax, byte [0x4414c0]
movzx edx, byte [0x4414c1]
shl eax, 8
or eax, edx
mov edx, dword [ebp - 0x34]
mov dword [ebx + edx + 4], eax
shl eax, 2
mov dword [esp], eax
call sub.cygwin1.dll_malloc
mov ecx, dword [ebp - 0x34]
mov dword [ebx + ecx + 8], eax
mov eax, dword [ecx + 0x420584]
xor ebx, ebx
lea esi, [eax*4 + 8]
sub eax, 1
mov edx, esi
jle 0x404251
mov edi, dword [ebp - 0x34]
jmp 0x4041f3
mov edx, esi
movzx esi, byte [ebx*4 + 0x4414cc]
movzx eax, byte [ebx*4 + 0x4414cd]
mov ecx, dword [edi + 0x420588]
shl esi, 0x18
shl eax, 0x10
or esi, eax
movzx eax, byte [ebx*4 + 0x4414cf]
or esi, eax
movzx eax, byte [ebx*4 + 0x4414ce]
shl eax, 8
or esi, eax
mov eax, esi
sub eax, edx
test eax, eax
lea edx, [eax + 3]
cmovs eax, edx
sar eax, 2
mov dword [ecx + ebx*4], eax
mov eax, dword [edi + 0x420584]
add ebx, 1
sub eax, 1
cmp ebx, eax
jl 0x4041f1
lea edi, [ebx*4]
imul eax, dword [ebp - 0x28], 0x314
movzx edx, byte [0x4414c5]
mov ecx, dword [eax + 0x420588]
movzx eax, byte [0x4414c4]
shl edx, 0x10
shl eax, 0x18
or eax, edx
movzx edx, byte [0x4414c7]
or eax, edx
movzx edx, byte [0x4414c6]
shl edx, 8
or eax, edx
add eax, 1
sub eax, esi
shr eax, 2
mov dword [ecx + edi], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.cygwin1.dll_fclose
add dword [ebp - 0x20], 1
add dword [0x4410c8], 1
add dword [ebp - 0x24], 0xe
cmp dword [ebp - 0x20], 0x64
jne 0x404038
jmp 0x403f56
imul eax, dword [ebp - 0x28], 0x314
mov ebx, 0x420580
mov dword [eax + 0x420580], 0
jmp 0x404127
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 1
mov dword [esp], str.INFO:_Creating_menu_for_TOC_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov ecx, dword [ebp - 0x30]
mov dword [esp + 4], str._s_VIDEO_TS.VOB
mov dword [esp], 0x420190
mov dword [esp + 8], ecx
call sub.cygwin1.dll_sprintf
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], 2
mov eax, dword [edx + 8]
mov dword [esp], 0x420190
mov dword [esp + 4], eax
call fcn.0040e0f0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 8]
mov dword [esp], eax
call fcn.0040be90
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov edx, 2
call fcn.00402220
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.cygwin1.dll_fputc
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0xc], 2
mov dword [esp + 8], ebx
mov eax, dword [ecx + 8]
mov dword [esp], 0x420190
mov dword [esp + 4], eax
call fcn.0040c450
jmp 0x403f77
call sub.cygwin1.dll___getreent
imul edx, ebx, 0xe
mov dword [esp + 8], ebx
mov dword [esp + 4], str.ERR:__Titleset__d___s__does_not_immediately_follow_the_last_titleset_n
add edx, 0x41fc00
mov dword [esp + 0xc], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp], 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x14
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__Too_many_VTSs_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [esp], 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov ebx, eax
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x420190
mov dword [esp + 4], str.ERR:__cannot_open__s:__s_n
jmp 0x4043b7
call sub.cygwin1.dll___getreent
lea edx, [ebx + 0x41fc00]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], str.ERR:__Two_different_names_for_the_same_titleset:__s_and__s_n
jmp 0x4043b7
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x1f
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__No_.IFO_files_to_process_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [esp], 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov dword [esp + 8], esi
mov dword [esp + 4], str.ERR:__Cannot_have_titleset_0___s__n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp], 1
call sub.cygwin1.dll_exit
lea esi, [esi]