Function at 0x40be90
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xc]
test edx, edx
jle 0x40c104
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x38], 0xffffffff
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], edx
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x20]
mov eax, dword [edx + esi]
xor edx, edx
mov ecx, dword [eax]
test ecx, ecx
jle 0x40c0ed
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + edx*4]
add edx, 1
mov dword [ebp - 0x50], edx
mov edi, dword [eax + 4]
mov dword [ebp - 0x34], eax
test edi, edi
jle 0x40c0d9
mov esi, dword [eax + 8]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 1
jmp 0x40bf60
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], edx
mov edx, edi
call fcn.0040bcd0
test eax, eax
mov ebx, eax
js 0x40bf37
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 0xc]
cmp ebx, dword [eax + 4]
jge 0x40bf3a
mov edx, dword [eax + 0x18]
lea eax, [ebx + ebx*8]
shl eax, 4
mov dword [edx + eax + 0x10], 1
mov edx, dword [ebp - 0x34]
mov esi, dword [edx + 8]
mov eax, dword [ebp - 0x2c]
lea ecx, [esi + eax]
mov edx, dword [ebp - 0x34]
mov dword [ecx + 0x1c], ebx
mov ecx, dword [ebp - 0x30]
add dword [ebp - 0x2c], 0x28
add dword [ebp - 0x28], 1
cmp dword [edx + 4], ecx
mov dword [ebp - 0x38], ebx
jle 0x40c0d0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
mov ebx, dword [esi + eax + 4]
mov edx, dword [ecx + 0xc]
mov ecx, dword [esi + eax]
mov eax, dword [ebp + 8]
mov dword [esp + 4], ebx
mov dword [esp], ecx
call fcn.0040bcd0
test eax, eax
mov ebx, eax
js 0x40c006
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0xc]
cmp eax, dword [edx + 4]
mov edi, edx
jl 0x40bfe0
mov esi, dword [ebp - 0x34]
mov ecx, dword [esi + 8]
mov edx, dword [ebp - 0x2c]
mov esi, ecx
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x38], ebx
lea ecx, [ecx + edx]
mov dword [ecx + 0x18], ebx
mov dword [ebp - 0x30], eax
je 0x40bfc9
lea eax, [ebx + ebx*8]
mov edx, dword [edi + 0x18]
mov ebx, dword [ebp - 0x28]
shl eax, 4
mov dword [ebp - 0x30], ebx
mov ebx, dword [edx + eax + 0x54]
test ebx, ebx
jne 0x40c011
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 8]
test eax, eax
jns 0x40bf04
mov ebx, dword [edi + 4]
jmp 0x40bf43
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
mov esi, dword [ecx + esi + 0x10]
test esi, esi
jne 0x40c060
lea esi, [ebx + ebx*8]
shl esi, 4
mov eax, dword [edx + 0x18]
mov edi, edx
mov dword [eax + esi + 0x10], 1
jmp 0x40bf9c
mov edx, dword [ebp - 0x34]
mov edi, dword [edx + 0xc]
mov ecx, dword [edx + 8]
jmp 0x40bf9c
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x28]
mov ebx, dword [esi]
mov dword [ebp - 0x30], eax
call sub.cygwin1.dll___getreent
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], str.WARN:_GOP_may_not_be_closed_on_cell__d_of_source__s_of_pgc__d_n
mov dword [esp + 8], ecx
mov dword [esp + 0x10], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov ebx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0xc]
lea ecx, [esi + eax]
jmp 0x40bfc9
call sub.cygwin1.dll___getreent
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x24]
mov dword [esp + 4], str.CHAPTERS:_VTS__d__d_
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov esi, dword [ebp - 0x34]
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x18]
lea eax, [ebx + ebx*8]
shl eax, 4
mov esi, eax
mov edx, dword [ecx + esi + 0x3c]
mov eax, dword [ecx + eax + 0x38]
sub eax, dword [ecx + 0x38]
sbb edx, dword [ecx + 0x3c]
call fcn.0040b830
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 eax, dword [ebp - 0x34]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
jmp 0x40bff7
mov ebx, dword [ebp + 8]
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 0x48], ebx
mov ecx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x50]
mov eax, dword [ecx + esi]
cmp dword [eax], edx
jg 0x40bed7
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x20], 4
add dword [ebp - 0x24], 1
cmp dword [ebx + 0xc], eax
jg 0x40bec2
mov ecx, dword [ebp + 8]
mov edi, dword [ecx + 8]
test edi, edi
jle 0x40c203
mov ebx, dword [ecx + 0x14]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x4c], ebx
nop
mov eax, dword [ebp - 0x14]
xor edi, edi
mov ecx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x1c], 0
mov edx, dword [ecx + eax*4]
shl esi, 2
mov dword [ebp - 0x44], esi
mov eax, dword [edx + 0x18]
mov dword [eax + 0x10], 1
mov ecx, dword [edx + 4]
mov eax, edx
test ecx, ecx
jle 0x40c18e
xor edx, edx
xor ebx, ebx
xor edi, edi
lea ecx, [edx + edx*8]
shl ecx, 4
add ecx, dword [eax + 0x18]
mov esi, dword [ecx + 0x10]
test esi, esi
je 0x40c169
add edi, 1
mov ebx, edx
mov eax, dword [eax + 0xc]
add edx, 1
mov dword [ecx + 0x14], ebx
mov esi, dword [ebp - 0x44]
shl eax, 8
lea eax, [edi + eax]
mov dword [ecx + 0x10], eax
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx + esi]
mov ecx, dword [eax + 4]
cmp ecx, edx
jg 0x40c154
mov dword [ebp - 0x1c], edi
sub ecx, 1
mov dword [ebp - 0x54], ecx
js 0x40c1e1
lea edx, [ecx + ecx*8]
mov ebx, ecx
shl edx, 4
jmp 0x40c1b5
sub edx, 0x90
test ecx, ecx
mov ebx, ecx
js 0x40c1d8
mov ecx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x44]
mov eax, dword [ecx + esi]
mov esi, dword [eax + 0x18]
mov ecx, dword [ebp - 0x54]
lea eax, [edx + esi]
cmp dword [eax + 0x14], ebx
mov dword [eax + 0x18], ecx
lea ecx, [ebx - 1]
jne 0x40c1a0
sub edx, 0x90
test ecx, ecx
mov dword [ebp - 0x54], ecx
mov ebx, ecx
jns 0x40c1ac
mov esi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x44]
mov eax, dword [esi + ebx]
cmp edi, 0xff
mov dword [eax + 0x10], edi
jg 0x40c3be
mov edx, dword [ebp + 8]
add dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x14]
cmp dword [edx + 8], eax
jg 0x40c120
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
test eax, eax
jle 0x40c384
mov ebx, dword [ecx + 0x10]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x48], ebx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x40], 0
shl eax, 2
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + edx*4]
mov edi, dword [eax]
test edi, edi
jle 0x40c371
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp - 0x40]
mov esi, dword [eax + edx*4]
mov eax, dword [esi + 4]
test eax, eax
jle 0x40c359
mov dword [ebp - 0x3c], 0
xor edi, edi
jmp 0x40c2f5
mov eax, dword [eax + 0x18]
lea edx, [edx + edx*8]
shl edx, 4
movzx eax, byte [eax + edx + 0x10]
mov dword [ecx + 0x18], eax
mov edx, dword [ecx + 0x1c]
test edx, edx
js 0x40c321
mov eax, dword [esi + 0xc]
cmp edx, dword [eax + 4]
jge 0x40c330
mov eax, dword [eax + 0x18]
lea edx, [edx + edx*8]
shl edx, 4
movzx eax, byte [eax + edx + 0x10]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x18]
mov edx, dword [eax + ebx]
mov eax, dword [ecx + 0x1c]
add eax, dword [edx + 0x10]
sub eax, dword [ecx + 0x18]
mov dword [edx + 0x10], eax
mov eax, dword [ecx + 0x18]
cmp eax, dword [ecx + 0x1c]
je 0x40c2e6
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x40c2e6
add dword [edx + 0xc], 1
cmp dword [ecx + 0x10], 1
je 0x40c350
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x18]
mov eax, dword [ecx + edx]
mov ebx, dword [eax + 0xc]
cmp ebx, 0xff
jg 0x40c38c
add dword [ebp - 0x3c], 1
add edi, 0x28
mov ebx, dword [ebp - 0x3c]
cmp dword [esi + 4], ebx
jle 0x40c359
mov ecx, edi
add ecx, dword [esi + 8]
mov edx, dword [ecx + 0x18]
test edx, edx
js 0x40c340
mov eax, dword [esi + 0xc]
cmp edx, dword [eax + 4]
jl 0x40c263
mov eax, dword [eax + 0x10]
mov edx, dword [ecx + 0x1c]
add eax, 1
test edx, edx
mov dword [ecx + 0x18], eax
jns 0x40c27f
mov dword [ecx + 0x1c], 1
jmp 0x40c29c
mov eax, dword [eax + 0x10]
add eax, 1
mov dword [ecx + 0x1c], eax
jmp 0x40c29c
mov dword [ecx + 0x18], 1
jmp 0x40c274
add dword [edx + 8], 1
jmp 0x40c2ce
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x18]
add dword [ebp - 0x40], 1
mov ecx, dword [ebp - 0x40]
mov eax, dword [edx + esi]
cmp dword [eax], ecx
jg 0x40c241
mov esi, dword [ebp + 8]
add dword [ebp - 0x10], 1
mov ebx, dword [ebp - 0x10]
cmp dword [esi + 0xc], ebx
jg 0x40c21e
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.cygwin1.dll___getreent
mov edx, dword [ebp - 0x10]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], str.ERR:__PGC__d_has_too_many_programs___d__256_allowed__n
add edx, 1
mov dword [esp + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x44]
mov eax, dword [ecx + edx]
mov ebx, dword [eax]
call sub.cygwin1.dll___getreent
mov esi, dword [ebp - 0x1c]
mov dword [esp + 4], str.ERR:__VOB__s_has_too_many_cells___d__256_allowed__n
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
jmp 0x40c3a7