Function at 0x40a210
Capabilities:
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 + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x20], edx
mov edx, dword [ebp + 0x10]
test eax, eax
je 0x40a239
mov ecx, dword [eax]
test ecx, ecx
jne 0x40a714
mov dword [ebp - 0x14], 0
mov dword [esp], edx
mov edi, 0x442a20
mov dword [esp + 4], 0x41ad1b
call sub.cygwin1.dll__fopen64
mov ecx, 0x200
mov dword [ebp - 0x10], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x1c]
mov dword [0x442a20], 0x56445644
mov dword [0x442a24], 0x4f454449
mov dword [0x442a28], 0x474d562d
mov byte [0x442a41], 0x11
mov byte [0x442a47], 1
mov byte [0x442a49], 1
mov byte [0x442a4a], 1
mov eax, dword [edi]
mov eax, dword [eax + 0x20b48]
mov dword [esp], 0x442a5e
mov dword [esp + 4], eax
call fcn.004013f0
mov dword [0x442a60], 0x41445644
mov dword [0x442a64], 0x6f687475
mov dword [0x442a68], 0x2e302072
mov dword [0x442a6c], 0x37312e36
mov dword [0x442a70], 0
mov dword [0x442a74], 0
mov dword [0x442a78], 0
mov word [0x442a7c], 0
mov byte [0x442a7e], 0
mov byte [0x442aa6], 4
mov dword [esp + 4], 1
mov dword [esp], 0x442ae4
call fcn.004013c0
mov edx, dword [edi]
xor ecx, ecx
xor eax, eax
call fcn.00409c70
lea ebx, [eax + 1]
mov eax, dword [ebp - 0x14]
or eax, dword [0x41f028]
jne 0x40a840
mov dword [esp + 4], ebx
mov dword [esp], 0x442af0
call fcn.004013c0
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx]
imul eax, dword [eax + 0x20b48], 0x30c
lea edx, [eax + 0x1006]
add eax, 0x807
cmovs eax, edx
sar eax, 0xb
add ebx, eax
or ecx, dword [0x41f028]
jne 0x40a7c0
lea eax, [ebx - 1]
mov dword [esp + 4], eax
lea edi, [ebx + ebx]
mov dword [esp], 0x442a3c
call fcn.004013c0
mov ecx, dword [ebp - 0x14]
or ecx, dword [0x41f028]
jne 0x40a730
lea eax, [edi - 1]
mov dword [esp + 4], eax
mov dword [esp], 0x442a2c
call fcn.004013c0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov eax, dword [eax + 8]
mov dword [esp], eax
call fcn.00401130
mov edx, 0x40
mov byte [0x442f05], 0xec
mov byte [0x442f0d], 1
cmp eax, 0x15fea
mov eax, 0xffffffc0
cmove edx, eax
mov eax, dword [ebp - 0x20]
mov byte [0x442e27], dl
test eax, eax
je 0x40a886
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x28]
test eax, eax
jne 0x40a6e0
mov eax, dword [ecx]
test eax, eax
jne 0x40a6e0
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40a6e0
mov esi, dword [ecx + 0x14]
test esi, esi
jne 0x40a6e0
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 4]
test edx, edx
je 0x40a441
mov ebx, dword [edx]
test ebx, ebx
jne 0x40a9c2
mov dword [esp + 0x18], 2
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 4], 0x442f14
mov dword [esp], 0x442f14
mov dword [esp + 8], ecx
call fcn.00407440
test eax, eax
je 0x40aa2a
sub eax, 0x442f14
test eax, eax
lea edx, [eax + 7]
cmovs eax, edx
sar eax, 3
cmp eax, 0x80
jg 0x40aa06
mov byte [0x442f0d], al
movzx eax, byte [0x442f0d]
mov dword [esp], 0x442f12
lea eax, [eax*8 + 7]
mov dword [esp + 4], eax
call fcn.004013f0
mov dword [esp], 0x442f12
call fcn.00401440
mov dword [esp], 0x442aa2
add eax, 0x4ec
mov dword [esp + 4], eax
call fcn.004013f0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40a50f
mov ecx, dword [ebp - 0x10]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x800
mov dword [esp], 0x442a20
mov dword [esp + 0xc], ecx
call sub.cygwin1.dll_fwrite
mov ecx, edi
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov edx, dword [edi]
call fcn.00409c70
mov eax, dword [ebp - 0x14]
or eax, dword [0x41f028]
jne 0x40a917
xor eax, eax
mov ecx, 0x200
mov edi, 0x442a20
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20b48]
lea edi, [eax*4 + 8]
mov dword [ebp - 0x18], edi
mov dword [esp + 4], eax
mov dword [esp], 0x442a20
call fcn.004013f0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
imul eax, dword [eax + 0x20b48], 0x30c
mov dword [esp], 0x442a24
add eax, 7
mov dword [esp + 4], eax
call fcn.004013c0
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
mov esi, dword [eax + 0x20b48]
test esi, esi
jle 0x40a5c5
mov edi, dword [ebp - 0x18]
mov ebx, 0x442a28
xor esi, esi
nop
lea esi, [esi]
mov dword [esp + 4], edi
add esi, 1
add edi, 0x308
mov dword [esp], ebx
add ebx, 4
call fcn.004013c0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
cmp dword [eax + 0x20b48], esi
jg 0x40a5a0
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x40a5f3
mov ecx, dword [ebp - 0x10]
mov dword [esp + 8], 1
mov dword [esp + 0xc], ecx
mov edi, dword [ebp - 0x18]
mov dword [esp], 0x442a20
mov dword [esp + 4], edi
call sub.cygwin1.dll_fwrite
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
mov ecx, dword [eax + 0x20b48]
test ecx, ecx
jle 0x40a681
xor ebx, ebx
mov dword [esp + 4], 0x307
imul esi, ebx, 0x314
mov edi, 0x442a28
mov dword [esp], 0x442a20
call fcn.004013c0
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx]
add eax, esi
add esi, 0x10
mov eax, dword [eax + 0x310]
mov dword [0x442a24], eax
add esi, dword [ecx]
test edx, edx
mov ecx, 0xc0
rep movsd dword es:[edi], dword [esi]
je 0x40a66a
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x308
mov dword [esp], 0x442a20
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov edx, dword [ebp - 0x1c]
add ebx, 1
add dword [ebp - 0x18], 0x308
mov eax, dword [edx]
cmp dword [eax + 0x20b48], ebx
jg 0x40a603
and dword [ebp - 0x18], 0x7ff
mov ebx, 0x800
sub ebx, dword [ebp - 0x18]
cmp ebx, 0x800
jne 0x40a8d0
mov edi, dword [ebp - 0x14]
or edi, dword [0x41f028]
je 0x40a6c9
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x10]
call fcn.00409e40
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 4]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x10]
call fcn.0040a060
mov edi, dword [ebp - 0x10]
mov dword [ebp + 8], edi
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp sub.cygwin1.dll_fclose
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x37
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__FPC_can_ONLY_contain_prei_commands__nothing_else_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov eax, dword [eax + 4]
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
setne al
movzx eax, al
mov dword [ebp - 0x14], eax
jmp 0x40a240
mov dword [esp + 4], ebx
mov dword [esp], 0x442ae0
call fcn.004013c0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov eax, dword [eax + 8]
mov esi, dword [eax + 8]
mov edx, esi
sub edx, 1
js 0x40a785
mov eax, dword [eax + 0x14]
mov ebx, dword [eax + edx*4]
lea eax, [eax + esi*4 - 8]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40a780
jmp 0x40a870
mov ebx, dword [eax]
sub eax, 4
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x40a870
sub edx, 1
jns 0x40a770
xor eax, eax
add edi, eax
lea eax, [edi - 1]
mov dword [esp + 4], eax
mov dword [esp], 0x442a2c
call fcn.004013c0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40a3bd
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 4]
mov edx, dword [eax + 8]
mov eax, 0x442b20
call fcn.00409b00
jmp 0x40a3bd
mov dword [esp + 4], ebx
mov dword [esp], 0x442af8
call fcn.004013c0
mov edi, dword [ebp - 0x1c]
mov eax, dword [edi + 4]
mov edx, dword [eax + 8]
xor eax, eax
call fcn.00409e40
mov dword [esp], 0x442afc
lea edi, [eax + ebx]
mov dword [esp + 4], edi
call fcn.004013c0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov edx, dword [eax + 8]
mov eax, 1
mov esi, dword [edx + 8]
test esi, esi
jle 0x40a835
mov ebx, dword [edx + 0x14]
xor ecx, ecx
xor edx, edx
nop
mov eax, dword [ebx + edx*4]
add edx, 1
add ecx, dword [eax + 4]
cmp edx, esi
jl 0x40a810
lea eax, [ecx*4 + 4]
lea edx, [eax + 0xffe]
add eax, 0x7ff
cmovs eax, edx
sar eax, 0xb
lea ebx, [eax + edi]
jmp 0x40a385
mov dword [esp + 4], ebx
mov dword [esp], 0x442ae8
call fcn.004013c0
mov dword [esp + 8], 2
mov dword [esp + 4], edi
mov dword [esp], 0
call fcn.004123c0
add ebx, eax
jmp 0x40a344
mov eax, dword [ebx + 0x18]
lea edx, [ecx + ecx*8 - 9]
shl edx, 4
mov eax, dword [eax + edx + 4]
add eax, 1
jmp 0x40a787
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40a933
mov byte [0x442f14], 0x30
mov byte [0x442f15], 6
mov byte [0x442f16], 0
mov byte [0x442f17], 0
mov byte [0x442f18], 0
mov byte [0x442f19], 0x42
mov byte [0x442f1a], 0
mov byte [0x442f1b], 0
jmp 0x40a4a6
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0x442a20
call sub.cygwin1.dll_memset
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40a69c
mov ecx, dword [ebp - 0x10]
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], 0x442a20
mov dword [esp + 0xc], ecx
call sub.cygwin1.dll_fwrite
jmp 0x40a69c
mov dword [esp + 8], 2
mov dword [esp + 4], edi
mov edx, dword [ebp - 0x10]
mov dword [esp], edx
call fcn.004123c0
jmp 0x40a52d
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
mov edx, dword [eax + 0x20b48]
test edx, edx
je 0x40a985
mov eax, dword [eax]
test eax, eax
je 0x40a985
mov byte [0x442f14], 0x30
mov byte [0x442f15], 6
mov byte [0x442f16], 0
mov byte [0x442f17], 1
mov byte [0x442f18], 1
mov byte [0x442f19], 0x83
mov byte [0x442f1a], 0
mov byte [0x442f1b], 0
jmp 0x40a4a6
mov byte [0x442f14], 0x30
mov byte [0x442f15], 2
mov byte [0x442f16], 0
mov byte [0x442f17], 0
mov byte [0x442f18], 0
mov byte [0x442f19], 1
mov byte [0x442f1a], 0
mov byte [0x442f1b], 0
jmp 0x40a4a6
mov dword [esp + 0x18], 2
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov eax, dword [edx + 4]
mov eax, dword [eax + 4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0x442f14
mov dword [esp], 0x442f14
mov dword [esp + 8], eax
call fcn.00407440
jmp 0x40a47e
mov dword [esp + 0xc], str.i_128
mov dword [esp + 8], str.TocGen
mov dword [esp + 4], 0x238
mov dword [esp], str.dvdifo.c
call sub.cygwin1.dll___assert_func
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.ERR:__in_FPC_n
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov dword [esp], 1
call sub.cygwin1.dll_exit
nop